Skip to content

fix(settings): keep the saved font size when the page is reloaded - #26399

Merged
ramonlsouza merged 1 commit into
bigbluebutton:v4.0.x-developfrom
imdt-claudiop:fix/font-size-kept-after-reload
Nov 4, 2026
Merged

ramonlsouza merged 1 commit into
bigbluebutton:v4.0.x-developfrom
imdt-claudiop:fix/font-size-kept-after-reload

Conversation

@imdt-claudiop

Copy link
Copy Markdown
Contributor

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 (or mobileFontSize) 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.fontSize when 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-issue tag 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

  1. Join a meeting, open Settings > Application, increase the font size and save.
  2. Reload the page: the page keeps the saved size (before this change it went back to 14px on desktop).
  3. In a new browser session with nothing saved, the client still starts at desktopFontSize (14px) on desktop and mobileFontSize (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):

Font size before and after the fix

Evidence in the video:

  • Before (v4.0.x-develop): size saved at 18px - 00:08; after the reload the page is back at 14px - 00:25
  • After (this PR): size saved at 18px - 00:39; after the reload the page keeps 18px - 00:55

More

  • v3.0.x-develop has the same lines in layout/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.
  • No documentation change: the docs do not describe this startup behavior.

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.
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The 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 @known-issue tag.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: tainan404, antobinary

Merge Risk: Minimal · up to b6d1c

The change restores saved font-size selection after reload. No actionable merge-blocking risk is established; merge after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title names the main change: the saved font size is kept when the page reloads. It matches the observer change and the removed known-issue tag in the Playwright test. The fix(settings) prefix is a…
Description check Passed The description states the problem (the saved font size reverts to the default on reload), the cause (the layout observer always applies desktopFontSize or mobileFontSize at startup), and the fix (use…
Linked Issues check Passed [#26129] Requirement: after a reload, the page uses the saved font size from Settings > Application, and uses the desktop or mobile default only when no size is saved. The diff at head changes `bigblu…
Out of Scope Changes check Passed The reviewed changes are two files. The observer change is limited to the font size selection in the startup effect. It adds a comment and changes the fallback logic. It does not alter other layout st…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Title check

Explanation

The title names the main change: the saved font size is kept when the page reloads. It matches the observer change and the removed known-issue tag in the Playwright test. The fix(settings) prefix is a conventional commit type and does not affect the assessment.

Full details: Description check

Explanation

The description states the problem (the saved font size reverts to the default on reload), the cause (the layout observer always applies desktopFontSize or mobileFontSize at startup), and the fix (use the saved application.fontSize when set). It also explains the test change, the linked issue, and how to verify the change. This directly matches the changeset.

Full details: Linked Issues check

Explanation

[#26129] Requirement: after a reload, the page uses the saved font size from Settings > Application, and uses the desktop or mobile default only when no size is saved. The diff at head changes bigbluebutton-html5/imports/ui/components/layout/observer.tsx (base to head). The fontSize value now prefers Settings.application.fontSize and falls back to isMobile() ? MOBILE_FONT_SIZE : DESKTOP_FONT_SIZE. The same value sets document.getElementsByTagName('html')[0].style.fontSize and feeds SET_FONT_SIZE through parseInt(fontSize.slice(0, -2), 10). This matches the suggested fix in the issue. Settings is the singleton obtained in the same effect, so the change reads the saved value. The test Font size kept after reload in bigbluebutton-tests/playwright/options/options.spec.ts drops its @known-issue tag, which covers the automated test part. Not verified: I did not run the Playwright test. I did not confirm that the Settings singleton is hydrated from storage before this effect runs, or the default value of application.fontSize. The PR author reports both. No unmet coding requirement is found in the code.

Full details: Out of Scope Changes check

Explanation

The reviewed changes are two files. The observer change is limited to the font size selection in the startup effect. It adds a comment and changes the fallback logic. It does not alter other layout state. The test change removes the @known-issue tag and its explanatory comment for the test that covers #26129. The test call and issue link are unchanged. Both changes connect directly to #26129. The PR description states that no documentation change is included and that 3.0 is not changed. Those statements match the diff, which touches only 4.0 code paths. The PR description says the test joins the per-PR gate. The diff shows only the tag removal. The gate itself is configured outside the reviewed diff, so that claim is not verified here. This does not affect the scope assessment because it is not an out-of-scope change.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 602402e9-83d9-43dd-a70d-1bc4c70853b7
Commits

Reviewing files that changed from the base of the PR and between 482c119 and b6d1c2e.

Files selected for processing: 2
  • bigbluebutton-html5/imports/ui/components/layout/observer.tsx
  • bigbluebutton-tests/playwright/options/options.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@ramonlsouza ramonlsouza added this to the Release 4.0 milestone Nov 4, 2026
@ramonlsouza
ramonlsouza self-requested a review November 4, 2026 13:30
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

✅ Automated tests have passed!

@ramonlsouza
ramonlsouza merged commit 8237787 into bigbluebutton:v4.0.x-develop Nov 4, 2026
37 checks passed
antobinary added a commit that referenced this pull request Nov 6, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The font size chosen in Settings is lost when the page is reloaded

2 participants