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

Update documentation and tests to change twig:ux:component to twig:UX:Component #2555

Closed
wants to merge 1 commit into from

Conversation

Kocal
Copy link
Member

@Kocal Kocal commented Feb 8, 2025

Q A
Bug fix? no
New feature? no
Issues Fix #...
License MIT

Applying suggestions for Symfony UX Components section in OP's message, see #2118

@Kocal Kocal added the docs Improvements or additions to documentation label Feb 8, 2025
@carsonbot carsonbot added the Status: Needs Review Needs to be reviewed label Feb 8, 2025
@smnandre
Copy link
Member

smnandre commented Feb 9, 2025

Well.... this wasnt my suggestion ^^

And we made this choice because it felt weird to use <twig:UX:Icon (lower / UPPER / Camel).

Open to change of course, but does not feel the previous topic raised massive interest :)

A2: Symfony UX components should use lowercase casing style in documentation, code blocks, and social media.

😅

@smnandre
Copy link
Member

smnandre commented Feb 9, 2025

And this would require a lot of other changes since we acted the ux:icon case (commands, docs, website, ...).

Not strongly opiniated here (really) and open to change, but then i guess we should do it all at once, to not confuse dev/users

<li id="sixth"><twig:ux:icon name="sub:check" aria-labelledby="foo" /></li>
<li id="sixth"><twig:UX:Icon name="sub:check" aria-labelledby="foo" /></li>
Copy link
Member

Choose a reason for hiding this comment

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

This one is a test (the various formats) to ensure we can handle them all

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, good catch

@Kocal
Copy link
Member Author

Kocal commented Feb 22, 2025

After a little thought, I understand the problem with the following proposed naming lower:UPPER:PascaleCase (e.g.: twig:UX:Map). I was thinking this way:

  • twig, because it's the obligatory prefix for filling in a component
  • UX, because Symfony “UX”, and it can be associated with the PascalCase naming of the component
  • PascalCase, as documented on https://symfony.com/bundles/ux-twig-component/current/index.html, but also because this convention is the same as with React or Vue (even though Vue also allows kebab-case).

It is true it makes more sense to use <twig:ux:icon>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation Status: Needs Review Needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants