mdn / yari

The platform code behind MDN Web Docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sidebars created by QuicklinksWithSubPages have duplicate entries

chrisdavidmills opened this issue · comments

Summary

Sidebars created using the QuicklinksWithSubPages macro look really bad, and they contain duplicate links. See https://developer.mozilla.org/en-US/docs/Web/Privacy/Firefox_tracking_protection for an example.

We are about to update this page, so also see mdn/content#30107 (comment) for a screenshot of what it used to look like.

URL

https://developer.mozilla.org/en-US/docs/Web/Privacy/Firefox_tracking_protection

Reproduction steps

  1. Go to https://developer.mozilla.org/en-US/docs/Web/Privacy/Firefox_tracking_protection

Expected behavior

A nice sidebar, without duplicate links

Actual behavior

A sidebar that looks bad, has duplicate links, and is inconsistent with other MDN sidebars in look and feel.

Device

Desktop

Browser

Firefox

Browser version

Pre-release (e.g. Beta, Nightly or Canary)

Operating system

Mac OS

Screenshot

No response

Anything else?

No response

Validations

@chrisdavidmills Is this still an issue? The page mentioned looks fine, no duplicates in the sidebar.

@chrisdavidmills Is this still an issue? The page mentioned looks fine, no duplicates in the sidebar.

@argl This is because we merged the content PR where the issue was first noticed, and it now uses a different mechanism of creating the sidebar. You can see what it used to look like (when borked) at this comment: mdn/content#30107 (comment)

@chrisdavidmills Ok, understood, thank you!

I think we should indeed create a PrivacySidebar macro for consistency, which can then also be used in the translated pages (see here and here).

Noticed a potential side effect of this. On pages with duplicate sidebar entries like https://developer.mozilla.org/en-US/docs/Web/Privacy/Privacy_sandbox or https://developer.mozilla.org/en-US/docs/Web/EXSLT/math, when selecting one of those topics the whole section gets highlighted.
image
This does not happen when selecting one of the sub-entries in that section.
image