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

Improve timepicker design, align to datepicker #7054

Merged
merged 4 commits into from
Nov 6, 2017

Conversation

jancborchardt
Copy link
Member

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:
screenshot from 2017-11-03 15-02-54

After:
screenshot from 2017-11-03 14-58-00

Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
@@ -206,7 +206,8 @@ nav {
}

#navigation,
.ui-datepicker {
.ui-datepicker,
.ui-timepicker.ui-widget {
Copy link
Member

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! :/

Copy link
Member

Choose a reason for hiding this comment

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

Found it: #7007

Copy link
Contributor

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.

Copy link
Member Author

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? :)

Copy link
Member

Choose a reason for hiding this comment

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

Okay! :)

Copy link
Contributor

@pixelipo pixelipo left a 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 {
Copy link
Contributor

@pixelipo pixelipo Nov 3, 2017

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.

Copy link
Member Author

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;
Copy link
Contributor

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

Copy link
Member Author

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.

Copy link
Member Author

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
Copy link

codecov bot commented Nov 3, 2017

Codecov Report

Merging #7054 into master will not change coverage.
The diff coverage is n/a.

@@            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
Impacted Files Coverage Δ Complexity Δ
lib/private/Security/CertificateManager.php 91.08% <0%> (-1%) 39% <0%> (ø)
lib/private/Server.php 83.41% <0%> (+0.12%) 125% <0%> (ø) ⬇️

@ChristophWurst
Copy link
Member

@jancborchardt I think a vertical separator between hours and minutes should be added.

Seconded.

@raimund-schluessler
Copy link
Member

@jancborchardt I think a vertical separator between hours and minutes should be added.

I agree. Maybe more whitespace would already be enough to separate it better.

Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
@jancborchardt
Copy link
Member Author

Added the vertical separator, good call:
screenshot from 2017-11-03 16-25-31
(Also tried it with a bit less height, only between the time selection and not the headings – didn’t look as good.)

@jancborchardt
Copy link
Member Author

Btw, is it possible to cut the leading zeroes off? It looks very strange and unusual, "09" vs simply "9".

Copy link
Member

@skjnldsv skjnldsv left a 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 :)


&.ui-timepicker-minutes:not(.ui-state-hover) {
color: nc-lighten($color-main-text, 33%);
opacity: .8;
Copy link
Member

Choose a reason for hiding this comment

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

capture d ecran_2017-11-04_13-22-44

Copy link
Member Author

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).

Copy link
Member

Choose a reason for hiding this comment

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

The opacity?

Copy link
Member Author

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.

Copy link
Member

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>
@skjnldsv
Copy link
Member

skjnldsv commented Nov 6, 2017

I also change the line 227 to fit the variable background (I know it's not related, but since we're at it... 😝) 😄
border-bottom-color: rgba(255, 255, 255, .97);

border-bottom-color: rgba(255, 255, 255, .97);

Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
@jancborchardt jancborchardt dismissed stale reviews from pixelipo and skjnldsv November 6, 2017 11:44

Fixed :)

@jancborchardt
Copy link
Member Author

Fixed, let’s get it in :)

@jancborchardt jancborchardt merged commit 0abb975 into master Nov 6, 2017
@jancborchardt jancborchardt deleted the timepicker-design branch November 6, 2017 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews design Design, UI, UX, etc. enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants