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

[Icons][Twig-Component] Update documentation for installation ux icons #1993

Closed
Erwanou77 opened this issue Jul 17, 2024 · 7 comments · Fixed by #1994
Closed

[Icons][Twig-Component] Update documentation for installation ux icons #1993

Erwanou77 opened this issue Jul 17, 2024 · 7 comments · Fixed by #1994
Labels

Comments

@Erwanou77
Copy link

Hi everyone,

I just initialized a new symfony project, and I wanted to first install the ux icons library but it doesn't work until twig components is installed.

You should add at the beginning of the ux icons documentation that you must first install ux twig component then ux icons

@WebMamba
Copy link
Collaborator

There is a note in the doc: https://symfony.com/bundles/ux-icons/current/index.html#html-syntax-1. We agree to say that the HTML syntax is not working for you, but if you use the twig function, does it work?

@Erwanou77
Copy link
Author

Erwanou77 commented Jul 17, 2024

I did it with the html syntax and it didn't work. But I haven't tried the twig function

@smnandre
Copy link
Collaborator

smnandre commented Jul 17, 2024

The component does not require TwigComponent, as it works with the Twig function {{ ux_icon(...) }}

The two times we show HTML syntax, there is a note explaining symfony/ux-twig-component must be installed.

Capture d’écran 2024-07-17 à 21 17 54 - Grande
https://symfony.com/bundles/ux-icons/current/index.html#html-syntax

Capture d’écran 2024-07-17 à 21 18 14 - Grande
https://symfony.com/bundles/ux-icons/current/index.html#html-syntax-1

And we don't want to force / push anyone to install Twig component if they don't need it.

So i'm not sure how we could do it better there: do you maybe have a suggestion @Erwanou77 ?

@Erwanou77
Copy link
Author

Ah yes indeed, I had not seen the ux twig component.
My bad, I will close this issue

@Erwanou77
Copy link
Author

Maybe putting it in red could be a good idea, because in fact I haven't seen this note

@smnandre
Copy link
Collaborator

Red is reserved to "danger" / "caution", but a "tip" could render like this:

Capture d’écran 2024-07-17 à 21 29 14

@Erwanou77
Copy link
Author

Yes it's already a little better, but maybe put it at the beginning of the documentation.
After that it's maybe because I'm used to using the html syntax that's why ux twig component.

javiereguiluz added a commit that referenced this issue Jul 18, 2024
…dre)

This PR was merged into the 2.x branch.

Discussion
----------

[Icon] Emphasis HTML syntax requires TwigComponent

First time HTML syntax is shown, use "tip" (green borders) instead of "note"

Fix: #1993

| Before | After |
| - | - |
| ![Capture d’écran 2024-07-17 à 21 17 54 - Grande](https://github.com/user-attachments/assets/e344aa2c-d0d7-4dfb-bf09-bc4a2efcae14) | <img width="969" alt="Capture d’écran 2024-07-17 à 21 29 14" src="https://github.com/user-attachments/assets/bc5cfa67-801c-4018-8173-8ee9f647e8eb"> |

Commits
-------

f7838b7 [Icon] Emphasis HTML syntax requires TwigComponent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants