Repository navigation
Theme NEMAR's widget in NEMAR teal, with its own bubble color - #462
Merged
Merged
Conversation
The reader's bubbles were fixed at the platform blue. A community can now name their color on its own, never derived from theme_color, so a community that sets only a theme renders exactly as before. Validated as #RRGGBB like theme_color, on the server and again in the widget.
theme_color and user_bubble_color #257a92: nemar.org's brand teal (#5bbad5) darkened in lightness only, from 2.2:1 to 4.9:1 against the widget's white text. The logo's electrodes move from orange to nemar.org's pale gold (#f4d06b), the site's treatment of the mark on a dark ground. Tests keep both colors at 4.5:1 and every other community without a bubble color.
Contributor
Preview Deployment
This preview will be updated automatically when you push new commits. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Gives NEMAR's widget nemar.org's look, and adds the one widget setting that needed: the reader's own message bubbles can now take a community color. No other community's widget changes.
What changed
user_bubble_color, a new optional widget setting (WidgetConfig, the/{community}and/communitiesresponses, and the widget). The bubbles were fixed at the platform blue whatevertheme_colorsaid. It is its own key, never derived fromtheme_color, so a community that sets only a theme (FieldTrip, MNE) renders exactly as before. It is validated as#RRGGBBon the server and again in the widget.theme_coloranduser_bubble_color#257a92. That is nemar.org's--brand-teal(#5bbad5) darkened in lightness only: the widget draws white text on both, and the brand teal itself is 2.2:1 against white, below the 4.5:1 body text needs.#257a92is 4.9:1.#f4d06b), which is how the site draws the mark on a dark ground. The brain stays white so it reads on the teal header.Checked in real Chrome with
widget_e2e.py --nemar: the header, the chat and send buttons, the permission gate's Run button and the reader's bubbles all resolve to#257a92, and the logo loads.For the release
The widget file changed, so its integrity hash did; the website's staging embed is re-pinned to this commit once it merges. The color and logo come from the server, so they apply to any embed as soon as this deploys.
Test plan
user_bubble_coloraccepts a hex color and rejects others;theme_coloralone adds no bubble color toresolve()./communitiesreturns a bubble color for NEMAR only, and none for every other community.uv run pytest -m "not network": 2726 passed; the one failure is the known test_version_shows_version fails locally and passes in CI, because rich colorizes on a TTY #434.ruff checkandruff format --checkclean.test-widget-tools.js226 of 226;build-runtime-bundle.js --checkcurrent (the bundle is unchanged).