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

[dashboard] Implement a dark theme #3901

Merged
merged 4 commits into from
Apr 16, 2021
Merged

[dashboard] Implement a dark theme #3901

merged 4 commits into from
Apr 16, 2021

Conversation

jankeromnes
Copy link
Contributor

@jankeromnes jankeromnes commented Apr 12, 2021

Fixes #3806

How to test:

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Apr 13, 2021

🎰
/werft run

👍 started the job as gitpod-build-jx-dark-theme.3

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Apr 13, 2021

🎰
/werft run

👍 started the job as gitpod-build-jx-dark-theme.4

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Apr 13, 2021

🎰
/werft run

👍 started the job as gitpod-build-jx-dark-theme.5

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Apr 13, 2021

🎰
/werft run

👍 started the job as gitpod-build-jx-dark-theme.6

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Apr 13, 2021

🎰
/werft run

👍 started the job as gitpod-build-jx-dark-theme.8

@jankeromnes

This comment has been minimized.

@jankeromnes jankeromnes requested a review from gtsiolis April 13, 2021 07:55
@jankeromnes jankeromnes force-pushed the jx/dark-theme branch 4 times, most recently from e010f5e to 73a39fc Compare April 13, 2021 11:50
@jankeromnes jankeromnes marked this pull request as ready for review April 13, 2021 12:05
@meysholdt
Copy link
Member

Can we add a "System" option to "Preferences" -> "Color Schema" (like Vercel does it)?

Or do it like Slack does it?
image

I would love this because macOS changes my desktop to "light" every morning and to "dark" every eventing (setting: "auto") and I would love Gitpod to blend in.
image

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Apr 13, 2021

Can we add a "System" option to "Preferences" -> "Color Schema" (like Vercel does it)?

Sure. The value already defaults to your System preference, but we could add an extra option that removes any forced theme:

  • Light --> localStorage.theme = 'light'
  • Dark --> localStorage.theme = 'dark'
  • System/OS/Auto --> localStorage.removeItem('theme')

@gtsiolis
Copy link
Contributor

gtsiolis commented Apr 13, 2021

Strong vote for adding a system default option! This was already the plan! 🌙

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Apr 13, 2021

Strong vote for adding a system default option! This was already the plan! 🌙

Alrighty, done! ✅

@jankeromnes jankeromnes force-pushed the jx/dark-theme branch 4 times, most recently from 78565cc to 4c2ce5f Compare April 14, 2021 16:19
@svenefftinge
Copy link
Member

svenefftinge commented Apr 15, 2021

/werft run

👍 started the job as gitpod-build-jx-dark-theme.20

@gtsiolis
Copy link
Contributor

gtsiolis commented Apr 15, 2021

Taking a first second look at this now! 👀

@jankeromnes
Copy link
Contributor Author

I think the biggest remaining items here are the inputs (e.g. in Account and in the "New Env Variable" modal).

What should inputs look like? Still like this?

Screenshot 2021-04-15 at 15 51 11

@gtsiolis
Copy link
Contributor

gtsiolis commented Apr 15, 2021

These are the initial specs for the inputs which are using a slightly different stroke (border color and width) on the product right now. For example, we decided to go for 1px border width for now. However, enabled and disabled state colors should be good to use as is.

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Apr 15, 2021

Update: Styled all inputs + other minor improvements. Starting to run out of things that don't look awesome. 😇

Would love to merge this soon 🚀 because the PR touches many places in the UI and thus has a high risk of conflicts.

@gtsiolis
Copy link
Contributor

gtsiolis commented Apr 15, 2021

Thanks for resolving the conflicts and updating the input styles @jankeromnes! 🙏

Looks good, getting better and better. 🌟

Will take another look now with an old fashioned on the side. 🥃

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

Thanks for pushing this through the finish line @jankeromnes! 🏁

Left a few comments below covering most of the pages. Once we have these changes in place we can continue tackling the rest of the product. 😅

Cross-posting here for visibility that the amazing @aledbf is removing tailwind.output.css in #3830. Maybe we should add this file to .gitignore but this is certainly out of the scope of this PR.

