Skip to content

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

Draft
adrian-cocoara-lgp wants to merge 16 commits into
developfrom
feature/WRQ-1966-1
Draft

WRQ-1966: Storybook - Read custom colors from luna settings service#1610
adrian-cocoara-lgp wants to merge 16 commits into
developfrom
feature/WRQ-1966-1

Conversation

@adrian-cocoara-lgp

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

Copy link
Copy Markdown
Contributor

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 adrian.cocoara@lgepartner.com

@codecov

codecov Bot commented May 14, 2024

Copy link
Copy Markdown

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.

Comment thread samples/sampler/.storybook/preview.js
Comment thread samples/sampler/.storybook/preview.js Outdated
Comment thread samples/sampler/colors-toolbar/ColorPicker.js Outdated
Comment thread samples/sampler/colors-toolbar/ColorPicker.js Outdated
Comment thread samples/sampler/colors-toolbar/CustomStoryDecorator.js
Comment thread samples/sampler/colors-toolbar/CustomStoryDecorator.js Outdated
Comment thread samples/sampler/src/ThemeEnvironment/ThemeEnvironment.js Outdated
Comment thread samples/sampler/colors-toolbar/CustomStoryDecorator.module.less Outdated
@SkylerBaek

Copy link
Copy Markdown
Member

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

Comment thread samples/sampler/utils/generateStylesheet.js Outdated
Comment thread samples/sampler/src/ThemeEnvironment/ThemeEnvironment.js Outdated
Comment thread samples/sampler/src/ThemeEnvironment/ThemeEnvironment.js Outdated
Comment thread samples/sampler/colors-toolbar/CustomStoryDecorator.module.less Outdated
@SkylerBaek

Copy link
Copy Markdown
Member

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.

@SkylerBaek
SkylerBaek marked this pull request as draft July 11, 2024 05:04
@SkylerBaek

Copy link
Copy Markdown
Member

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