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

enhance(macros/JSRef): refactor + update inheritance data + separate instance/static methods/properties #8502

Merged
merged 8 commits into from
Apr 26, 2024

Conversation

Josh-Cena
Copy link
Member

Summary

Fix #8052. This should replace #8269.

Problem

The inheritance is useless; static properties/methods and instance properties/methods are not differentiated.

Solution

This PR is a total refactor of the JSRef implementation. With this change, I hope the sidebar can be more useful.


Screenshots

PageBeforeAfter
Errorimage image
TypeErrorimage image
Intl image image
Intl.DateTimeFormat image image
Proxy image image
Proxy() constructor image image

How did you test this change?

@github-actions github-actions bot added the macros tracking issues related to kumascript macros label Mar 27, 2023
Comment on lines 319 to 329
if (group.length > 0) {
output += `<li><strong>${text.Related}</strong></li>`;
for (const groupItem of group) {
const link = web.smartLink(
`${slugStdlib}/${groupItem.replace(".", "/")}`,
null,
`<code>${groupItem}</code>`,
null,
slugStdlib,
"JSRef",
);
output += `<li><strong>${link}</strong></li>`;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the inheritance chain is now proper, there's less need for the "related pages" part (except for Intl, where navigation remains a bit awkward). I've thus put it below "inheritance" to avoid obstructing the more structured information.

@Josh-Cena Josh-Cena force-pushed the improv-jsref branch 2 times, most recently from 6a7bf17 to dd0c1ab Compare March 27, 2023 03:22
@Josh-Cena
Copy link
Member Author

cc @wbamberg in case you missed it—this should interest you

@caugner caugner requested a review from wbamberg May 11, 2023 19:57
@caugner caugner changed the title feat(macros): make JSRef sidebar more useful feat(macros/JSRef): refactor + make sidebar more useful May 11, 2023
@github-actions github-actions bot added the idle label Jan 24, 2024
@Josh-Cena Josh-Cena requested a review from a team as a code owner March 21, 2024 14:47
@caugner caugner changed the title feat(macros/JSRef): refactor + make sidebar more useful enhance(macros/JSRef): refactor + update inheritance data + separate instance/static methods/properties Mar 21, 2024
@github-actions github-actions bot added merge conflicts 🚧 Please rebase onto or merge the latest main. and removed idle labels Mar 21, 2024
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot removed the merge conflicts 🚧 Please rebase onto or merge the latest main. label Mar 28, 2024
Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTU (@argl @fiji-flo @caugner) and is currently deployed at https://developer.allizom.xyz/, thanks a lot.

We'll loop in the MDN content team once more before merging.

@github-actions github-actions bot added the merge conflicts 🚧 Please rebase onto or merge the latest main. label Apr 5, 2024
Copy link
Contributor

github-actions bot commented Apr 5, 2024

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot removed the merge conflicts 🚧 Please rebase onto or merge the latest main. label Apr 10, 2024
@wbamberg wbamberg removed their request for review April 10, 2024 15:30
@caugner caugner merged commit a2202ba into mdn:main Apr 26, 2024
11 checks passed
@caugner
Copy link
Contributor

caugner commented Apr 26, 2024

Thank you @Josh-Cena! 🙌

@Josh-Cena Josh-Cena deleted the improv-jsref branch April 29, 2024 17:04
@Josh-Cena
Copy link
Member Author

Nice! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macros tracking issues related to kumascript macros sidebar content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove "Inheritance" sections from JS sidebar
2 participants