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

chore(icons): replace badges.svg with icon classes #5644

Merged
merged 4 commits into from
Apr 12, 2022

Conversation

danielhjacobs
Copy link
Contributor

@danielhjacobs danielhjacobs commented Mar 16, 2022

Summary

Fixes the remainder of number 3 (deprecated icon is different in badges.svg) from #5571 and just seems nicer

Also fix #5844

Problem

Stop using badges.svg.

Solution

Uses the same type of code used for the BCD


Screenshots

Before

Screenshot from 2022-03-16 12-13-53

After

Screenshot from 2022-03-16 12-13-46

@danielhjacobs
Copy link
Contributor Author

danielhjacobs commented Mar 16, 2022

The test needed to use the selector svg, abbr. This is because it tested items marked as obsolete, which would still have the svg tag, not the abbr tag, even after these changes. That test could probably be changed to remove obsolete, since it should no longer be in use, however, I didn't want to change the existing test functionality beyond what I needed to change without waiting for feedback.

@danielhjacobs
Copy link
Contributor Author

danielhjacobs commented Mar 16, 2022

Side Note: I got side tracked. I manually looked at every result from https://github.com/mdn/content/search?q=obsolete. https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel#obsolete_properties and https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection#obsolete_events are the only pages out of those still using the obsolete icon (rather than just the word obsolete).

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.

I will have to check internally if there is consensus for removing the color of those icons, but the changes themselves make sense. Thanks!

kumascript/macros/DeprecatedBadge.ejs Outdated Show resolved Hide resolved
kumascript/macros/NonStandardBadge.ejs Outdated Show resolved Hide resolved
kumascript/tests/macros/apiref.test.js Outdated Show resolved Hide resolved
kumascript/tests/macros/apiref.test.js Outdated Show resolved Hide resolved
@danielhjacobs
Copy link
Contributor Author

Misclicked and ended up requesting a review closing and reopening.

@danielhjacobs
Copy link
Contributor Author

danielhjacobs commented Mar 17, 2022

I added the colors back until a decision is reached, which should make this mergeable before then. To remove color from the sidebar, these lines should be removed:

/* icons in sidebars */
.icon-experimental,
.icon-nonstandard {
background-color: var(--icon-information);
}
.icon-deprecated {
background-color: var(--icon-critical);
}

@caugner caugner changed the title Stop using badges.svg chore(icons): replace badges.svg with icon classes Mar 18, 2022
@danielhjacobs
Copy link
Contributor Author

Added a commit to fix #5844.

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.

LGTM, but I will request a 2nd review from a peer

@caugner
Copy link
Contributor

caugner commented Mar 31, 2022

@schalkneethling This looks good to me, but maybe we can even remove the badge.svg, since it's no longer referenced anywhere (as far as VSCode search tells)?

@danielhjacobs
Copy link
Contributor Author

maybe we can even remove the badge[s].svg

I thought the same, but was just worried I may have missed something. I can remove it if we're sure it's now un-used.

@schalkneethling schalkneethling added the 🧑‍🤝‍🧑 community contributions by our wonderful community label Apr 3, 2022
@schalkneethling
Copy link

Hey @danielhjacobs and @caugner. I will take a look at this one today. Thanks for the ping.

Copy link

@schalkneethling schalkneethling left a comment

Choose a reason for hiding this comment

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

Apologies for taking so long to get back to you. This looks good to me. Thanks @danielhjacobs 🎉

@schalkneethling schalkneethling merged commit 50c0145 into mdn:main Apr 12, 2022
@danielhjacobs danielhjacobs deleted the no-badges branch April 12, 2022 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍🤝‍🧑 community contributions by our wonderful community
Projects
Development

Successfully merging this pull request may close these issues.

Tell users what the deprecated icon (and others) mean.
3 participants