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

chore: WDS elevation colors refinement #29618

Merged
merged 5 commits into from
Dec 14, 2023
Merged

Conversation

ichik
Copy link
Contributor

@ichik ichik commented Dec 14, 2023

Closes #29421

Summary by CodeRabbit

  • Style
    • Enhanced the visual contrast in Dark Mode by adjusting background elevation colors for improved readability.
    • Refined Light Mode background colors for better visual hierarchy based on lightness conditions.
    • Updated shadow effects on UI components to provide a more pronounced depth and focus.

Copy link
Contributor

coderabbitai bot commented Dec 14, 2023

Walkthrough

Walkthrough

The changes involve fine-tuning the theming system for a design system, specifically the dark and light mode themes. Adjustments were made to the lightness values in color schemes and shadow visibility in component styling. These refinements aim to improve the visual consistency and adaptability of UI components under different themes and conditions.

Changes

File Path Change Summary
.../theming/src/color/src/DarkModeTheme.ts
.../theming/src/color/src/LightModeTheme.ts
Adjusted lightness increments for bgElevation methods and refined conditional logic for modifying lightness values based on seedIsVeryLight.
.../design-system/widgets/src/testing/Elevation.tsx Changed boxShadow property value from "var(--box-shadow-1)" to "var(--box-shadow-3)".
.../theming/src/color/tests/LightModeTheme.test.ts Updated RGB color values being tested in various scenarios.

Assessment against linked issues

Objective Addressed Explanation
Lightness checks for seed properties The changes in DarkModeTheme.ts and LightModeTheme.ts directly address this objective by adjusting lightness values based on specific conditions.
Condition for visibility of shadows The change in Elevation.tsx directly addresses this objective by modifying the shadow effect applied to the component.
Extending to more semantics The provided summaries do not mention extensions to more semantics such as accent, neutral, etc.

Related issues

  • appsmithorg/appsmith#29421: The changes in the PR could be related to this issue as it discusses fine-tuning of the elevation system in the design system, which is similar to the adjustments made in the DarkModeTheme.ts and LightModeTheme.ts files. The PR might address considerations for lightness checks and shadow visibility, which are mentioned in the issue.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ?


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • You can reply to a review comment made by CodeRabbit.
  • You can tag CodeRabbit on specific lines of code or files in the PR by tagging @coderabbitai in a comment.
  • You can tag @coderabbitai in a PR comment and ask one-off questions about the PR and the codebase. Use quoted replies to pass the context for follow-up questions.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

@github-actions github-actions bot added Enhancement New feature or request Anvil Pod Issue related to Anvil project skip-changelog Adding this label to a PR prevents it from being listed in the changelog and removed Enhancement New feature or request labels Dec 14, 2023
KelvinOm
KelvinOm previously approved these changes Dec 14, 2023
@@ -794,12 +794,12 @@ describe("bdFocus color", () => {

it("should return correct color when hue is between 0 and 55", () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KelvinOm @jsartisan we're doing tests here for different hues, because we used to rotate focus hue based on accent, but we have removed that in favor of simpler logic. Should we just remove or simplify these tests?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need the tests for refactoring this code. Now, when we change the code, we need to make changes to the tests. This is expected.

@KelvinOm KelvinOm enabled auto-merge (squash) December 14, 2023 12:49
@KelvinOm KelvinOm merged commit db493eb into release Dec 14, 2023
21 of 22 checks passed
@KelvinOm KelvinOm deleted the chore/wds-elevation-refinement branch December 14, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Anvil Pod Issue related to Anvil project skip-changelog Adding this label to a PR prevents it from being listed in the changelog WDS team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: WDS elevation system fine-tuning
2 participants