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 Theme Preferences Setting #3696

Merged
merged 9 commits into from
Apr 24, 2023
Merged

Add Theme Preferences Setting #3696

merged 9 commits into from
Apr 24, 2023

Conversation

dem4ron
Copy link
Member

@dem4ron dem4ron commented Apr 19, 2023

Visual update:

Screenshot 2023-04-21 at 12 40 12

For insiders:

Screenshot 2023-04-19 at 15 48 54

For non-insiders:

Screenshot 2023-04-19 at 16 27 32

Tooltip on hover:

Screenshot 2023-04-19 at 16 28 08


# TODO: add these as default values in DB
def default_theme_preference
%i[eligible eligible_lifetime].include?(current_user.insiders_status) ? 'system' : 'light'
Copy link
Member

Choose a reason for hiding this comment

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

This should be active variants, not eligible variants. Check this in all your PRs pls

@dem4ron dem4ron changed the base branch from main to dark-theme April 24, 2023 09:29
@dem4ron dem4ron marked this pull request as ready for review April 24, 2023 09:32
@dem4ron dem4ron requested a review from ErikSchierboom as a code owner April 24, 2023 09:32
@dem4ron dem4ron merged commit d66c949 into dark-theme Apr 24, 2023
@dem4ron dem4ron deleted the settings-theme-toggle branch April 24, 2023 09:33
iHiD added a commit that referenced this pull request May 3, 2023
* Update comment

* Update some whites to bgcolorA, Create vars for progress bar dark theme, add color for `textColor2`

* Track Overview, Syllabus, Exercises, About tweaks

* Tracks, Exercises tweaks

* Replacing values with variables whereever possible at Exercises, Tracks, Blogposts

* Add darkmode styles to Mentoring

* Disable any changes on site-header, site-footer

* Representation tweaks, donation tweaks - WIP

* Automation modal, Profile

* Community page first pass

* Community page swag border

* Settings first pass

* Impact, 12in23, track first pass

* Fix one Ruby test

* Replace couple 's with &apos and &quot

* Add `mask-image` to concept-map

* Fix a test

* Add prefer-color-scheme default (#3477)

* Add prefer-color-scheme default

* Add another postcss plugin

---------

Co-authored-by: dem4ron <demaaron88@gmail.com>

* Add more filters, adjust colours on track show page, fix missing dark themes, setup media query for dark theme, fix logo colour, add unset colors from figma

* Add track overview details, variables

* Track about page details, correct variables, svg masking

* Add more missing variables, fix misplaced ones

* Concept-page modifications, updates

* Fix HLJS theme-unset issue, add variables

* Add variables to multiple svgs, align colors with filters

* Change Logo colour

* Fix filters, svg colours on about page

* About pages modifications, fixes

* Automation details, cursor color, tooltips - no dark mode, svgs

* Add unset as modals default

* Simplify variables, add missing variables

* Add more filters and exceptions

* Set purple filter to be the same in dark more

* Fix journey page, notification element svgs

* Add Theme Preferences Setting (#3696)

* Set up

* Add ThemeButtons

* Change wording slightly

* Tweaks

* Update colors, add infomessages, set up buttons correctly

* Add JS function to update theme pref

* Simplify function

* Update fn

* Change boolean name to be more descriptive

---------

Co-authored-by: Jeremy Walker <jez.walker@gmail.com>

* change theme name

* Site header, footer, tracks list, reduce number of variables

* Tons of stuff

* Many-many changes, fixes

* Add more filters, alter some colours, change background for about pages here and there etc

* Remove toggle button

* More dark mode

* Move concept line variables into colors.css, add better filter on concept icon on EDs, couple tweaks

* Add variable for mastered concept backgorund

* Completed heading

* Add key

* Add missing filters, make contrast better, tab colors, purple's dark variant, etc

* Copy text color, removing backgrounds in darkmode, difficulty tags, more better contrasts

* Change readonly hljs code background

* Remove blocking filter

* Patch up donate page

* 12in23

* Adjustments, adding missing filters, etc

* Turning card number color to grey now..

* Add accessibility-dark theme (#5331)

* Remove duplicate method

* Fix bullet issues

* Disable selected theme selector (#5329)

* Disable theme button, increase req limit, refactor

* Remove form footer

* Fixed test

---------

Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>

---------

Co-authored-by: Jeremy Walker <jez.walker@gmail.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
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