-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Improve timepicker design, align to datepicker #7054
Conversation
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
@@ -206,7 +206,8 @@ nav { | |||
} | |||
|
|||
#navigation, | |||
.ui-datepicker { | |||
.ui-datepicker, | |||
.ui-timepicker.ui-widget { |
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 have an issue with this line iirc. This needs to have its own properties I think! :/
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.
Found it: #7007
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.
@skjnldsv I still don't understand what's the issue there.
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.
Ok, but this is separate from this pull request because it also applies to master. So let’s fix it in a separate PR, ok? :)
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.
Okay! :)
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.
@jancborchardt I think a vertical separator between hours and minutes should be added.
@@ -1070,6 +1070,72 @@ code { | |||
background: $color-main-background; | |||
} | |||
|
|||
|
|||
/* ---- jQuery UI timepicker ---- */ | |||
.ui-widget.ui-timepicker { |
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.
@jancborchardt you don't want to just add classes to exiting datepicker declarations (lines 990-1066)?
edit: ok, if @skjnldsv wants to keep those separated, it's fine by me.
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.
The structure is ever so slightly different that copying and adjusting seemed to make more sense. If you see a good way to combine it yes, however I think it’s better to separate it.
|
||
/* ---- jQuery UI timepicker ---- */ | ||
.ui-widget.ui-timepicker { | ||
margin-top: 10px !important; |
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.
Why is the !important
required? Is there some CSS downstream affecting this? if so, it should either be moved before styles.scss or declarations in it should be dropped
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.
Because in the header.scss we need to call it via this, to apply the popover styles:
#navigation,
.ui-datepicker,
.ui-timepicker.ui-widget
Cause .ui-timepicker on its own is actually used inside the widget again (for the hours block and minutes block). And then we need to use the same identifier again in the styles.scss.
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.
(It’s a bummer, I know, stupid structure they put there. ;) It looks quite funny if we only use .ui-timepicker in the header.scss ;D)
Codecov Report
@@ Coverage Diff @@
## master #7054 +/- ##
=========================================
Coverage 50.61% 50.61%
Complexity 24297 24297
=========================================
Files 1577 1577
Lines 92922 92922
Branches 1359 1359
=========================================
Hits 47036 47036
Misses 45886 45886
|
Seconded. |
I agree. Maybe more whitespace would already be enough to separate it better. |
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Btw, is it possible to cut the leading zeroes off? It looks very strange and unusual, "09" vs simply "9". |
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.
Looks great except a small opacity issue :)
core/css/styles.scss
Outdated
|
||
&.ui-timepicker-minutes:not(.ui-state-hover) { | ||
color: nc-lighten($color-main-text, 33%); | ||
opacity: .8; |
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.
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.
This is deliberate to separate the "more important" hours from the minutes, in addition to the separation line (it was there before).
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.
The opacity?
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.
Yes, the .8 opacity on the minutes.
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.
It feels strange to have two blue colors then
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
I also change the line 227 to fit the variable background (I know it's not related, but since we're at it... 😝) 😄 Line 227 in 153415c
|
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Fixed, let’s get it in :) |
Basically the equivalent of Redesign jQuery UI datepicker #5713 :), also ref "Include a timepicker into server" #6348.
Please review @nextcloud/designers @georgehrke @raimund-schluessler
I didn’t mess with any layout for now to not make it too big – but ideally we also improve that. This is mainly a quick fix for Nextcloud 13 because the timepicker is one of the only ugly jQuery UI parts left.
You can test in the Calendar app (positioning needs to be fixed there @georgehrke):
Before:
After: