-
Notifications
You must be signed in to change notification settings - Fork 266
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
Day view #247
Day view #247
Conversation
Codecov Report
@@ Coverage Diff @@
## master #247 +/- ##
==========================================
+ Coverage 46.98% 56.18% +9.19%
==========================================
Files 12 12
Lines 996 1196 +200
Branches 179 214 +35
==========================================
+ Hits 468 672 +204
+ Misses 461 460 -1
+ Partials 67 64 -3
Continue to review full report at Codecov.
|
Tried breaking it down the most, but the last one is just a big commit, or it wouldn't make sense. Sorry guys heuaheuha |
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 looking great already. A couple notes though:
- We need to know where the icon came from to give proper credit, unless you made it :D. I think I'd go with something like this: https://www.flaticon.com/free-icon/minimize_2749251?term=minimalism&page=1&position=61 or similar.
- The preferences window is, for some reason, not wide enough now, and one of the days is dropping to a second line.
- Also on the preferences window, it became long enough to have a scrollbar. I think we aim to have it show every option on pop-up, unless it becomes too large.
- I don't know what to do with the "hide working-days" option when it's in the day view.
- We should add some testing to the new preference
Switched the icon with the one you sent :) Finally, I'll add some tests later. |
Tests added, similar to the ones for the month calendar, and about the instance change. |
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 looks great. I'm a bit divided over the tests though, because it seems like it duplicates a lot of other tests, but I don't know what to think about them right now.
Ah! You'd also need to please add a line (sorted) about this new feature on |
I have to take a look since it looks like the punch button is getting more than one click event after messing around with the calendar. |
Maybe when you switch days it's registering the punch again? |
Fixed the punch issue by throwing the logic outside. |
And done :) Now it starts small if set to Day view and not maximized. |
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 awesome!
@tupaschoal, do you have any other consideration on this? |
No, merge it! |
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 like it needs to be rebased @araujoarthur0
Rebased :) |
…ow.resize on main window
Related issue
#96 Minimalist View
Context / Background
This PR is adding a Day View to the calendar, which focuses the view to just one day, making it a "minimalist" version of sorts.
What change is being introduced by this PR?
There is a new DayCalendar class based on the original Calendar class, for this to work. I'm using the same infrastructure and adding a Factory class to be able to instantiate correctly the different Calendar classes.
The view of the new calendar is no longer based on tables: I chose flexbox instead of tables to be able to change the size of the elements in a way that is not tied to rows and columns in a table.
The "view" type is now a new preference: month and day options.
One can switch through the preferences menu, or through the new switch button on the top left of the calendar.
How will this be tested?
Ran tests, and expect daily testing on the dev channel.