-
Notifications
You must be signed in to change notification settings - Fork 240
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
Add colors datepicker, focus day when navigating #533
Add colors datepicker, focus day when navigating #533
Conversation
@tbille, thanks for your PR! By analyzing the history of the files in this pull request, we identified @georgehrke, @raghunayyar and @tcitworld to be potential reviewers. |
@tbille Thx a lot for this pull request! :) Looks really cool! 🎉 :)
👍 As discussed in the issue
This was actually the expected behavior for me, but let's open this up for discussion.
Awesome! Much appreciated. |
css/app/datepicker.css
Outdated
#datepicker table tbody tr.uib-weeks td:last-child button { | ||
background-color: rgba(240, 240, 240, .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.
I didn't test this yet, but I think this will only work for US. What if you set your locale e.g. to german, where the week starts on monday? I guess Monday and Sunday will be shown a little darker
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.
true, my work environment is set in US. This should be changed to work also with an European environment.
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'm not sure this approach will work for both locales.
Maybe we have to add another class to the date picker element, that says whether the week starts on Sunday or Monday.
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 it can be done in the function getDayClass
of the datepickerController
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.
done, now a class is added for everyday weekend days: weekendHilight
4b14da6
to
c3475b3
Compare
Yeah, I’d also say it’s expected behavior. Great work @tbille! :) |
Just one point of feedback: In that datepicker there instead of giving the weekend full grey background, I would rather grey out the numbers. Otherwise it’s way too much visual load. :) |
css/app/datepicker.css
Outdated
@@ -89,6 +89,14 @@ | |||
border-left: 0; | |||
} | |||
|
|||
.todayHilight { |
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.
Also please use class naming like: .highlight-today
and .highlight-weekend
. :)
I was working on a new datepicker design and since I made sure it works with the calendar datepicker too, how about we use the same design there? See nextcloud/server#5691 (comment) |
c3475b3
to
cd92ac9
Compare
@jancborchardt I applied your mockup on the datepicker, here how it looks like: Shall we apply the same style for the buttons month/weeks/day? |
Very nice! Looks good and I'd merge it. Cc @pixelipo since he just works on the date picker in core. The week/month/today buttons should stay like this. :) |
Looks great! I've only got two comments:
|
Right, agree with @pixelipo. Also, the selected date font should be bold. :) |
cd92ac9
to
c86235e
Compare
@jancborchardt @pixelipo WDYT?
|
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.
Great stuff! :)
css/app/datepicker.css
Outdated
@@ -89,27 +89,35 @@ | |||
border-left: 0; | |||
} | |||
|
|||
#datepicker table tbody tr.uib-weeks td:last-child button { | |||
border-right: none; | |||
.today-hilight { |
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.
Just one thing: Can you use the class exactly as I said in my previous comment:
.highlight-today
(Proper english and also the correct order, as we use .highlight-weekend too)
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.
done
css/app/datepicker.css
Outdated
color: #c7c7c7; | ||
} | ||
|
||
.weekend-hilight button { |
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.
Same here, please call the class
.highlight-weekend
(Proper english and also the correct order, as we use .highlight-today too)
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.
done
} | ||
|
||
#datepicker table tbody button { | ||
max-width: 34px; /* Hack for Firefox for overflowing tables */ | ||
} | ||
|
||
#datepicker table tbody button.active { | ||
background-color: rgba(240, 240, 240, .9); | ||
border-radius: 50%; | ||
background-color: #0082c9; |
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 Can apps use scss too?
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, they can.
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.
they should :) , but it should be in another issue.
It would be much easier to 'debug css' and to adapt the apps to the nextcloud themes
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.
@georgehrke we migrated Deck to SCSS recently: nextcloud/deck#219
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.
@georgehrke we migrated Deck to SCSS recently: nextcloud/deck#219
This looks wrong, because it doesn't use the scss engine from the Nextcloud server. Hence it won't update the CSS when the admin changes the theme
Nevermind
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.
they should :) , but it should be in another issue.
Yes :)
I would vote to merge this now and fix the scss / primary color issue in a follow up PR :)
c86235e
to
3b13b7c
Compare
css/app/datepicker.css
Outdated
@@ -89,27 +89,35 @@ | |||
border-left: 0; | |||
} | |||
|
|||
#datepicker table tbody tr.uib-weeks td:last-child button { | |||
border-right: none; | |||
.hilight-today { |
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.
As mentioned previously by @jancborchardt - this should be .highlight-today
(spelling)
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.
small mistake.
Done
css/app/datepicker.css
Outdated
color: #c7c7c7; | ||
} | ||
|
||
.hilight-weekend button { |
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.
As mentioned previously by @jancborchardt - this should be .highlight-weekend
(incorrect spelling)
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.
Done
Signed-off-by: Thomas Bille <contact@tbille.fr>
3b13b7c
to
2164127
Compare
Very nice! Looks good and I'd merge it. (#533 (comment))
Great work everyone, our new datepicker is awesome! :) |
Proposition for this issue: #513
Add grey color to the week-ends and yellow color to the current day (today).
Bug fix: when changing month the selected day was the same as the current day. For example if the current day is 10th of July, when I changed month it was focusing the 10th of August.
This is fixed, now the first day of the month and the week is selected.
Tests: This pull-requests adds the missing tests on the DatepickerController.