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

Add light theme CSS file #2997

Merged
merged 28 commits into from
Oct 26, 2023
Merged

Add light theme CSS file #2997

merged 28 commits into from
Oct 26, 2023

Conversation

mathjazz
Copy link
Collaborator

@mathjazz mathjazz commented Oct 19, 2023

Fix #2935. In addition to adding the light theme, this patch also includes consistency changes on the dark theme.

Note: after deployment, a small change is required to the homepage contents stored in the database, because a Mozilla logo in the footer has been moved from HTML to CSS. I've already done it on stage to where this patch is currently deployed.

How to test themes in Pontoon?

  1. Go to https://mozilla-pontoon-staging.herokuapp.com/settings/ and select Light theme.
  2. Explore Pontoon and comment here if you notice anything unusual. See a list of pages to check below.
  3. Go to Settings again, select Dark theme and repeat the test. We've also made minor changes to the Dark theme.

What pages to test?

  1. Dashboards:
  1. User pages:
  1. Admin:
  1. Other assets:
  1. Translate View:

Known blocking issues:

  • Theme toggle in the Profile Menu of the Translate View is not yet available
  • FOUC when Match system is used and the system theme is Light
  • In Light theme, Translated status color doesn't have sufficient contrast when used with font-weight: 300 (more)
  • In Light theme, Pretranslated status color has inappropriate contrast in dashboard progress bar hover
  • In Light theme, Missing status color is too dark
  • In Light theme, Translation Time Filter colors are too light, because they are hardcoded
  • In Light theme, Machinery diff and String list/Concordance search highlights are too dark
  • In Dark theme, Priority star in heading needs more contrast
  • In Light theme, (manually sent) Notification message color needs more contrast
  • Delete button style in the Database project String admin is broken

Known non-blocking issues:

  • Interactive Tour colors are hardcoded (light)
  • https://ui-avatars.com/ (shown if no Gravatar image found) colors are hardcoded (dark)
  • Separate main border in two (too dark when between dark and light background on dark theme)
  • Light-theme: Insights chart backgrounds don't work too well with the light theme

Issues not related to this patch (i.e. issues to be filed):

  • Buttons in translate view have borders and inputs don't (it's the opposite elsewhere)
  • Welcome to Locale X panel is invisible
  • De-duplicate Notification, Profile menu and Sign in buttons in the header (use React on Dashboards)

@mathjazz mathjazz requested a review from ayanaar October 19, 2023 22:24
@@ -109,7 +109,7 @@ <h2>Join us.</h2>
<div class="footer flex">
<div class="flex-col-3 mozilla">
<a href="https://mozilla.org/">
<img class="logo" src="static/img/moz-logo.svg" />
<div class="logo"></div>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This needs to be changed in the DB as well.

@mathjazz
Copy link
Collaborator Author

Forgot to include changes to the /translate module.

@mathjazz
Copy link
Collaborator Author

mathjazz commented Oct 23, 2023

See #2997 (comment).

@flodolo
Copy link
Collaborator

flodolo commented Oct 23, 2023

Did you give a try to the accessibility checks for contrast in Firefox devtools?

The MOVE ALL buttons in locale selectors (e.g. at the end of the settings page) seem too light, and hard to read. Same for the CANCEL button. In general, when the text is --light-green-1 and font-weight: 300. The same color is hard to read in the LOCALES or MACHINERY tab (number of matches).

Project header, completion chart, but also completion bar in the list of projects: the "incomplete" part uses a very dark gray like in the dark theme, and it feels strange.

The PRE label in the completion bar hover is too light (--neon-green).

@mathjazz mathjazz force-pushed the 2935-light-theme-css branch from c4d5a2f to 8140b0d Compare October 23, 2023 22:22
@flodolo
Copy link
Collaborator

flodolo commented Oct 24, 2023

The fxa landing page used by the add-on is completely borked.

@mathjazz
Copy link
Collaborator Author

The fxa landing page used by the add-on is completely borked.

Thanks for pointing it out - looks like 0bb0752 wasn't deployed to stage for some reason. I re-deployed this branch, which also includes a few CSS fixes and a theme toggle in the profile menu in all views but the translate view.

@flodolo
Copy link
Collaborator

flodolo commented Oct 24, 2023

Thanks for pointing it out - looks like 0bb0752 wasn't deployed to stage for some reason. I re-deployed this branch, which also includes a few CSS fixes and a theme toggle in the profile menu in all views but the translate view.

The page always uses dark theme for me?

@mathjazz
Copy link
Collaborator Author

Correct. Dark theme is default and if you are not logged in we use the default.

@flodolo
Copy link
Collaborator

flodolo commented Oct 24, 2023

Correct. Dark theme is default and if you are not logged in we use the default.

But I'm already logged in, and my profile is set to use the light theme. If I click projects I get light theme.
I get it's an edge case, but the behavior is incorrect.

@mathjazz
Copy link
Collaborator Author

Then this is out of scope of this issue - we should not be showing a Sign In page to logged in users.

@mathjazz mathjazz force-pushed the 2935-light-theme-css branch from d85278a to a10db9c Compare October 25, 2023 15:17
@mathjazz mathjazz merged commit b97cbb7 into mozilla:main Oct 26, 2023
6 checks passed
@mathjazz mathjazz deleted the 2935-light-theme-css branch October 26, 2023 16:09
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.

Create a new light-theme.css file
3 participants