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

Removed 'Muli' font. Added 'Manrope' font. Extended 'Poppins' with 'Manrope' for Cyrillic&Greek chars. #12933

Merged
merged 20 commits into from
Sep 21, 2022

Conversation

boocmp
Copy link
Contributor

@boocmp boocmp commented Apr 7, 2022

Resolves brave/brave-browser#4309
Resolves brave/brave-browser#25527

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

On respective Issues

@github-actions github-actions bot added the CI/storybook-url Deploy storybook and provide a unique URL for each build label Apr 7, 2022
@boocmp boocmp requested review from iefremov and petemill April 7, 2022 15:07
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@boocmp boocmp requested a review from a team as a code owner April 10, 2022 03:49
@boocmp boocmp changed the title Reference to Manrope (Cyrillic & Greek) added for the Poppins font. Removed 'Muli' font. Added 'Manrope' font. Extended 'Poppins' with 'Manrope' for Cyrillic&Greek chars. Apr 10, 2022
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@iefremov
Copy link
Contributor

kindly ping @petemill @bsclifton @zenparsing - can you please take a look when you have some time? This fixes a P2 issue

@iefremov
Copy link
Contributor

@boocmp needs rebase

@@ -47,7 +47,8 @@ if (use_lld) {

# https://bugzilla.mozilla.org/show_bug.cgi?id=1188030#c14
# Supposedly this bug was fixed, but it's still happening for us.
too_many_personality_profiles_workaround = is_apple && use_lld && !is_component_build
Copy link
Member

Choose a reason for hiding this comment

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

why is this being changed in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

linter has gone crazy :(

Copy link
Member

Choose a reason for hiding this comment

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

Because this PR is modifying a lot of places, I'd like to propose backing out this lint change (and any any others not absolutely needed). If the file was being modified already, then lint change makes sense. But general lint cleanups can happen in a different PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reverted

@petemill
Copy link
Member

I'll take a look at reviewing this, but I'll need to do a build to see the difference. I would suggest you append some more items the description:

  • Which UIs that are affected by replacing Multi with Poppins, so we can check font-size and spacing
  • Which different UIs in particular to look at for cyrillic improvements, if any
  • Any other test scenarios that we should run by the design team

Some before and after screenshots would be helpful too.

Thanks!

@bsclifton
Copy link
Member

Oh wow - this'll be a great one! (adding Cyrillic support). I can pull down and try after it's rebased

++ on everything @petemill mentioned 😄 Many of the UIs may look the same before/after and it's fine to skip screenshots. But for ones which have a difference (hopefully not a big spacing difference or line height difference, etc) it's good to see what that could be

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@boocmp
Copy link
Contributor Author

boocmp commented Apr 23, 2022

Fonts.zip
See in the attachment a few screenshots for the English and Cyrillic versions.
In English version, Muli is replaced by Poppins, also all Cyrillic characters are displayed in Manrope
In Cyrillic version, only Manrope is used

@petemill
Copy link
Member

petemill commented Apr 25, 2022

Yeah it's looking pretty good at first glance of the screenshots. We'll want to get a designer to look over them to check the font-weight and size differences especially between Muli and Poppins. I think this is a good way of doing it since it'll improve cyrillic font display even for users who are currently viewing pages in non-cyrillic languages. Only issue may be that we have to be granular when choosing a font for different character sets.

Still some TODOs:

  • we removed muli.css but not the font files.
  • we have not removed all references to muli. Some references are provided by theme.fontFamily.body and our default theme provided by brave-ui has a value for this property as Muli. We can replace that value in brave-ui, which seems better semantics than replacing fontFamily.body with fontFamily.heading, although this older design-system is being deprecated soon.

In general we have way too many css definitions of font-family. It only really needs it once per UI since the css value is inherited!

@iefremov
Copy link
Contributor

@jenn-rhim @bradleyrichter can you please look at screenshots and confirm they look good? #12933 (comment)

@boocmp boocmp requested a review from a team as a code owner April 26, 2022 14:03
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@petemill
Copy link
Member

I've pushed a rebase and now that Poppins is correctly replacing instances of the brave-ui theme variable that resulted in Muli being requested via css, I've manually tweaked some of the items in #12933 (comment) - font weights and sizes.

I basically changed many instances of font-weight: 600 to font-weight: 500 for the Rewards Page, and it now looks like this (Poppins on left, old muli on right):
image

I think it's best to merge this and then cover anything additional in follow-up. I think I got the main items with Welcome and Rewards Page, and Brave Talk widget on NTP.

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

Copy link
Collaborator

@zenparsing zenparsing left a comment

Choose a reason for hiding this comment

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

Rewards CSS changes look good.

@petemill
Copy link
Member

Confirmed that the change in brave-ui ref in package.json only brings in the Muli replacement with Poppins and does not remove any more recent commits from brave-ui. brave/brave-ui@8339e7d...e4c0498

@petemill petemill merged commit 096865a into master Sep 21, 2022
@petemill petemill deleted the issues/4309 branch September 21, 2022 16:58
@github-actions github-actions bot added this to the 1.46.x - Nightly milestone Sep 21, 2022
@petemill petemill self-assigned this Sep 21, 2022
emerick pushed a commit that referenced this pull request Sep 23, 2022
…anrope' for Cyrillic&Greek chars. (#12933)

* Reference to Manrope (Cyrillic & Greek) added for the Poppins font.

* License.

* Bye, bye 'Muli' it's a Poppin's time.

* Overrided Poppins with Manrope.

* Load font from resources instead of hardcode.

* Lint.

* GN fixed.

* Lint.

* Format.

* Clean up.

* Removed Mult files.

* Font weight fixes.

* Safety check padding.

* Font-weight on active state.

* Added comment.

* Update brave-ui ref to include brave/brave-ui#607

- Remove Muli in favor of Poppins

* Rebase.

* Reverted package and package-lock jsons.

* Rebased.

* extra muli -> poppins text styles as a result of brave-ui update to remove muli from more places

Co-authored-by: Pete Miller <miller.pete@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/run-audit-deps Check for known npm/cargo vulnerabilities (audit_deps) CI/storybook-url Deploy storybook and provide a unique URL for each build
Projects
None yet
8 participants