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

fix(ui): allow Font Awesome fa-classic in QIcon (fix: #17483) #17486

Conversation

mjwlist
Copy link
Contributor

@mjwlist mjwlist commented Sep 5, 2024

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Documentation
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

The PR fulfills these requirements:

  • It's submitted to the dev branch (or v[X] branch)
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • It's been tested on a Cordova (iOS, Android) app
  • It's been tested on an Electron app
  • Any necessary documentation has been added or updated in the docs or explained in the PR's description.

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to start a new feature discussion first and wait for approval before working on it)

Other information:
The valid Font Awesome v6 class 'fa-classic' causes the QIcon component to render incorrectly.

For example:
<q-icon name="fa-classic fa-regular fa-calendar-days" size="5rem" />
Will render:
<i class="q-icon notranslate material-icons" aria-hidden="true" role="presentation" style="font-size: 5rem;">fa-classic fa-regular fa-calendar-days</i>

Without the 'fa-classic' class it will render correctly.

For example:
<q-icon name="fa-regular fa-calendar-days" size="5rem" />
Will render:
<i class="q-icon fa-regular fa-calendar-days" aria-hidden="true" role="presentation" style="font-size: 5rem;"> </i>

This pull request fixes this issue by adding 'classic' to the Font Awsome regex validation in QIcon.
const faRE = /^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /

@yusufkandemir yusufkandemir changed the title Fix: #17483 - Validates Font Awsome v6 fa-classic class in QIcon fix(ui): allow Font Awesome fa-classic in QIcon (fix: #17483) Sep 5, 2024
Copy link

github-actions bot commented Sep 5, 2024

UI Tests Results

    1 files     98 suites   37s ⏱️
1 031 tests 1 031 ✅ 0 💤 0 ❌
1 050 runs  1 050 ✅ 0 💤 0 ❌

Results for commit 30ff608.

@yusufkandemir yusufkandemir merged commit 709f6c8 into quasarframework:dev Sep 5, 2024
3 checks passed
@yusufkandemir
Copy link
Member

Thanks for contributing! The fix will be included in quasar v2.16.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants