You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/02/08 11:30:20 UTC

[GitHub] [apisix-website] SkyeYoung opened a new issue #871: A strange problem caused by switching color modes in multiple tabs

SkyeYoung opened a new issue #871:
URL: https://github.com/apache/apisix-website/issues/871


   **Actual Behaviour**
   
   If you open the docs in another tab and switch to dark mode, the origin home page will also change to dark mode after refreshing.
   
   **Expected Behaviour**
   
   Maybe it should be reset to light mode? Or, I think it's possible to add a toggle button to the homepage as well. It's also good if the homepage has a good dark mode.
   
   **Steps to reproduce it**
   
   It's hard to describe, and I'll give a gif.
   
   **Screenshots of the issue**
   
   ![apisix-problem](https://user-images.githubusercontent.com/48400568/152977755-b17e8e9b-efa4-4afb-b31e-82238557c808.gif)
   
   **Would you like to work on the issue?**
   
   Yes, but before that, I need to know the community's opinion.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] juzhiyuan closed issue #871: A strange problem caused by switching color modes in multiple tabs

Posted by GitBox <gi...@apache.org>.
juzhiyuan closed issue #871:
URL: https://github.com/apache/apisix-website/issues/871


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] 1502shivam-singh commented on issue #871: A strange problem caused by switching color modes in multiple tabs

Posted by GitBox <gi...@apache.org>.
1502shivam-singh commented on issue #871:
URL: https://github.com/apache/apisix-website/issues/871#issuecomment-1033837549


   > I noticed that after switching to dark mode on other pages, it automatically changes back to the light mode when I return to the home page of the site.
   
   It is intended, please check this - https://github.com/apache/apisix-website/issues/872#issuecomment-1033831539
   
   > It's also good if the homepage has a good dark mode.
   
   Sure could be, but will need some time to decide color palettes for keeping a consistent visual design. So, based on prioritizing I think if one has time can take up this, or we could delegate this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] Baoyuantop commented on issue #871: A strange problem caused by switching color modes in multiple tabs

Posted by GitBox <gi...@apache.org>.
Baoyuantop commented on issue #871:
URL: https://github.com/apache/apisix-website/issues/871#issuecomment-1033245285


   I noticed that after switching to dark mode on other pages, it automatically changes back to the light mode when I return to the home page of the site.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] 1502shivam-singh commented on issue #871: A strange problem caused by switching color modes in multiple tabs

Posted by GitBox <gi...@apache.org>.
1502shivam-singh commented on issue #871:
URL: https://github.com/apache/apisix-website/issues/871#issuecomment-1033864478


   > If you open the docs in another tab and switch to dark mode, when you return to the home page in the original tab, the home page will also switch to dark mode
   
   What I observe is that the dark mode is switching to light mode, as is programmed (only not fast, surprisingly). Reason for this I guess is that the dark mode context of the documentation section (in other tab) is stored in localstorage of browser and the site opening on other tab picks it up as theme. 
   But, to maintain light mode on homepage, the code resets the theme using the docusaurus's useThemeContext(), 
   https://github.com/apache/apisix-website/blob/2b43e5aeff92c2aabac14a540426de555cef238d/website/src/pages/index.js#L28-L41
   
   Only issue, is that this switch is slow on your system, but seems smooth on mine 🤔
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] Baoyuantop commented on issue #871: A strange problem caused by switching color modes in multiple tabs

Posted by GitBox <gi...@apache.org>.
Baoyuantop commented on issue #871:
URL: https://github.com/apache/apisix-website/issues/871#issuecomment-1034382051


   OK, I found the point @1502shivam-singh.
    Following exactly the steps in the gif provided by SkyeYoung, the site's homepage ended up in the dark mode.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] SkyeYoung commented on issue #871: A strange problem caused by switching color modes in multiple tabs

Posted by GitBox <gi...@apache.org>.
SkyeYoung commented on issue #871:
URL: https://github.com/apache/apisix-website/issues/871#issuecomment-1033254918


   @Baoyuantop in multiple tabs? I found that only in the same tab is the case you described. I will give my chrome info below. 
   
   <details>
   <summary>Chrome Info</summary>
   
   
   Google Chrome | 97.0.4692.99 (Official Build) (64-bit)
   -- | --
   Revision | d740da257583289dbebd2eb37e8668928fac5ead-refs/branch-heads/4692@{#1461}
   OS | Linux
   JavaScript | V8 9.7.106.19
   User Agent | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36
   Command Line | /opt/google/chrome/google-chrome --enable-crashpad --flag-switches-begin --flag-switches-end --origin-trial-disabled-features=CaptureHandle
   
   </details>
   
   Although I only give the infomation about Chrome in Linux, I also reproduced this problem in Windows. In fact, the GIF was recorded in Windows.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] SkyeYoung commented on issue #871: A strange problem caused by switching color modes in multiple tabs

Posted by GitBox <gi...@apache.org>.
SkyeYoung commented on issue #871:
URL: https://github.com/apache/apisix-website/issues/871#issuecomment-1033305165


   @Baoyuantop Maybe you should take a closer look at the GIF I recorded (note my switch between the two tabs), and I've reproduced this issue on my phone (also Chrome)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] 1502shivam-singh commented on issue #871: A strange problem caused by switching color modes in multiple tabs

Posted by GitBox <gi...@apache.org>.
1502shivam-singh commented on issue #871:
URL: https://github.com/apache/apisix-website/issues/871#issuecomment-1034629803


   Yes ! you are right. This behaviour is rather erratic. Feel free to fix it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] SkyeYoung commented on issue #871: A strange problem caused by switching color modes in multiple tabs

Posted by GitBox <gi...@apache.org>.
SkyeYoung commented on issue #871:
URL: https://github.com/apache/apisix-website/issues/871#issuecomment-1034389287


   @1502shivam-singh Sorry, my English is very poor. Maybe my description misled you.
   
   I mean, first open the home page in a tab, and open the document navigation page in this tab, then right-click to open the document of apisix in the new tab, switch to the dark mode, then click the first tab, and click back to the home page, You will find that the home page is not reset to light mode as expected. (yes, I know there are some codes in the program to reset back to light mode)
   
   I reproduced this behavior on different devices (maybe not because my system is too slow) :D
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org