Skip to content

Conversation

@rubydong
Copy link
Collaborator

@rubydong rubydong commented May 28, 2025

Description

Update the styling of Create Index Modal components to handle dark/light theming

https://jira.mongodb.org/browse/CLOUDP-313986

Before

before.mov

After

<! --- https://github.com/user-attachments/assets/65052219-c266-47ce-be54-56da47066b09 -->

Screen.Recording.2025-06-03.at.6.29.51.PM.mov

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

@github-actions github-actions bot added the feat label May 28, 2025
@rubydong rubydong added the no release notes Fix or feature not for release notes label May 28, 2025
className={codeEditorStyles}
className={cx(
codeEditorStyles,
!darkMode && lightModeCodeEditorStyles
Copy link
Collaborator

Choose a reason for hiding this comment

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

in this case, i found it easier to default to the component's existing dark mode styles rather than apply new dark mode styling

className={indexSuggestionsLoaderStyles}
className={cx(
indexSuggestionsLoaderStyles,
!darkMode && indexSuggestionsLoaderLightStyles
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here

@waltertan12 waltertan12 marked this pull request as ready for review June 3, 2025 17:23
Copy link
Member

@Anemy Anemy left a comment

Choose a reason for hiding this comment

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

Can we update the subtitle color as well as the border color for the input and covered queries areas?
Screenshot 2025-06-03 at 2 08 37 PM

For border color in darkmode we usually use palette.gray.dark2
https://github.com/mongodb-js/compass/blob/205e0d95f012defc99454d79265b1d4055f29036/packages/compass-aggregations/src/components/pipeline-toolbar/index.tsx#L31C16-L31C34

@rubydong
Copy link
Collaborator Author

rubydong commented Jun 3, 2025

Can we update the subtitle color as well as the border color for the input and covered queries areas? Screenshot 2025-06-03 at 2 08 37 PM

For border color in darkmode we usually use palette.gray.dark2 https://github.com/mongodb-js/compass/blob/205e0d95f012defc99454d79265b1d4055f29036/packages/compass-aggregations/src/components/pipeline-toolbar/index.tsx#L31C16-L31C34

the design for border color is color.border.primary though https://www.figma.com/design/pFjIikzky8ACkISabtvhrH/CLOUDP-239367--Index-Guidance?node-id=1809-14262&t=VPtVMoJP2laSaWej-0

@Anemy
Copy link
Member

Anemy commented Jun 3, 2025

@rubydong We might want to check with design. I'm seeing two different border colors in those designs: the Input Index uses the primary border color, palette.gray.base, and the Covered Queries section uses the secondary color palette.gray.dark2. Should they be the same?

@waltertan12
Copy link
Collaborator

@rubydong We probably want to check with design. I'm seeing two different border colors in those designs: the Input Index uses the primary border color, palette.gray.base, and the Covered Queries section uses the secondary color palette.gray.dark2. Should they be the same?

good eye and ty for calling this out, @Anemy! i think it was intentional by design to have two different border colors, as this is also the case for light mode. i'll verify with them though

@waltertan12
Copy link
Collaborator

@rubydong We probably want to check with design. I'm seeing two different border colors in those designs: the Input Index uses the primary border color, palette.gray.base, and the Covered Queries section uses the secondary color palette.gray.dark2. Should they be the same?

good eye and ty for calling this out, @Anemy! i think it was intentional by design to have two different border colors, as this is also the case for light mode. i'll verify with them though

confirmed with design that there should be distinct border colors for input vs output. made updates and attached a new screencast

Copy link
Member

@Anemy Anemy left a comment

Choose a reason for hiding this comment

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

lgtm!

@waltertan12 waltertan12 merged commit 715ce44 into main Jun 4, 2025
59 checks passed
@waltertan12 waltertan12 deleted the CLOUDP-313986 branch June 4, 2025 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat no release notes Fix or feature not for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants