GoogleChrome / developer.chrome.com

The frontend, backend, and content source code for developer.chrome.com
https://developer.chrome.com
Other
1.67k stars 1.58k forks source link

Description for `chrome.browserAction` redirects to `#popups` instead of `#popup` #1475

Closed Yash-Singh1 closed 11 months ago

Yash-Singh1 commented 3 years ago

⚠️ This is for issues with the https://developer.chrome.com site, not Chromium itself. If you want to file a bug with Chromium (the open-source project behind Google Chrome and other browsers), please use https://crbug.com.

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://developer.chrome.com/docs/extensions/reference/browserAction
  2. Click on popup link in description
  3. Notice that the hash in the URL is popups and the page doesn't scroll to the Popup heading

Expected behavior

Scrolls down to Popup heading

Screenshots

Screenshot from 2021-09-20 18-08-29 Screenshot from 2021-09-20 18-08-33

tannerdolby commented 3 years ago

I think the "Description" text is being generated from {{ namespace.description | md | safe }} within namespace-reference.njk.

Therefore the href for that <a href="#popups"> element is not present in the /references/browserAction/index.md source so we can't just provide a quick fix in the template from href="#popups" to href="#popup".

Each UI part (icon, tooltip, badge, popup) is getting highlighted and turned into a link within namepsace.description and this is where <a href="#popups"> is happening instead of href="#popup". I tried figuring out if md was making the links within the namespace.description or if it was a shortcode or filter, or global data file but I couldn't find exactly where the links were being created.

cc @samthor

dstmarthe commented 11 months ago

Thanks for raising this. It should be pretty easy to fix. We’re moving to a new platform and so we’ll fix this over there. I’ve moved the issue to our new tracker and you can see it at https://issuetracker.google.com/issues/312790951