Repository navigation
fix(settings): keep the saved font size when the page is reloaded - #26399
ramonlsouza merged 1 commit into
Conversation
The layout observer sets the page font size from public.app.desktopFontSize (or mobileFontSize) every time the client starts, so a size saved in Settings > Application was dropped on reload even though it is still in the browser's storage. Dark mode and the language, saved in the same dialog, survive the reload. Use the saved application.fontSize when there is one. It has no server default, so it is only set after the user saves a size; otherwise the desktop/mobile default applies as before. The layout context receives the same value. "Font size kept after reload" already expects this, so it drops its @known-issue tag and the comment explaining it.
|
No actionable comments were generated in the recent review. WalkthroughThe layout observer now uses the saved application font size when it is set. Otherwise, it selects the configured mobile or desktop font size. The “Font size kept after reload” Playwright test no longer has the Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk:
|
✅ Automated tests have passed! |
Brings v4.0.x-release at f31e684, the 4.0.2 release candidate (bigbluebutton-release 4.0.2, no tag yet), into v4.1.x-develop at 3e18924. The merge base is tag v4.0.1 (6e66d4f), merged into 4.1 by #26346. 356 commits (288 non-merge) from 60 pull requests and 1522 files come in; 1315 of those files are the new API conformance suite (bigbluebutton-tests/api-conformance, #26257). 51 files changed on both lines; 22 of them conflicted (21 content, 1 delete/modify). Version and build markers keep the 4.1 values: .gitlab-ci.yml keeps the 4.1 bbb-build image and bigbluebutton-release stays 4.1.0-alpha.1. Translated locales stay as on 4.1: eu.json and it_IT.json, the two that 4.0.2's Transifex sync (#26402) changed. en.json merged normally: 4.0.2 replaces originalAudioDesc with originalAudioSummary and originalAudioIdealFor (nothing reads the old key any more) and keeps the 4.1 audio section strings. docs/docs/new-features.md stays as on 4.1. Client: - client/main.html: the six stylesheet links take 4.0.2's ?v=VERSION; the 4.1-only theme-dark.css link after them is unchanged here. - Types and initial values of meetingClientSettings: the 4.1 stats thresholds (objects), without public.stats.help, which 4.0.2 removed (4eaee6b) together with its last reader. - bn-shared-notes/component.tsx: 4.0.2's equation and diagram blocks and floating-UI portal element (#26221), with the 4.1 theme prop (dark when the native dark theme is on). - layout/observer.tsx: the 4.1 getInitialFontSize(), which already prefers the saved font size; that is the fix 4.0.2 made inline (#26399). - generic-content/manager.tsx: the 4.1 effect that unregisters removed sidekick apps (b15701d). 4.0.2 also clears their badge and menu name there (#25998); that moves into the 4.1 effect in a follow-up commit. - Settings > Audio: the 4.1 section and device-test messages next to 4.0.2's voice isolation messages (#26095); styles import both defaultBorder and colorStandout. - Navigation sidebar badges: 4.0.2 moves the badge rules into common/notification-badge (#25998), so the sidebar button and sidebar styles take its fragments and keep the 4.1 dark-theme tokens elsewhere. The apps gallery badge styles file, deleted by 4.0.2 and only recoloured by 4.1, stays deleted. Lockfile: bigbluebutton-html5/package-lock.json was regenerated, not merged. The merged package.json equals 4.0.2's without darkreader, so the lock starts from 4.0.2's (npm drops darkreader and its rollup binaries), then npm update brings the six packages 4.1 had at a newer version up to it. No package is behind either parent, except the nested copy of @floating-ui/core and dom 1.8.0 that 4.1 carried under @floating-ui/react-dom; the merged lock uses one 1.7.6 copy, as 4.0.2 does. The other lockfiles merged cleanly and equal 4.0.2's. Docs: - configuration-files.md and release-testing.md are still CRLF on 4.0 and LF on 4.1. Merged with line endings normalised, they have no conflict. - customize.md: the 4.1 source link with 4.0.2's #get-post-create anchor. Playwright: core/elements.ts keeps both sides' audio selectors.
What does this PR do?
Keeps the font size chosen in Settings > Application when the page is reloaded.
At startup, the layout observer sets the page font size from
public.app.desktopFontSize(ormobileFontSize) every time, so a size saved in Settings was replaced by the default on reload. The saved value was still in the browser's storage; dark mode and the language, saved in the same dialog, already survived the reload.The observer now uses the saved
application.fontSizewhen there is one. That setting has no server default, so it is only set after the user saves a size; otherwise the desktop/mobile default applies as before. The layout context (SET_FONT_SIZE) receives the same value.The existing Playwright test "Font size kept after reload" already expected this behavior, so it drops its
@known-issuetag and the comment explaining it, and joins the per-PR gate.Closes Issue(s)
Closes #26129
Motivation
A user who increases the font size and saves gets the default size back after a reload, unlike the other settings in the same dialog.
How to test
desktopFontSize(14px) on desktop andmobileFontSize(16px) on a phone-sized viewport.Automated:
npx playwright test options/options.spec.ts -g "Font size kept after reload"fails before the change and passes after it.Not tested: a real mobile device (the phone-sized check used Chromium's Pixel 7 emulation), Firefox/Safari, and
userSettingsStorage: local.Evidence
Preview below - click the GIF to open the MP4 (higher quality, with controls):
Evidence in the video:
More
v3.0.x-develophas the same lines inlayout/observer.tsx, so 3.0 has the same issue; this PR targets 4.0 only, and a 3.0 port would be a separate PR.