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

Syncing dark mode between planet page and main page #4321

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

omsuneri
Copy link
Contributor

@omsuneri omsuneri commented Jan 29, 2025

Earlier the Dark mode of the main page is not synced with the planet page dark mode after these changes
the dark mode of the planet is automatically tiggered when there is change in the theme of the main page therfore creating a sync of theme between two different pages.

before:

screen-recording-2025-01-29-at-121436-pm_fsCyYN7p.mp4

after :

screen-recording-2025-01-29-at-115030-am_i57AAaLA.mp4

@omsuneri
Copy link
Contributor Author

omsuneri commented Jan 29, 2025

@walterbender @pikurasa review this and request if any further changes are required in this.

@justin212407
Copy link
Contributor

justin212407 commented Jan 29, 2025

@omsuneri toggling dark mode on the main page only changes the background of the planet page it does not actually turn it to dark mode but this change does make sense i guess it got over looked before good work

@omsuneri
Copy link
Contributor Author

omsuneri commented Jan 29, 2025

@justin212407 yaa that's resolved by these changes look on the after video

@justin212407
Copy link
Contributor

justin212407 commented Jan 29, 2025

I did look, good work man

@omsuneri
Copy link
Contributor Author

Thanks bro !! 😊

@pikurasa
Copy link
Collaborator

@omsuneri

It looks nice.

I did a few tests, and sometimes I am experiencing peculiar results when toggling darkmode off.

For example:

  • Go to Planet, toggle dark mode on then off. One time it got stuck in a darkmode half-on state (see image below)
  • In hamburger menu, toggle darkmode on then off. When toggling on the browser does not refresh; however, it refreshes when toggling off. However, toggling while on Planet does not require any such refresh. Ideally, it would be nice if refresh was not necessary to toggle darkmode on and off.

Planet in darkmode:
Screenshot from 2025-01-30 10-10-01

Planet with darkmode toggled off (experienced once):
Screenshot from 2025-01-30 10-10-59

@omsuneri
Copy link
Contributor Author

omsuneri commented Jan 30, 2025

Yaa it's true @pikurasa cause this is happening priorly before my changes as the dark mode button was intended to function like that in the css I ll make it correct in the new pr
I guess this happens due to the declaration of planet as iframe to my guess rn

@Commanderk3
Copy link
Contributor

Commanderk3 commented Jan 30, 2025

@omsuneri I put a code line to change only the background of the planet page. If the planet theme is independent of it, please remove it.
image

This should solve the issue.

@omsuneri
Copy link
Contributor Author

@Commanderk3 okay i ll be removing in thsi PR itself

Making the Dark mode works well in Planet
@omsuneri
Copy link
Contributor Author

omsuneri commented Jan 30, 2025

@walterbender @pikurasa the Error you are facing is resolved in this a03b990 please review it again and requesst if any further changes are required

@justin212407
Copy link
Contributor

Yeah it was definitely because there was a background priorly added and it probably got overlooked in my pr. I am Om had the same discussion on this priorly.

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