[pull] master from mattermost:master#668
Merged
Merged
Conversation
…body ownership (#36186) * MM-67913: fix white flash on product navigation by centralizing app__body ownership Previously, `document.body.classList.add/remove('app__body')` was managed independently by `ChannelController` and each product plugin (Playbooks, Boards). When switching products, the plugin's cleanup removed `app__body` before the incoming tree's effect re-applied it. Because `ChannelController` is deeply nested and sometimes async, a ~170ms gap could elapse during which the body fell back to `background: $bg--gray`, producing a visible white flash behind the transparent `GlobalHeader` and LHS. Centralize `app__body` ownership in `WithUserTheme` via a new `useAppBodyClass` hook. Since `WithUserTheme` wraps both the products Switch and the `/:team` route in `root.tsx`, it stays mounted across product navigation, so the class is never removed mid-transition. `ChannelController` no longer toggles `app__body`; tests updated. Product plugins (Playbooks, Boards) should stop touching `app__body` as well; companion fixes land in their respective repos. Made-with: Cursor * MM-67913: add coverage for app body class ownership Made-with: Cursor * Update webapp/channels/src/components/theme_provider/theme_context.ts Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com> * MM-67913: fix theme context hook closure Made-with: Cursor --------- Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
* Add stronger EnableTesting warnings Co-authored-by: Nick Misasi <nick13misasi@gmail.com> * Keep EnableTesting translations in en only Co-authored-by: Nick Misasi <nick13misasi@gmail.com> * Address EnableTesting review feedback Co-authored-by: Nick Misasi <nick13misasi@gmail.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )