-
Notifications
You must be signed in to change notification settings - Fork 90
Storybook: generic, unified theme handling #19596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Moreover: - Storybook own font size pinpointed to fixed value - Storybook dark/light mode only for SB's own use, not affecting app theme
Jenkins BuildsClick to see older builds (11)
|
caybro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work overall, just some minor things here and there
| text: modelData | ||
|
|
||
| onClicked: root.paddingFactorRequested( | ||
| ThemeUtils["Padding" + modelData]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, does that work? 🤯 (converting a string to enum value)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just js. If sth can be accessed as ThemeUtils.PaddingXL it can be accessed as ThemeUtils["PaddingXL"] as well 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha... right... reminds me of the famous C array surprise 😆
int p[3] = {1, 2, 3};
assert(p[1] == 1[p]); // OK; exactly the same
What does the PR do
This PR adds controls to manipulate theme on every Storybook page in separation. The settings are persisted per page. Can be also reset to default values.
Moreover:
Affected areas
StorybookArchitecture compliance
My PR is consistent with this document: QML Architecture Guidelines
Screencapture of the functionality
Screencast.from.16.12.2025.13.16.30.webm