asyncapi-react icon indicating copy to clipboard operation
asyncapi-react copied to clipboard

feat: sort tailwind classnames in correct order

Open catosaurusrex2003 opened this issue 10 months ago • 6 comments

Description format using https://www.npmjs.com/package/prettier-plugin-tailwindcss

more information -> https://tailwindcss.com/blog/automatic-class-sorting-with-prettier

Reasons

  1. More consistent and organized class naming
  2. Makes reading long classNames easier

Example this unordered classes 👇 rounded uppercase px-2 no-underline border-orange-300 text-orange-500 border py-0 border-solid text-xs gets converted to 👇 border-orange-300 text-orange-500 rounded border border-solid px-2 py-0 text-xs uppercase no-underline

Below is the image of the files which are affected due to this formatting Image

catosaurusrex2003 avatar Feb 02 '25 09:02 catosaurusrex2003

Hey can i work on this? @catosaurusrex2003

AST0008 avatar Feb 02 '25 22:02 AST0008

@AST0008 lets wait for others to validate if this change is really necessary. Then you can pick this issue up 👍.

@AceTheCreator should we go forward with this ?

catosaurusrex2003 avatar Feb 03 '25 08:02 catosaurusrex2003

Hello @catosaurusrex2003 @AST0008 , I would like to work on this issue as it seems straightforward, and I believe I can make it effeciently. Could you please assign this to me? If it's okay, I can go ahead . Let me know how you'd like me to proceed. Thanks!

garvthakre avatar Mar 02 '25 13:03 garvthakre

@catosaurusrex2003 I think it would be good if these class names were sorted; it will make fixing the UI easier.

vikramnagwal avatar Mar 08 '25 03:03 vikramnagwal

@catosaurusrex2003 what's the advantage of doing this?

AceTheCreator avatar Mar 25 '25 13:03 AceTheCreator

@catosaurusrex2003 what's the advantage of doing this?

Just better readability and consistency

something like https://github.com/asyncapi/asyncapi-react/blob/c0d23bbeb7b6101712dff957183a37e8c9635952/library/src/components/Schema.tsx#L247

gets converted to

<strong className="rounded border border-solid border-orange-300 px-2 py-0 text-xs text-orange-500 uppercase no-underline hover:bg-orange-300 hover:text-orange-600">

but i think this is not a priority now

catosaurusrex2003 avatar Mar 30 '25 16:03 catosaurusrex2003

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Jul 30 '25 00:07 github-actions[bot]