Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Regression?] Generate clickable tags for description terms #8394

Closed
KartikSoneji opened this issue Mar 11, 2023 · 6 comments · Fixed by #8413
Closed

[Regression?] Generate clickable tags for description terms #8394

KartikSoneji opened this issue Mar 11, 2023 · 6 comments · Fixed by #8413
Labels
accepting PR We invite you to open a PR to resolve this issue. macros tracking issues related to kumascript macros regression

Comments

@KartikSoneji
Copy link
Contributor

PR #3428 made linking to specific attributes easier by generating clickable links.
But it seems to have been lost in the new UI refresh.

The current UI uses a description table with description terms for attributes, and each of them has a unique id but no easy way to link to them directly.
Related: #3148

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Mar 11, 2023
@teoli2003
Copy link
Contributor

We are removing these macros.

@KartikSoneji
Copy link
Contributor Author

Ah ok, I was just opening an issue since it's listed as a step in the contribution guidelines.

2. Ensure that there is an open issue for the problem you're solving, or create it first: https://github.com/mdn/yari/issues/new/choose

I'm working on a way to inject the <a> tags without the macros.
I'll open a PR shortly: https://github.com/KartikSoneji/yari/tree/feature/hyperlink-dt-table-entries

@teoli2003
Copy link
Contributor

teoli2003 commented Mar 11, 2023

Definition list in mdn/content automatically get a #xyz link. We had two macros, one to generate `#attr-xyz and the other to link to it. We are removing both of these.

So to link to a defintion term named xyz you can use a Markdown link with the anchor #xyz.

Or maybe I have misunderstood you?

@KartikSoneji
Copy link
Contributor Author

KartikSoneji commented Mar 11, 2023

Right now, to link to the id I have to:
right click > inspect element > find the id of the element I want to link to > copy-paste the id in the hashfragment of the url.

Turning the text into a hyperlink allows users to just click the link to get the url, similar to how headings work.
Perhaps the original issue has a better explanation: #3148

@teoli2003
Copy link
Contributor

teoli2003 commented Mar 11, 2023

Or you put the name of the attribute you want to link to. Without inspecting it. If the attribute is autocomplete you use #autocomplete.

@KartikSoneji
Copy link
Contributor Author

Hmm that is usually the case, but there might be instances where the id is not equal to the name since the name is already taken.
Also, I feel a link is much better for UX.

@mirunacurtean mirunacurtean added macros tracking issues related to kumascript macros accepting PR We invite you to open a PR to resolve this issue. regression and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Mar 23, 2023
@github-project-automation github-project-automation bot moved this from Backlog to Done in Yari Platform Engineering Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepting PR We invite you to open a PR to resolve this issue. macros tracking issues related to kumascript macros regression
Projects
Development

Successfully merging a pull request may close this issue.

3 participants