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

[WIP] Advanced calendar component (issue#852) #100

Open
wants to merge 42 commits into
base: master
Choose a base branch
from

Conversation

Seal98
Copy link
Contributor

@Seal98 Seal98 commented Jun 9, 2017

First commit of changes for "Add event" calendar view.
Added:
-new Date field for End event Date,
-radio group to select repeat period,
-panels to set parameters for monthly and yearly events,
-tooltips,
-auto added to event description type of event which is selected to be created.
For testing purposes:
-creation by default 2 events with selected date and date + 1 day.
-added hardcoded text in the second Event name for testing purposes.

Some string values in the source code are hardcoded yet.

 
removed one alert from calendar view
Pom xml changed for local rub
 
Added to commit 2 files CalendarEventPresenter and PersonalEventService. 
Changes for correct work Add new Event and Edit existing event Views.
Early were issues with correct showing radiogroups in Create new Event
after some event was edited. As well as was issue field validation on 
GUI when saving edited event and error from backend due to null values
start and end event time fields.
 
Changes in 2 files: CalendarEventPresenter and CalendarEventView 
Implemented functionality 'Add daily events' - now repeating daily
 events can be created.
 
Changes in 1 file: CalendarEventPresenter.
Implemented functionality 'Add weekly events' - now repeating weekly
 events can be created.
@osarrat
Copy link
Member

osarrat commented Jun 16, 2017

Hi @Seal98 ,

Some feedbacks on your work :

  • good ! you makes small frequent commits, it is a good habit to follow
  • careful : you can see that your pull request is currently breaking both the Travis and Codacy checks. Before continuing your coding, you should read their Details report and fix what must be fixed
  • finally, each commit must have a single different title, read the Contribution rules on that matter :)

Have a nice day !

Seal98 added 24 commits June 21, 2017 22:01
 
Implemented functionality 'Add monthly events' 'Same date'.
With next event date correction if last date of next month less than
date of first event (f.e. first event is 31st January next will be 
28th February and next 31st March
Changed pom.xml to avoid too big log
 
Implemented functionality 'Add monthly events' with 'Same DAY of a week'.
Next event date is corrected to be the same day of a week as the day of
week of a first event of the event series.
 
Implemented functionality 'Add monthly events' 'Same Date of week'.
Next event date corrected if day of week of next month not the same as a
daye of week of first event (f.e. first event is on Monday the event on
Next month will also on Monday)
 
Implemented functionality 'Add monthly events' with:
1)'Same DAY of an YEAR' : Next event date is corrected to be the same
 day of a week as the day of week of a first event of the event series.
2)'Same DATE of an YEAR' Next event date is corrected to last month day
 (f.e. if first event created for 29 Feb 2020 next event will be
 28 Feb 2021 etc)
 
Refactoring of CalendarEventPresenter class
 
Refactoring#2 of CalendarEventPresenter class. Try to simplify method:
' onSaveAction() has an NPath complexity of 216'
 
Refactoring#3 of CalendarEventPresenter class.
'Avoid really long methods. public void onPageRequest'
'Avoid unused local variables such as 'calNextEventStartTime'
 
Refactoring#4 of CalendarEventPresenter class.
Commented out unused methods and variables
 
Refactoring#5 of CalendarEventPresenter class.
Commented out unused variables
 
Refactoring#6 of CalendarEventPresenter and CalendarEventView classes.
+ fix to hide end event date filed on EditView
To provide event chain functionality: 
1. added two new fields (referenceId and eventtype) into the database
2. changed java classes to provide the generation of the reference ids
3. added functionality to remove events chain by one click
(Delete chain link in Calendar view)
 
Implemented changes to improve performance of delete chain 
functionality. Fixed issue with refreshing calendar view after chain
deletion.
Fixes: 
adding the information into database fields after the event editing
Refactoring and cleaning up java code
 
Applied refactoring to:
-avoid unused method parameters
-avoid duplicated code blocks
-avoid debug alert messages
Implemented preliminary functionality to create weekly series 
multi-days events.
Implemented the creating of weekly multi-day event (with the listBox)
Implemented the creating of Monthly and Yearly multi-day 
event (with the listBox)
New fields were added for each type of the event
Adding the event for several days into the database
as a single event for several days (for Weeklt type)
The same for other types of events
 
Made changes to 
-create in database day multi day events as single event (one record)
-show full day multi day events as single long event on monthly calendar
view
 
Implemented: 
-on the Monthly calendar view are shown Full day events. If number of
events exceeds limit then anchor to weekly 
calendar view is shown with counter of all events in the day.
-the anchor has tool tip with detailed information 
-added tool tip to Full day event with detailed information
-on the Weekly calendar view are shown all Full day events in the week. 
The events are shown one under the other without overlapping.
…and weekly calendar views Implemented: -on the Monthly calendar view are shown Full day events. If number of events exceeds limit then anchor to weekly calendar view is shown with counter of all events in the day. -the anchor has tool tip with detailed information -added tool tip to Full day event with detailed information -on the Weekly calendar view are shown all Full day events in the week. The events are shown one under the other without overlapping.
Adding non-fulday events for several days into the database using
only one road
Code cleaning. Delete chain link is hided after clicking on the 
once event
Implemented changes to show non full day events (hour-events)
 for the case when Date end is after Date start (multi-day events).
Removed adding series event counter info to event description
(like "Weekly event 1 of 2").
Applied fixes for some issues reported by Codacy code checker.
Implemented:
-display Multi-day "hour interval" events (recurring weekly, monthly,
 yearly) with style different from style of Full-day events 
and Single day "hour interval" events 
-possibility to change event type from Full-day to "hour interval" 
event for Multi-day and One-day events.
1)autofill the enddate with the startdate after the first time the 
start date field is filled
2)renamed "Start"/"End" "hour" into  "Start"/"End" "time" 
3)renamed "Delete chain" into "Delete all recurrences"
4)renamed "Daily"/"Weekly"/"Monthly"/"Yearly" "repeats details" 
into "Daily"/"Weekly"/"Monthly"/"Yearly" "repetition details"
@osarrat
Copy link
Member

osarrat commented Aug 24, 2017

Hi @Seal98 ,

A small important feedback : as I told you for your other Pull Request, add a space when typing "issue #824" in your commit title: typed as you did it, it won't be recognized by Mantis .

Good luck for the final stretch !

removed the fade to white on the presentation of fullday and
non-fullday events
 
Applied refactoring to:
-avoid unused method parameters
-avoid duplicated code blocks - moved to methods
-removed old debug alert messages
-avoid unused imports
-renamed some methods, variables, method parameters
 
Implemented:
-show "Hours multi day events" in style similar to "full day" events
in monthly and weekly views
-removed adding default descriptions to repetition events
-performed some code refactoring:
 renamed some methods, variables, method parameters etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants