WEB-955: implement default font customization setting#3597
Conversation
|
Note
|
| Layer / File(s) | Summary |
|---|---|
Font preference persistence API src/app/settings/settings.service.ts |
SettingsService adds setFontFamily(font: string) method and fontFamily getter property to persist font preference to localStorage with 'Roboto' as default fallback. |
Settings form control and HTML binding src/app/settings/settings.component.ts, src/app/settings/settings.component.html |
SettingsComponent declares a concrete fonts list and fontFamily FormControl, initializes it from the service in ngOnInit, includes it in change tracking via trackChanges() observable, validates form state in hasFormChanged(), persists via service in submit(), and binds the template mat-select to the control using [formControl]. |
Web app initialization and alert handling src/app/web-app.component.ts |
WebAppComponent reads settingsService.fontFamily during ngOnInit and applies it to document.body.style.fontFamily. When a 'Settings Update' alert is received, the component re-reads and reapplies the saved font preference. |
Google Fonts stylesheet src/index.html |
Index HTML includes a new Google Fonts stylesheet link for Inter, Montserrat, Open Sans, and Outfit font families with specified weight variants. |
🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title clearly and specifically describes the main change: implementing a default font customization setting feature. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
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.
Comment @coderabbitai help to get the list of available commands and usage tips.
IOhacker
left a comment
There was a problem hiding this comment.
which browsers and OS platforms where used for the testing?
|
Tested on:
|
Description
Implemented the missing "Default Font" customization setting in the Settings view.
This change enables users to select and persist their preferred application font across sessions. The selected font is dynamically applied globally throughout the application at runtime.
The implementation includes:
Related issues and discussion
#WEB-955
Screenshots, if any
Before
Empty and non-functional Default Font dropdown.
After
Working Default Font selector with persisted global typography changes.
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
If you have multiple commits please combine them into one commit by squashing them.
Read and understood the contribution guidelines at
web-app/.github/CONTRIBUTING.md.Summary by CodeRabbit
New Features