yari
yari copied to clipboard
Sidebars created by QuicklinksWithSubPages have duplicate entries
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 https://github.com/mdn/content/pull/30107#discussion_r1498492464 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
- 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
- [X] I have read the Community Participation Guidelines.
- [X] I have verified that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] I have checked that this is a concrete bug. For Q&A open a GitHub Discussion.
@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: https://github.com/mdn/content/pull/30107#discussion_r1498492464
@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.
This does not happen when selecting one of the sub-entries in that section.