Skip to content

[Icons] Docs: Merging code blocks; language improvements #2793

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

Merged
merged 1 commit into from
Jun 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions src/Icons/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Symfony UX Icons

The ``symfony/ux-icons`` package offers simple and intuitive ways to render
SVG icons in your Symfony application. It provides a Twig function to include
any local or remote icons from your templates.
both local and remote icons in your templates.

UX Icons gives you a direct access to over 200,000 vector icons from popular
UX Icons gives you direct access to over 200,000 vector icons from popular
icon sets such as FontAwesome, Bootstrap Icons, Tabler Icons, Google Material
Design Icons, etc.

Expand All @@ -16,14 +16,8 @@ Installation

$ composer require symfony/ux-icons

HTTP Client for On-Demand Icons
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you plan to use provided icon sets, make sure that you have the HTTP client installed:

.. code-block:: terminal

$ composer require symfony/http-client
Comment on lines -19 to -26
Copy link
Member

Choose a reason for hiding this comment

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

Please do not remove this. It has been discussed already, and this information is usefull.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't remove it, I just moved it upwards.

Copy link
Member

Choose a reason for hiding this comment

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

Given that we have improved the DX here, I'm ok removing this as a "doc section". Maybe a tip or note admonition though so it's still obvious?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, it's in the very first code block on the page :-)
What would you suggest?

Copy link
Member

Choose a reason for hiding this comment

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

A tip just below the composer require symfony/ux-icons code block.

Copy link
Member

Choose a reason for hiding this comment

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

Probably a second tip about installing ux-twig-component that links to a single html-syntax section as proposed in #2795 (review)

# To use provided on-demand icon sets, you also need HTTP client:
$ composer require symfony/http-client

SVG Icons
---------
Expand All @@ -39,7 +33,7 @@ your own.
Icon Names
~~~~~~~~~~

Icons are referenced using an unique identifier that follows one of the following syntaxes:
Icons are referenced using a unique identifier using one of the following syntaxes:

* ``prefix:name`` (e.g. ``mdi:check``, ``bi:check``, ``editor:align-left``)
* ``name`` only (e.g. ``check``, ``close``, ``menu``)
Expand All @@ -50,7 +44,7 @@ The icon ``name`` is the same as the file name without the file extension (e.g.

The name must match a standard ``slug`` format: ``[a-z0-9-]+(-[a-z0-9])+``.

Depending on your configuration, the ``prefix`` can be the name of an icon set, a directory
Depending on your `configuration`_, the ``prefix`` can be the name of an icon set, a directory
where the icon is located, or a combination of both.

For example, the ``bi`` prefix refers to the Bootstrap Icons set, while the ``header`` prefix
Expand Down Expand Up @@ -547,7 +541,7 @@ returning the HTML output.
Configuration
-------------

The UX Icons integrates seamlessly in Symfony applications. All these options are configured under
The UX Icons component integrates seamlessly in Symfony applications. All these options are configured under
the ``ux_icons`` key in your application configuration.

.. code-block:: yaml
Expand Down