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

chore: replace font-awesome with paragon icons #1017

Merged
merged 17 commits into from
Aug 9, 2023
Merged

Conversation

katrinan029
Copy link
Contributor

@katrinan029 katrinan029 commented Aug 3, 2023

Description

This is part of a larger effort to deprecate Font Awesome in favor of solely using Paragon Icons, which will reduce bundle size and improve performance (page load time) since it’s a larger library.

Solution

Replace all Font-awesome icons with Paragon icons. Before and after photos below:

ManageCodesTab.jsx

Before (Font-Awesome icons) After (Paragon Icons)
Screenshot 2023-08-02 at 10 17 13 PM Screenshot 2023-08-02 at 9 59 45 PM

CodeSearchResultsHeading.jsx

Before (Font-Awesome icons) After (Paragon Icons)
Screenshot 2023-08-02 at 10 21 26 PM Screenshot 2023-08-02 at 10 21 33 PM

src/components/Coupon/index.jsx

Before (Font-Awesome icons) After (Paragon Icons)
Screenshot 2023-08-02 at 10 25 17 PM Screenshot 2023-08-02 at 10 25 10 PM

src/components/DownloadCsvButton/index.jsx

Before (Font-Awesome icons) After (Paragon Icons)
Screenshot 2023-08-02 at 9 41 59 AM Screenshot 2023-08-02 at 9 50 40 AM
Screenshot 2023-08-02 at 9 42 10 AM Screenshot 2023-08-02 at 9 51 40 AM

src/components/ReportingConfig/ReportingConfigForm.jsx

Before (Font-Awesome icons) After (Paragon Icons)
Screenshot 2023-08-02 at 9 59 15 PM Screenshot 2023-08-02 at 9 57 42 PM
Screenshot 2023-08-02 at 9 59 07 PM Screenshot 2023-08-02 at 9 58 38 PM
Screenshot 2023-08-02 at 9 59 20 PM Screenshot 2023-08-02 at 9 59 27 PM

src/components/RequestCodesPage/RequestCodesForm.jsx

Before (Font-Awesome icons) After (Paragon Icons)
Screenshot 2023-08-02 at 10 46 21 PM Screenshot 2023-08-02 at 11 04 16 PM

src/components/Sidebar/index.jsx

Before (Font-Awesome icons) After (Paragon Icons)
Screenshot 2023-08-02 at 10 49 37 PM Screenshot 2023-08-02 at 11 00 50 PM

For all changes

  • Ensure adequate tests are in place (or reviewed existing tests cover changes)

Only if submitting a visual change

  • Ensure to attach screenshots
  • Ensure to have UX team confirm screenshots

@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Patch coverage: 78.26% and project coverage change: -0.04% ⚠️

Comparison is base (8500f4d) 83.24% compared to head (6033732) 83.21%.

❗ Current head 6033732 differs from pull request most recent head bfdbc35. Consider uploading reports for the commit bfdbc35 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1017      +/-   ##
==========================================
- Coverage   83.24%   83.21%   -0.04%     
==========================================
  Files         400      400              
  Lines        8702     8697       -5     
  Branches     1797     1798       +1     
==========================================
- Hits         7244     7237       -7     
- Misses       1420     1422       +2     
  Partials       38       38              
Files Changed Coverage Δ
src/components/Admin/AdminCards.jsx 100.00% <ø> (ø)
src/components/Admin/AdminSearchForm.jsx 64.28% <ø> (ø)
src/components/Admin/index.jsx 97.16% <ø> (ø)
src/components/CodeAssignmentModal/constants.jsx 100.00% <ø> (ø)
src/components/CodeManagement/ManageCodesTab.jsx 82.64% <ø> (ø)
...nts/CodeSearchResults/CodeSearchResultsHeading.jsx 100.00% <ø> (ø)
src/components/FileInput/index.jsx 35.00% <ø> (ø)
src/components/IconWithTooltip/index.jsx 100.00% <ø> (ø)
.../MultipleFileInputField/MultipleFileInputField.jsx 88.23% <0.00%> (ø)
...mponents/ReduxFormCheckbox/CheckboxWithTooltip.jsx 100.00% <ø> (ø)
... and 15 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@katrinan029 katrinan029 requested review from a team and adamstankiewicz and removed request for a team August 3, 2023 17:24
@katrinan029 katrinan029 marked this pull request as ready for review August 3, 2023 17:25
Copy link
Member

@adamstankiewicz adamstankiewicz left a comment

Choose a reason for hiding this comment

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

LGTM with a few nits.

@@ -63,3 +63,7 @@
}
}
}

.align-right {
display: inline-block;
Copy link
Member

Choose a reason for hiding this comment

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

nit: could use Paragon/Bootstrap's .d-inline-block rather than defining a custom class name.

const iconColor = isExpanded ? 'text-white' : 'text-primary';
const screenReaderText = isExpanded ? 'Close' : 'Open';
return (
<Icon
className={classNames('fa', iconClass, iconColor)}
className={`align-right ${iconColor}`}
Copy link
Member

Choose a reason for hiding this comment

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

nit: would recommend keeping the use of classNames when working with dynamic class names.

Comment on lines 1 to 3
.justify-left {
margin-left: -40px;
}
Copy link
Member

Choose a reason for hiding this comment

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

nit: bit wary of a seemingly-generic class name that is specific to this use case, especially when it's not namespaced. For example, I believe if some other page happen to start using .justify-left because they think its a Bootstrap class name, these styles might start applying to them.

I would recommend namespacing .justify-left under a class name specific to this use case, e.g. .reporting-config .justify-left or similar.

katrinan029 and others added 7 commits August 8, 2023 00:22
…1003)

* feat: ENT-7309 Added budget category-based page for learner credit

Co-authored-by: IrfanUddinAhmad <irfanahmad@arbisoft.com>
Co-authored-by: zamanafzal <zamanafzal@gmail.com>
@katrinan029 katrinan029 merged commit cd82047 into master Aug 9, 2023
3 checks passed
@katrinan029 katrinan029 deleted the knguyen2/ENT-7430 branch August 9, 2023 23:16
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.

4 participants