components/dashboard/src/components/Menu.tsx Outdated Show resolved Hide resolved
components/dashboard/src/index.css Outdated Show resolved Hide resolved
components/dashboard/src/index.css Outdated Show resolved Hide resolved
@@ -728,7 +728,7 @@ function ManageTeamModal(props: {

return (<Modal visible={true} onClose={props.onClose}>
<h3 className="pb-2">Manage Team</h3>
<div className="border-t border-b border-gray-200 mt-2 -mx-6 px-6 py-4 space-y-2">
<div className="border-t border-b border-gray-200 dark:border-gray-700 mt-2 -mx-6 px-6 py-4 space-y-2">
<p className="pb-4 text-gray-500 text-base">Add members using their username prefixed by the Git Provider's host.</p>

<div className="overscroll-contain max-h-96 overflow-y-auto">
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Can we set the scrollbar shadow to dark everywhere when using dark theme to avoid having scrollbars pop up when having scrollbars visible? See css-scrollbar.

Screenshot 2021-04-15 at 9 00 41 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gtsiolis On my mac, all scrollbars are native to the OS (whether in Chrome or Firefox, I can't seem to change anything about their style, but in fact they always look just right whether in light theme or dark theme).

Which OS was this screenshot taken on? Also, does the example from https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-color work there? (On my mac, the MDN example shows always the same native scrollbar in Firefox, and the example widget doesn't even load in Chrome).

Copy link
Contributor

@gtsiolis gtsiolis Apr 16, 2021

Choose a reason for hiding this comment

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

@jankeromnes this is only shown when you have scrollbars always enabled, see relevant docs. Running macOS 10.15.7. See also relevant article on scrollbars. 👀

Copy link
Contributor Author

@jankeromnes jankeromnes Apr 16, 2021

Choose a reason for hiding this comment

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

Good suggestion but needs further research. Leaving as follow-up. 😇

EDIT: #3981

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for opening the follow-up issue, @jankeromnes! 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯 💯

components/dashboard/src/workspaces/WorkspaceEntry.tsx Outdated Show resolved Hide resolved
components/dashboard/src/settings/Integrations.tsx Outdated Show resolved Hide resolved
components/dashboard/src/components/ContextMenu.tsx Outdated Show resolved Hide resolved
components/dashboard/src/components/DropDown.tsx Outdated Show resolved Hide resolved
@filiptronicek
Copy link
Member

Screenshot 2021-04-13 at 11 36 53 Screenshot 2021-04-13 at 11 37 13

It looks like in the dark mode version the user is more driven to click on Go to Dashboard instead of Open Workspace, because the white button makes the contrast that much higher, can we do something like make it greyer or make the contrast lower in some way? This may be a bad idea but it just popped into my head looking at the designs.

/cc @jankeromnes

@gtsiolis
Copy link
Contributor

gtsiolis commented Apr 16, 2021

Thanks for noticing @filiptronicek! This will be improved with #3901 (comment). Keep in mind this is still work in progress. 🏁

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Apr 16, 2021

Wow, thank you for the best code review ever @gtsiolis. 🤯 💯 🥇 Will address your feedback this morning.

And indeed, good catch @filiptronicek! However, please note that the screenshots posted above are already very outdated. The view the latest state, please use the PR preview: https://jx-dark-theme.staging.gitpod-dev.com/workspaces/ (when it's available, that is -- the PR previews get dismantled after they're unused for 2 hours).

@filiptronicek
Copy link
Member

Cool, looks way better now, I found this look a bit weird (/admin/[users|workspaces]), but maybe it's intentional @jankeromnes:
image

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Apr 16, 2021

Cool, looks way better now

Thanks! All credits go to @gtsiolis 😇

I found this look a bit weird (/admin/[users|workspaces]), but maybe it's intentional @jankeromnes:

Ah, indeed, great catch! That's because inputs have a non-transparent background by default in dark theme. However, that looks weird for search bars, so I've specifically fixed the Workspaces search bar, but obviously forgot about the admin panel search bars.

Will make a more generic fix for search bars. 😁 Thanks!

@jankeromnes jankeromnes removed the request for review from svenefftinge April 16, 2021 15:11
Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dashboard] Dark theme
5 participants