-
Notifications
You must be signed in to change notification settings - Fork 2
Dark mode #12
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
Dark mode #12
Conversation
Uhmmmmmm.... I have some.. questions..???? |
Setting the |
components/ProfileButton.vue
Outdated
@@ -1,10 +1,24 @@ | |||
<template lang="pug"> | |||
.profile-button(:class="{ 'nuxt-link-active': linkActive }") | |||
.auth-pending(v-if="isAuthPending"): loading-spinner | |||
//- TODO: factor svgs out somehow! make it easier to use and change coclors dynamically |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be able to use the vue-svg-loader
option of @nuxtjs/svg
to get the desired behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds great.. but I just couldn't get it to work. Looks like once it's loaded it doesn't apply css anymore.. :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is caused by scoped styling and the loaded SVG not getting the correct data-
attribute. I can try to get it working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just change the svg's content e.g. using currentColor
and making the sign-in-out scale to its container element.
Another thing is that we could extract them into their own component that just has the raw svg in it's template .-.
d4d313c
to
d2ceb5c
Compare
d2ceb5c
to
d16fe0e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the -f
s can't quite get myself to make a new commit for every minor fix that I notice.. 😅
components/ColorModePicker.vue
Outdated
import { Vue } from "nuxt-property-decorator"; | ||
|
||
export default class ColorModePicker extends Vue { | ||
colorSchemes: { label: string; value: string }[] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure of the correct order..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say so 😁 at least it's consistent with similar view models (for example in InputRadioGroup.vue).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually meant the order of the colors bellow lol GitHub comments are hard :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I finally got around to take a thorough look. Overall dark-mode already looks amazing and I'm happy to discuss everything mentioned below!
Here are the things I noticed:
- The
apl-
colors where initially taken from the WWDC 2016 page, so don't really originate from the Apple HIG. I think since we only use the background color anyways, we should get rid of all of them and replace the background colors with our own semantic versions. - Additionally, maybe we can improve color naming a bit.. Removing all the
sch-
prefixes and use more semantic names in general. What I came up with for the iOS app is for examplebrandPrimary
andbrandSecondary
for the different shades of purple. At the same time, it would be great to get rid of all the dynamic color adjustments (lightColor
, ...) and just have predefined colors for all these cases. - The dark mode colors don't pop as much as their light mode counterparts. In the app, we use
rgb(165, 153, 255)
as the dark mode version of purple for example. While it might be a bit too much, I think in general the colors should be a little more vibrant in dark mode. - I don't really like the white shadows in dark mode. Instead we should use the concept of elevation and make items on top of others (secondary nav bar,
base-section
s, profile picture borders, ...) a lighter shade of gray. - Maybe we can improve the footer layout with the
ColorModePicker
a bit. I'm thinking of something more like developer.apple.com. Imprint, Privacy Policy, and Stats links on the left, and the color mode picker on the right. What do you think? - The rounded Edit Profile button has a different fill color on hover than the border color. I think they should be the same.
- The
+
icon in theInputImageMultiple
component is white. I can create an SVG instead, so we can color it like the user and sign-in-out icons. Same with theupload
icon in theInputImage
component.
components/ColorModePicker.vue
Outdated
import { Vue } from "nuxt-property-decorator"; | ||
|
||
export default class ColorModePicker extends Vue { | ||
colorSchemes: { label: string; value: string }[] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say so 😁 at least it's consistent with similar view models (for example in InputRadioGroup.vue).
hey, thanks for the review! ^^
tbh, I actually kinda like the
well, I found it to be really useful from time to time to have such simple modify functions. Especially with the already dynamic
Initially liked it. After implementing it (at least how I did it) it doesn't really feel that good. May both in the middle with a bit of padding?
Not quite sure what you mean with that.. 🤔
I mean as you say, they're already white and work great in dark. And in light it's good as it were. Up to you.. ^^ |
…+ use border instead of shadow in dark
df98017
to
f647912
Compare
Finally getting rid of the ugly temp-variables for the form-colors mixin
Remove unused configuration, using default options
* Replace vue-flatpickr with native date input Now we can always handle dates as numeric timestamps in UTC Co-authored-by: Moritz Sternemann <[email protected]>
# Conflicts: # components/inputs/InputDate.vue # package-lock.json # package.json
* implemented dark-mode functionality * darkMode: basic color invert + ajust apl-colors + fix transparent icons + add dark mapKit * adjust some colors + make svgs dynamically colorable * give colors more sematic names + adjust disabled base-button * fix `disabled` textfield color for webkit * load svg from file, with inherited css coloring * actually, just fix svg by 'inheretting' css from container * last fixes + added comments * Linting + make colors stand out more + more renaming + adjust footer + use border instead of shadow in dark * Always use dark App Store badge * Replace background colors with semantic versions from HIG * Adjust nav, color mode picker, and footer layout * introduce more separator, label and fill colors * Remove unused classes * Adjust Copyable and BaseButton styles with new colors * Wrap social icons on profile * Fix cta position in forms * Install using npm v8, add module augmentations for @nuxtjs/color-mode * Install node-sass v6 * Adjust design of status badges of ProfileSubmission * Replace sch-label variables with HIG semantic ones * Replace $sch-accent3 * Replace $sch-accent colors * Replace $form-border-color * Reduce color definition complexity by predefining commonly used adaptions * Fix btn-ctas in BaseForms * Replace node-sass with recommended Dart Sass Finally getting rid of the ugly temp-variables for the form-colors mixin * Use tertiary label color in title of text fields * Remove secondary sch colors, replace some with HIG colors * Surpress Sass warning for color name * Enable usage of Sass modules * Fix division warning * Introduce sch-purple-quarternary for age * Replace transparentize and darken with new color.scale function * Pointer cursor for ColorModePicker * The upload and add icons in image inputs * Move color-mode to runtime dependencies Remove unused configuration, using default options * fix: Edit profile when birthday changed (#14) * Replace vue-flatpickr with native date input Now we can always handle dates as numeric timestamps in UTC Co-authored-by: Moritz Sternemann <[email protected]> * chore(release): 3.18.4 * Increase contrast for upload- and plus-icon * Adjust color of header and profile dropdown Co-authored-by: Moritz Sternemann <[email protected]>
commit 74e7638 Author: Moritz Sternemann <[email protected]> Date: Fri May 6 15:54:14 2022 +0200 chore(release): 3.19.0-pre.13 commit a11a246 Author: Moritz Sternemann <[email protected]> Date: Fri May 6 15:54:09 2022 +0200 fix: Sentry attach commits automatically commit 44c4521 Author: Moritz Sternemann <[email protected]> Date: Fri May 6 15:45:56 2022 +0200 chore(release): 3.19.0-pre.12 commit 6a38798 Author: Moritz Sternemann <[email protected]> Date: Fri May 6 15:45:49 2022 +0200 ci: Ignore missing previous commit when publishing to sentry commit 20f5d94 Author: Moritz Sternemann <[email protected]> Date: Fri May 6 11:55:41 2022 +0200 chore(release): 3.19.0-pre.11 commit d088c56 Author: Moritz Sternemann <[email protected]> Date: Fri May 6 11:55:26 2022 +0200 feat: Only show years that have isHidden == 0 commit 11b78e8 Author: Moritz Sternemann <[email protected]> Date: Thu May 5 11:50:34 2022 +0200 chore(release): 3.19.0-pre.10 commit 87cc8f5 Author: Moritz Sternemann <[email protected]> Date: Thu May 5 11:50:26 2022 +0200 fix: Thumbnail video playbutton on hover commit eef2c56 Author: Moritz Sternemann <[email protected]> Date: Mon Apr 18 17:04:26 2022 +0200 chore(release): 3.19.0-pre.9 commit cab1446 Author: Moritz Sternemann <[email protected]> Date: Mon Apr 18 17:04:17 2022 +0200 feat: new submission social links commit 739296e Author: Moritz Sternemann <[email protected]> Date: Wed Apr 6 14:59:13 2022 +0200 fix: Proper responsive screenshot columns commit f14479e Author: Moritz Sternemann <[email protected]> Date: Sat Mar 26 22:05:59 2022 +0100 chore(release): 3.19.0-pre.8 commit 08e1fb2 Author: Moritz Sternemann <[email protected]> Date: Sat Mar 26 22:05:42 2022 +0100 feat: New screenshot thumbnail approach for submissions commit 5ea67c7 Author: Moritz Sternemann <[email protected]> Date: Sun Mar 20 22:01:19 2022 +0100 chore(release): 3.19.0-pre.7 commit 0e23f11 Author: Moritz Sternemann <[email protected]> Date: Sun Mar 20 20:32:35 2022 +0100 chore: Change privacy wording commit 909fb42 Author: Moritz Sternemann <[email protected]> Date: Sat Mar 19 23:34:28 2022 +0100 chore: Use VeeValidate standard changed property for screenshots commit 8ce5ce8 Author: Moritz Sternemann <[email protected]> Date: Sat Mar 19 23:34:08 2022 +0100 chore: Use more prominent color for social hover commit b7a3779 Author: Moritz Sternemann <[email protected]> Date: Sat Mar 19 23:33:31 2022 +0100 feat: Streamline Copyable design commit 6cd3788 Author: Moritz Sternemann <[email protected]> Date: Sat Mar 19 22:40:42 2022 +0100 feat: Hover state for social links commit c9da6b2 Author: Moritz Sternemann <[email protected]> Date: Thu Mar 10 23:55:45 2022 +0100 fix: Align social icon weights commit 1a0d696 Author: Moritz Sternemann <[email protected]> Date: Thu Mar 10 22:58:43 2022 +0100 chore(release): 3.19.0-pre.6 commit 21b04be Author: Moritz Sternemann <[email protected]> Date: Thu Mar 10 22:58:31 2022 +0100 fix: check vimeo videoId existance commit 61e5e62 Author: Moritz Sternemann <[email protected]> Date: Mon Mar 7 00:04:10 2022 +0100 chore(release): 3.19.0-pre.5 commit 1186bfa Author: Moritz Sternemann <[email protected]> Date: Mon Mar 7 00:04:02 2022 +0100 chore: Replace play icon with SF Symbol commit 92f58e0 Author: Moritz Sternemann <[email protected]> Date: Mon Mar 7 00:03:32 2022 +0100 feat: Add link icon to link thumbnails commit a2190a9 Author: Moritz Sternemann <[email protected]> Date: Sun Mar 6 17:12:11 2022 +0100 chore(release): 3.19.0-pre.4 commit 209b948 Author: Moritz Sternemann <[email protected]> Date: Sun Mar 6 17:12:05 2022 +0100 chore: Add video domains to CSP commit 7ce3721 Author: Moritz Sternemann <[email protected]> Date: Sun Mar 6 16:51:44 2022 +0100 chore(release): 3.19.0-pre.3 commit 7689416 Author: Moritz Sternemann <[email protected]> Date: Sun Mar 6 16:45:21 2022 +0100 feat: Always include year in profile URLs commit a9bacbc Author: Moritz Sternemann <[email protected]> Date: Sun Mar 6 16:00:45 2022 +0100 fix: Remove log from Vimeo thumbnail loading commit d2306af Author: Moritz Sternemann <[email protected]> Date: Sun Mar 6 15:55:37 2022 +0100 feat: Better title texts for social icons commit 8da71d2 Author: Moritz Sternemann <[email protected]> Date: Sun Mar 6 15:49:01 2022 +0100 feat: Display AppStore and GitHub links commit cbde6f2 Author: Moritz Sternemann <[email protected]> Date: Sun Jan 16 15:16:34 2022 +0100 fix: Adjust play icon spacing a bit commit e086549 Author: Moritz Sternemann <[email protected]> Date: Sat Jan 15 18:14:40 2022 +0100 feat: Display submission videos inline with screenshots Supports YouTube and Vimeo for now commit 9efd353 Author: Moritz Sternemann <[email protected]> Date: Sat Jan 15 00:32:58 2022 +0100 feat: Replace swiper with lightbox commit 6d6458f Author: Moritz Sternemann <[email protected]> Date: Fri Jan 14 11:52:17 2022 +0100 fix: Add missing space in scholarships blurb commit 4704a2f Author: Moritz Sternemann <[email protected]> Date: Fri Jan 14 11:42:40 2022 +0100 chore(release): 3.19.0-pre.2 commit 433e44d Author: Moritz Sternemann <[email protected]> Date: Fri Jan 14 11:40:50 2022 +0100 fix: Disable hover for disable text fields commit e57e21e Author: Moritz Sternemann <[email protected]> Date: Fri Jan 14 11:31:39 2022 +0100 refactor: Update mobile menu approach to fix some bugs commit ed0f53c Author: Moritz Sternemann <[email protected]> Date: Thu Jan 13 23:21:45 2022 +0100 feat: Use css colors for progress indicator commit bbb3636 Author: Moritz Sternemann <[email protected]> Date: Thu Jan 13 23:14:45 2022 +0100 feat: Use CSS colors for marks in maps commit 90b4409 Author: Moritz Sternemann <[email protected]> Date: Thu Jan 13 23:14:15 2022 +0100 fix: Load initial values from props in MKMarkerAnnotation commit d6d45f8 Author: Moritz Sternemann <[email protected]> Date: Thu Jan 13 22:32:24 2022 +0100 feat: Use minimal favicon commit 4d67fc7 Author: Moritz Sternemann <[email protected]> Date: Thu Jan 13 21:12:09 2022 +0100 fix: Load only approved years on Scholar profile commit 407e32e Author: Moritz Sternemann <[email protected]> Date: Thu Jan 13 22:32:50 2022 +0100 feat: Use SF social icons commit be9af15 Author: Moritz Sternemann <[email protected]> Date: Thu Jan 13 20:59:20 2022 +0100 feat: Improve sholarships blurb for one-time winners commit 274f247 Author: Moritz Sternemann <[email protected]> Date: Fri Jan 7 19:37:55 2022 +0100 fix: Add padding on imprint and privacy policy pages commit 013d072 Author: Moritz Sternemann <[email protected]> Date: Fri Jan 7 19:29:09 2022 +0100 fix: Use theme-color meta tags commit c72a349 Author: Moritz Sternemann <[email protected]> Date: Fri Jan 7 19:22:23 2022 +0100 fix: Footer scrolling and color picker layout on mobile commit 17c29c9 Author: Moritz Sternemann <[email protected]> Date: Fri Jan 7 17:41:05 2022 +0100 fix: Improve sch-purple-secondary for dark mode commit 742ac99 Author: Moritz Sternemann <[email protected]> Date: Fri Jan 7 17:38:43 2022 +0100 fix: Better dark mode brand colors commit d69b715 Author: Moritz Sternemann <[email protected]> Date: Tue Nov 30 17:03:46 2021 +0100 chore(release): 3.19.0-pre.1 commit 71cabc5 Author: Moritz Sternemann <[email protected]> Date: Tue Nov 30 16:58:34 2021 +0100 chore(release): 3.19.0-pre.0 commit 0047a78 Author: Henry <[email protected]> Date: Tue Nov 30 16:57:50 2021 +0100 feat: Dark Mode (#12) * implemented dark-mode functionality * darkMode: basic color invert + ajust apl-colors + fix transparent icons + add dark mapKit * adjust some colors + make svgs dynamically colorable * give colors more sematic names + adjust disabled base-button * fix `disabled` textfield color for webkit * load svg from file, with inherited css coloring * actually, just fix svg by 'inheretting' css from container * last fixes + added comments * Linting + make colors stand out more + more renaming + adjust footer + use border instead of shadow in dark * Always use dark App Store badge * Replace background colors with semantic versions from HIG * Adjust nav, color mode picker, and footer layout * introduce more separator, label and fill colors * Remove unused classes * Adjust Copyable and BaseButton styles with new colors * Wrap social icons on profile * Fix cta position in forms * Install using npm v8, add module augmentations for @nuxtjs/color-mode * Install node-sass v6 * Adjust design of status badges of ProfileSubmission * Replace sch-label variables with HIG semantic ones * Replace $sch-accent3 * Replace $sch-accent colors * Replace $form-border-color * Reduce color definition complexity by predefining commonly used adaptions * Fix btn-ctas in BaseForms * Replace node-sass with recommended Dart Sass Finally getting rid of the ugly temp-variables for the form-colors mixin * Use tertiary label color in title of text fields * Remove secondary sch colors, replace some with HIG colors * Surpress Sass warning for color name * Enable usage of Sass modules * Fix division warning * Introduce sch-purple-quarternary for age * Replace transparentize and darken with new color.scale function * Pointer cursor for ColorModePicker * The upload and add icons in image inputs * Move color-mode to runtime dependencies Remove unused configuration, using default options * fix: Edit profile when birthday changed (#14) * Replace vue-flatpickr with native date input Now we can always handle dates as numeric timestamps in UTC Co-authored-by: Moritz Sternemann <[email protected]> * chore(release): 3.18.4 * Increase contrast for upload- and plus-icon * Adjust color of header and profile dropdown Co-authored-by: Moritz Sternemann <[email protected]>
Add a dark mode theme.
@nuxtjs/svg
white: #000000
might be a bit confusing 😅