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

[RFC] Iconography #44771

Open
wants to merge 1 commit into
base: 5.3-dev
Choose a base branch
from

Conversation

dgrammatiko
Copy link
Contributor

3rd try for inline SVG icons.

This is ONLY for demo purposes, if it gets a consensus there would be be a proper PR

Prior work:

Summary of Changes

  • Introduce an HTML helper class
  • Create an array (type [ name => svgCode ]) with all the FA icons
  • Introduce a simple conditional to inline the sig's as sprite at the end of the document body

Scope

  • Introduce a way to have inline svg icons
  • Make sure it's safe
  • It's easy to use
  • Can work together with the font icons (ie no B/C break)
  • It can work within JS

Testing Instructions

I Just covered few icons so that it's easy for any reviewers to check what is happening.
The icon part could be done with a Layout for even easier usage.
I picked the show/hide password to showcase the JS changes (supports both font/inline svg icons)

Actual result BEFORE applying this Pull Request

Login
Screenshot 2025-01-22 at 19 40 31

Cpanel
Screenshot 2025-01-22 at 19 42 52

Expected result AFTER applying this Pull Request

Login
Screenshot 2025-01-22 at 19 41 31

Cpanel
Screenshot 2025-01-22 at 19 42 30

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@laoneo @HLeithner @bembelimen @SniperSister @rdeutz

@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.3-dev RFC Request for Comment labels Jan 22, 2025
@HLeithner
Copy link
Member

I'm not in favor doing this (or anyting else) with the htmlhelper, it's a thing that should be removed and directly done in the webassetmanager or document it self. Didn't looked at the svg implementation it self, will do that later, at least it would be cool to have this if it's working.

@dgrammatiko
Copy link
Contributor Author

Could move it to the Document class or WAM. Fwiw first or second try was on the document class anyways this is implementation details could move the code around

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.3-dev RFC Request for Comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants