מחקתי בטעות דוח באג

Sorry, I’m reposting this, because I was trying to set a bookmark on my original bug report, but I accidentally clicked on the trash can icon. I’m unable to restore the other topic, so I’m pasting the content here.


I think this is a bug(s).

Summary:

  • Unwanted color palettes spontaneously re-active when the forum is rebuilt.
  • I can’t seem to get the default color palettes working for existing users. There should just be “Light Mode” and “Dark Mode” and users should have those automatically set.
  • “Set color palette on all my devices” only appears for some users (see the screenshots for item #8).
  • Some users can’t see the light/dark mode switcher (item #9 in the list below).

Details:

  1. Until yesterday, the forum had two themes: one light theme and one dark theme.
  2. I combined them into one theme that has two color schemes (“Light Mode” and “Dark Mode”).
  3. I made all the old themes and color schemes unavailable to users, so there are only those two color scheme available to users, and just the one new theme.
  4. I enabled the theme-switching button in the navbar.
  5. Whenever I rebuild the forum, two more color schemes become enabled: Horizon and Horizon Dark. I’m sure that I disabled them, because I’ve tested it multiple times by disabling them and then rebuilding. They always get re-enabled on rebuild. The latest Discourse version I’ve tested it with is 3.5.0.beta9-dev (04dbc622ab). Screenshot below.
  6. Side note: when I go to disable the two Horizon palettes, I uncheck the box, save the setting and then go back to the palettes page. The palette that I uncheck doesn’t show as disabled in the list until I do a hard refresh of the color palettes page. I’m not sure if this is a separate bug.
  7. Once the Horizon palettes self-enable, the users’ settings pages look like in the screenshot below where the “Dark mode” select box is set to “Same as regular” when it should be set to “Dark Mode”, the color palette. The “Regular” select box is correctly set to “Light Mode”, but it also makes the two unwanted Horizon palettes available.
  8. After I disable the two Horizon palettes again, some users can see the light/dark mode button in the navbar and others can’t.
  9. Also, if the light/dark mode toggle is set to “light” and I change the color palette to “dark” in the user settings (/my/preferences/interface), it will flip back to light when the page reloads. There’s no indication that after switching color palette in settings that the page needs to be saved. When I do save it and reload, the light/dark mode switcher in the navbar disappears.

If you have trouble reproducing it, I can send you a link to the forum (privately) and/or screenshare.

Screenshots

Item #5

Here are the two Horizon palettes that re-enable themselves every time the forum is rebuilt:

Item #7

This is after the two Horizon palettes spontaneously enable themselves. I wrote the captions before I realized that the Horizon color palettes were spontaneously re-enabling themselves.

Item #8

These are screenshots sent to me by users after the Horizon palettes are removed.

This user can see the light/dark mode switching button in the top navbar:

This user can’t see the light/dark mode switcher in the top navbar, and a checkbox is missing:

Additional settings for reference:

תודה על הרישום של כל זה, @j127.

אני מסוגל לשחזר את הבעיה שבה ערכות הצבעים Horizon ו-Horizon Dark מופעלות מחדש אוטומטית לאחר בנייה מחדש של אתר, אז רשמתי באג עבור זה. נתקן את זה בהקדם האפשרי.

מלבד ההשפעות המתגלגלות מהבאג הזה, שאר הדברים שציינת נראים קשורים להגדרה default dark mode color scheme id. החדשות הטובות הן שיש לנו עדכון בעבודה שמעביר את ההגדרה הזו לתוך הערכה שלך - זה הופך אותה להרבה יותר שמישה, קלה למציאה, ופחות מועדת לחוסר עקביות כמו זו. אנו מתכננים למזג את העדכון הזה במהלך 24 השעות הקרובות, ויהיה לנו הודעה ומסמכים כדי לספק פרטים נוספים. אחזור לכאן ברגע שזה יהיה פעיל, ואז תוכל לבדוק זאת כדי לראות אם זה פותר את הבעיות הללו עבורך.

3 לייקים

נשמע מצוין, תודה.

לייק 1

This is now live and announced here: Improved dark and light mode handling 🎨

Update when you get a moment and let me know how it goes :slight_smile:

לייק 1

תודה, הרגע בדקתי את זה עם 3.5.0.beta9-dev (33dfd7dba9).

  • שני ערכות הנושא של Horizon עדיין מופעלות אוטומטית כאשר הפורום נבנה מחדש. (כדי להיות בטוח, בניתי מחדש את הפורום פעם נוספת לאחר השבתתן.)
  • מחליף הצבעים נעלם לפעמים אם ערכת הצבעים משתנה בהגדרות ממשק המשתמש שלי. אני לא בטוח אם זה מכוון.
  • הבאג הקטן בפריט מספר 6 מהרשימה שלי עדיין נראה שם. בדקתי אותו בפיירפוקס ובכרום. זה קורה בעת הפעלה או השבתה של כל ערכת צבעים.

אשלח לך קישור לסרטון פרטי שמדגים זאת.

The pull request to change that has not been merged yet.

2 לייקים

שלום לכולם,

אנו נתקלים בבעיות דומות עם ערכות נושא ופלטות צבעים מותאמות אישית. אנו משתמשים גם בשתי ערכות נושא (אחת בהירה ואחת כהה, אך אנו שואפים לאחד אותן בעתיד)

אם נבחרת ערכת הנושא הבהירה, ערכת הנושא הבהירה תופיע רק אם “ערכת הצבעים של ערכת הנושא המוגדרת כברירת מחדל נבחרת בבחירה הנפתחת של מצב כהה והבחירה הנפתחת של המצב מוגדרת ל"בהיר”. אם המשתמש בוחר “אוטומטי” או מצבים כהים, ערכת הצבעים של ערכת הנושא משתנה למצב כהה.

Some updates:

I’m not sure if this is a bug, but I changed the names of the color palettes in the "color_schemes" field in the about.json file. That caused the settings for “Color Palette” and “Dark Color Palette” to change to integers (maybe the IDs of missing color palettes?).

I took this screenshot after selecting the new color palette names, but it was on this screen:

That also caused the light/dark mode selector to disappear for some users after logging in.

The new color palettes weren’t marked as selectable by users, so users just see this for Color Palette choices in their preferences:

After making both palettes selectable, it seems like if the user sets their Color Palette to the default palette, the light/dark mode selector will be shown. If they change the color palette to the dark mode palette, the light/dark mode selector disappears.

There’s also some confusing behavior here:

The “Default dark mode color scheme ID” setting now appears to be missing in my site settings. I’m not sure if it was removed from Discourse. It was here in an older screenshot from above:

לייק 1

We made some recent updates to how Discourse handles dark and light palettes:

Many of these updates address the issues mentioned here, and we have some other updates in the works that will streamline this process further.

For example, this open PR streamlines and improves the user interface preferences: FEATURE: remove dark mode checkbox by lis2 · Pull Request #34165 · discourse/discourse · GitHub

2 לייקים

Thanks! This all looks really good now. There’s even a preview for users.

לייק 1

With all of these colour palette updates, that preview is one of my favourite parts :smile:

לייק 1