-
Notifications
You must be signed in to change notification settings - Fork 108
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
Add Tag component #507
Add Tag component #507
Conversation
🚀 Deployed on https://634ed354962969069a8b103f--grammy.netlify.app |
Have you considered adding these labels to the navigation menu, too? |
Suggestion: Maybe use the greenish color of Node.js logo for Node.js badge? (I don't see a specific color scheme for Deno other than black-and-white, so the current one is nice) |
To do:
|
As a general rule, all plugins should be available on both runtimes. That's why adding both Deno and Node labels to all official plugins is maybe a little weird. We should rather add a note to stateless-question (or finally port it, @EdJoPaTo?) as well as to fluent. It can say that exactly this plugin is Node-only. We can well use the lables for the hosting pages! |
I'm not sure we need a badge for that. That makes it look like Node-only plugins are a thing which we advertise or anything (we even created a label for it!) while in reality there's like 1 plugin that won't support Deno, and another one that will be supporting both runtimes in the future. |
Great changes, awesome to use a component! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a doubt related to the SVG labels, specifically the ones saying "third-party":
I think that the current implementation will result in a small headache in the future for people willing to translate the website to another language, as they have to open the SVG in an editor, change the text, and then upload it to a different file.
Maybe we can make it a component and let it be usable, for example, this way:
<Tag name="third-party" />
What do you think about it? I think it's going to be much much better to have less stuff for those who contribute new languages to take care of.
* Add tagGroup * Add several options
Sure. What badges should we add? |
The Deno/Node ones. Should we then retain the columns about Deno and Node? They will be redundant, but it could be that they still provide a better overview? |
No, I'd rather make a column "platforms" |
And then we add Deno/Nodejs badges there? |
Yes |
Personally, I prefer styles 1 or 2. |
2 but a bit smaller paddings. 1 (current?) is also ok |
Isn't web also a platform? Also, what does the web platform even tell us? |
Good question. Does it have anything to do with bot development, specifically? 🤔 |
ESM without any Deno APIs, I suppose |
How about we add a Node badge if the platform supports Node APIs, a Deno badge if the platform supports Deno APIs, and no badge if the platform supports neither of the two? |
Good, since the only platform that this is intended for was Cloudflare Workers, and it also supports Deno |
Do you think it would be a good idea to remove the pricing column? I believe that the |
Yes that sounds reasonable. I think the most important info to have on first sight is how cheap it could possibly get. Also, maintaining a list of constantly changing prices is extra work. We could save that. |
Since some of the content needs to be translated, I've put them into different PQ. Now this PQ is ready to be reviewed. |
This PQ causes the site's performance to drop heavily on pages that include a badge. For example, the total blocking time in a lighthouse test more than doubles from 100 ms to 230 ms. The badge is fading in after the page has loaded, which leads to a visible layout shift. This can be confirmed by looking at the cumulative layout shift value which increases by almost 50 %. Other tools such as https://web.dev confirm these values. In absolute values, I don't really think that we have crossed any thresholds the should prevent us from merging this. I am mainly posting this so that we all know what we're buying ourselves into. The one thing that I believe does need improvement is the layout shift. It'd be great if the page just loads and that's it, rather than moving around the content after I started reading. @CikiMomogi what do you think? |
Hmm. Let's see if i can fix that. |
Closing this PQ temporarily. Perhaps I'll continue it in the future. |
Sad to see this stalling :( |
See the result :
https://cikimomogi-grammy.github.io/PQ-507/hosting/deno-deploy.html
https://cikimomogi-grammy.github.io/PQ-507/plugins/autoquote.html
Some examples:
<TagGroup><Tag template="deno"/></TagGroup>
<TagGroup><Tag template="deno" text="DENO LAND"/></TagGroup>
<TagGroup><Tag template="deno"/><Tag template="nodejs"/></TagGroup>
<TagGroup><Tag text="GRAMMYJS" icon="telegram" iconType="logo" color="#26A5E4"/></TagGroup>
<TagGroup><Tag text="TRENDING" icon="fire" iconType="icon" iconColor="#dc3545" iconBg="#ffe674" color="#fde427" textColor="#ff8080"/></TagGroup>
List of
Tag
attributes:template
official
,thirdparty
,deno
,nodejs
desc
link
color
<Tag color="ffffff" ... />
colorDark
<Tag colorDark="ffffff" ... />
icon
<Tag icon="npm" iconType="logo"/>
will fetch .svg with namenpm
from URLhttps://simpleicons.org/icons/npm.svg
iconType
icon
,logo
icon
will fetch from icons.getbootstrap.com andlogo
will fetch from simpleicons.org. Example:<Tag icon="fire" iconType="icon"/>
will fetch from URLhttps://icons.getbootstrap.com/assets/icons/fire.svg
iconColor
iconColorDark
iconBg
iconBgDark
text
textColor
<Tag textColor="ffffff" ... />
textColorDark
<Tag textColorDark="ffffff" ... />
TagGroup
is useful for adding some margins to your tags. You can wrap your tags insideTagGroup
like this one:Always use
TagGroup
whenTag
is used right below heading.But, in some cases we may not include
TagGroup
, such as when we insertTag
between sentences like this one:List of
TagGroup
attributes:mt
<TagGroup mt="12px"> ... </TagGroup>
mb
<TagGroup mb="12rem"> ... </TagGroup>
pt
<TagGroup pt="12rem"> ... </TagGroup>
pb
<TagGroup pb="12rem"> ... </TagGroup>