Skip to content
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

WRQ-1966: Storybook - Read custom colors from luna settings service #1610

Draft
wants to merge 16 commits into
base: develop
Choose a base branch
from

Conversation

adrian-cocoara-lgp
Copy link
Contributor

@adrian-cocoara-lgp adrian-cocoara-lgp commented May 14, 2024

Checklist

  • I have read and understand the contribution guide
  • A CHANGELOG entry is included
  • At least one test case is included for this feature or bug fix
  • Documentation was added or is not needed
  • This is an API breaking change

Issue Resolved / Feature Added

Implement custom theme feature to storybook
Running on webos environment: read and update colors with LS2Request
Running on PC: Added custom toolbars which render a built-in HTML color picker that updates components' style
https://storybook.js.org/docs/addons/writing-addons
https://storybook.js.org/docs/essentials/toolbars-and-globals

Resolution

Additional Considerations

Links

WRQ-1966

Comments

Enact-DCO-1.0-Signed-off-by: Adrian Cocoara [email protected]

Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.59%. Comparing base (c9c4d77) to head (1bf82ee).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1610   +/-   ##
========================================
  Coverage    81.59%   81.59%           
========================================
  Files          148      148           
  Lines         6673     6673           
  Branches      1986     1986           
========================================
  Hits          5445     5445           
  Misses         935      935           
  Partials       293      293           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

samples/sampler/.storybook/preview.js Outdated Show resolved Hide resolved
samples/sampler/.storybook/preview.js Outdated Show resolved Hide resolved
samples/sampler/colors-toolbar/ColorPicker.js Outdated Show resolved Hide resolved
samples/sampler/colors-toolbar/ColorPicker.js Outdated Show resolved Hide resolved
samples/sampler/colors-toolbar/CustomStoryDecorator.js Outdated Show resolved Hide resolved
samples/sampler/src/ThemeEnvironment/ThemeEnvironment.js Outdated Show resolved Hide resolved
@0x64
Copy link
Member

0x64 commented Jun 18, 2024

I believe that @enact/webos should be added as dependency in package.json of samplers.

@0x64
Copy link
Member

0x64 commented Jun 24, 2024

In general, I want to remove hard-coded color values as many as possible so that we need to take care of minimal parts when the default color is updated by design changes. Also, if our color generation/matching logic do not alter some colors from the default theme's colors, it looks better not to override them with the default values because Sandstone can use the default colors when nothing is specified in CSS variables.

@0x64 0x64 marked this pull request as draft July 11, 2024 05:04
@0x64
Copy link
Member

0x64 commented Jul 11, 2024

Good job! As we don't merge this PR right now, I converted this PR to a draft PR but it will be a good reference when we add a new features later. Thank you.

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.

3 participants