Use browser's font size instead of hardcoded 16px
as root font size (#12246)
* WIP Use browser font size instead of hardcoded 16px * Add font migration to v3 * Remove custom font size input * Use a dropdown instead of a slider * Add margin to the font size dropdown * Fix `UpdateFontSizeDelta` action typo * Fix `fontScale`in `Call.ts` * Rename `baseFontSizeV3` to `fontSizeDelta` * Update playwright test * Add `default` next to the browser font size * Remove remaining `TODO` * Remove falsy `private` * Improve doc * Update snapshots after develop merge * Remove commented import
This commit is contained in:
parent
36a8d503df
commit
6d55ce0217
17 changed files with 453 additions and 366 deletions
|
@ -107,9 +107,11 @@ export enum Action {
|
|||
MigrateBaseFontSize = "migrate_base_font_size",
|
||||
|
||||
/**
|
||||
* Sets the apps root font size. Should be used with UpdateFontSizePayload
|
||||
* Sets the apps root font size delta. Should be used with UpdateFontSizeDeltaPayload
|
||||
* It will add the delta to the current font size.
|
||||
* The delta should be between {@link FontWatcher.MIN_DELTA} and {@link FontWatcher.MAX_DELTA}.
|
||||
*/
|
||||
UpdateFontSize = "update_font_size",
|
||||
UpdateFontSizeDelta = "update_font_size_delta",
|
||||
|
||||
/**
|
||||
* Sets a system font. Should be used with UpdateSystemFontPayload
|
||||
|
|
|
@ -17,11 +17,12 @@ limitations under the License.
|
|||
import { ActionPayload } from "../payloads";
|
||||
import { Action } from "../actions";
|
||||
|
||||
export interface UpdateFontSizePayload extends ActionPayload {
|
||||
action: Action.UpdateFontSize;
|
||||
export interface UpdateFontSizeDeltaPayload extends ActionPayload {
|
||||
action: Action.UpdateFontSizeDelta;
|
||||
|
||||
/**
|
||||
* The font size to set the root to
|
||||
* The delta is added to the current font size.
|
||||
* The delta should be between {@link FontWatcher.MIN_DELTA} and {@link FontWatcher.MAX_DELTA}.
|
||||
*/
|
||||
size: number;
|
||||
delta: number;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue