dosubot[bot] commented on issue #29460:
URL: https://github.com/apache/superset/issues/29460#issuecomment-2204595438
<!-- Greeting -->
Hey @Deckel! 👋 I'm here to help you with any bugs, questions, or
contributions you have. I'm Dosu, a bot designed to assist you while waiting
for a human maintainer.
<!-- Answer -->
Tags should be consistently ordered alphabetically across different sections
where they are used. This can be achieved by sorting the tags alphabetically
using the `localeCompare` function. Here is an example of how tags are sorted
alphabetically in the `tags` useMemo hook:
```tsx
const tags = useMemo(
() =>
Object.keys(chartsByTags)
.sort((a, b) =>
// sort alphabetically
a.localeCompare(b),
)
.filter(tag => RECOMMENDED_TAGS.indexOf(tag) === -1),
[chartsByTags],
);
```
Designers could provide input or a proposal for this by suggesting any
specific ordering criteria or additional sorting rules if needed
<sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx)</sup>.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]