Skip to content

Conversation

@tanmoyopenroot
Copy link
Contributor

@tanmoyopenroot tanmoyopenroot commented Apr 9, 2020

What kind of change does this PR introduce?

Bug fix #3796

What is the current behavior?

On changing to light theme Add dependencies modal doesn't pick up the light theme

What is the new behavior?

On Changing to light or dark theme appropriate colors are added to Add dependencies modal

What steps did you take to test this? This is required before we can merge, make sure to test the flow you've updated.

The testing was done visually.

  1. Select any light or dark theme from Color Theme under Preferences
  2. Click on Add dependency in Explorer tab
  3. Appropriate colors are added to Add dependencies modal

Light Theme
Screenshot 2020-04-09 at 11 21 21 AM

Dark Theme
Screenshot 2020-04-09 at 11 21 00 AM

Checklist

  • Documentation
  • Testing
  • Ready to be merged
  • Added myself to contributors table

@lbogdan lbogdan temporarily deployed to pr3865 April 9, 2020 05:55 Inactive
@lbogdan
Copy link
Contributor

lbogdan commented Apr 9, 2020

Build for latest commit 4d61a47 is at https://pr3865.build.csb.dev/s/new.

@CompuIves
Copy link
Member

CompuIves commented Apr 9, 2020

Thanks for this PR!! This looks very good visually, the only thing I notice is the border around the modal, would it be possible to remove that?


return (
<ThemeProvider theme={localState.theme.vscodeTheme}>
<ThemeProvider theme={localState.theme}>
Copy link
Contributor

@MichaelDeBoey MichaelDeBoey Apr 9, 2020

Choose a reason for hiding this comment

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

We need to make sure this doesn't break any modals other than the Search modal.

@siddharthkp
Copy link
Contributor

This looks very good visually, the only thing I notice is the border around the modal, would it be possible to remove that?

I think we have styles for that in the polyfill, can take it from here 👍

@MichaelDeBoey
Copy link
Contributor

MichaelDeBoey commented Apr 9, 2020

@siddharthkp The ThemeProvider has changed from @codesandbox/components to styled-components, so that's probably the cause of the border around all modals

@tanmoyopenroot This change also breaks opening the delete modal (both in a forked sandbox and on your dashboard).
Probably other modals too, but haven't tested that.

@tanmoyopenroot
Copy link
Contributor Author

Thanks for this PR!! This looks very good visually, the only thing I notice is the border around the modal, would it be possible to remove that?

I will try to fix it without breaking any other modals.

@tanmoyopenroot
Copy link
Contributor Author

@tanmoyopenroot This change also breaks opening the delete modal (both in a forked sandbox and on your dashboard).
Probably other modals too, but haven't tested that.

I will fix it by using ThemeProvider from @codesandbox/components

@siddharthkp
Copy link
Contributor

siddharthkp commented Apr 9, 2020

@tanmoyopenroot Would you be open to pair program on this bug? I can explain what we do in the ThemeProvider in @codesandbox/components

@tanmoyopenroot
Copy link
Contributor Author

tanmoyopenroot commented Apr 9, 2020

@tanmoyopenroot Would you be open to pair program on this bug? I can explain what we do in the ThemeProvider in @codesandbox/components

Sure

@siddharthkp
Copy link
Contributor

@tanmoyopenroot 👍 sent you an invite for slack

@lbogdan lbogdan temporarily deployed to pr3865 April 9, 2020 13:55 Inactive
@tanmoyopenroot
Copy link
Contributor Author

Dark Theme
Screenshot 2020-04-09 PM

Light Theme
Screenshot 2020-04-09 at 7 12 07 PM

.ais-Highlight-highlighted {
color: ${props => props.theme['button.hoverBackground']};
color: ${props => props.theme['button.hoverBackground']};
Copy link
Contributor

@jyash97 jyash97 Apr 10, 2020

Choose a reason for hiding this comment

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

How about using button.background. Currently, the highlighted text isn't visible properly in the light theme. And button.background goes in contrast with the background. Check the below screenshot:

Note: First suggestion is current styling and second suggestion is updated styling

Light Theme:
image

Dark theme:
image

Thoughts ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I and @siddharthkp had the same the discussion about the highlighted text issue.
And after using button.background the highlighted are visible now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will make the changes and push it.

Copy link
Contributor

@siddharthkp siddharthkp Apr 10, 2020

Choose a reason for hiding this comment

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

👋

short: this works, :shipit:!

I'd recommend using and to create a difference between highlighted text and normal text.

It's hard to make this modal to match the redesign of the editor without redesigning the parts of the modal with @codesandbox/components.

That's not something that should block this improvement though! I'd recommend merging this PR and continue the work which might take slightly longer to finish

@siddharthkp siddharthkp merged commit f85c752 into codesandbox:master Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Poor text contrast in the "Add dependencies" modal when using light themes

6 participants