biomejs / website

Biome's website
https://biomejs.dev
MIT License
22 stars 41 forks source link

📚 Linter rules properties: I can't remember the icon labels #679

Open xnuk opened 4 days ago

xnuk commented 4 days ago

Documentation URL

https://biomejs.dev/linter/rules/

Description

At the very top of the page, it explains what each icon means what:

Below the list of rules supported by Biome, divided by group. Here’s a legend of the emojis:

  • The icon check icon indicates that the rule is part of the recommended rules.
  • The icon gear icon indicates that the rule provides a code action (fix) that is safe to apply.
  • The icon warning icon indicates that the rule provides a code action (fix) that is unsafe to apply.
  • The icon JS icon indicates that the rule is applied to JavaScript and super languages files.
  • The icon TS icon indicates that the rule is applied to TypeScript and TSX files.
  • The icon brace icon indicates that the rule is applied to JSON files.
  • The icon hash icon indicates that the rule is applied to CSS files.

But this page is too long; scrolling little bit I forgot what gear icon stands for, more scrolling I forgot what hash icon stands for, and after the half of the doc only I can remember was JS icon and TS icon. There's no mouseover tooltip in icons, so I have to scroll back to the top.

Expectations

One could be a tooltip, like moving from existing aria-label to title:

<span class="inline-icon" title="The rule has a safe fix" role="img">
  <Icon name="seti:config" />
</span>

Or one could be a text label instead of icons, for clear meaning. I think it can be short enough to label as a text.

<td>
  <span class="badge">Recommended</span>
  <span class="badge">Safe fix</span>
  <span class="badge">CSS</span>
</td>

Code of Conduct

ematipico commented 4 days ago

Do you want to send a PR @xnuk ?

xnuk commented 3 days ago

No for now. I just wanted to add an idea and ask about which direction you prefer.

ematipico commented 3 days ago

I am more incline towards the first approach (which is very similar to the first version we have before having starlight)