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

List views #2476

Merged
merged 4 commits into from
Sep 3, 2020
Merged

List views #2476

merged 4 commits into from
Sep 3, 2020

Conversation

jean-gui
Copy link
Contributor

Description

This PR adds list views per week and month in addition to the day/week/month views. These views are also available to publicly shared calendars. Fortunately, FC5 already supports these views so there wasn't much to do.

Fixes #402

Note that these views only show events for the currently selected week/month. For example, if there's an event on 2020-08-19 (Wednesday) and another one on 2020-08-24 (Monday), only one will be displayed in the week list at once even though there's only 5 days separating them. This seems to be how FC5 works.

Also note that I literally learned about NC, FC and JS/Vue development just for this so I basically replicated what already existed for the other views without really trying to understand how they worked, and I may not be able to add more features.

Type of change

  • New feature (non-breaking change which adds functionality)

How to test / use your changes?

Please provide instructions how to test your changes

  1. Install this version of the app. A tar.gz created with make build-js-production appstore is temporarily available at https://cloud.troulite.fr/index.php/s/8MniantZGyxod52
  2. Got to your calendars
  3. Open the view selector, there should be two new views (Week (list) and Month (list))
  4. Clicking on one of them opens the corresponding view

UI Changes

In case you changed, added or removed UI elements, please provide a set of before / after screenshots:

Before After
before1 after1
before2 after2

Checklist:

  • My code follows the style guidelines of this project
  • I signed off my changes (git commit -sm "Your commit message")
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas (since this is mostly a duplication of existing code I don't think there's a need for more comments)
  • I have made corresponding changes to the documentation (I don't think there's a need to change the documentation)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (I don't know if this needs tests nor how to add them)
  • New and existing unit tests pass locally with my changes

@codecov
Copy link

codecov bot commented Aug 19, 2020

Codecov Report

Merging #2476 into master will decrease coverage by 5.54%.
The diff coverage is 4.87%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2476      +/-   ##
============================================
- Coverage     29.78%   24.24%   -5.55%     
============================================
  Files           151      144       -7     
  Lines          5428     5048     -380     
  Branches        799      807       +8     
============================================
- Hits           1617     1224     -393     
- Misses         3811     3824      +13     
Flag Coverage Δ Complexity Δ
#javascript 24.24% <4.87%> (-0.15%) 0.00 <0.00> (ø)
#php ? ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...NavigationHeader/AppNavigationHeaderDatePicker.vue 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...ppNavigationHeader/AppNavigationHeaderViewMenu.vue 0.00% <ø> (ø) 0.00 <0.00> (ø)
...pNavigation/EmbedHeader/EmbedHeaderViewButtons.vue 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
src/components/CalendarGrid.vue 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...c/fullcalendar/eventSources/eventSourceFunction.js 94.11% <ø> (ø) 0.00 <0.00> (ø)
src/fullcalendar/rendering/dayHeaderDidMount.js 0.00% <0.00%> (ø) 0.00 <0.00> (?)
src/fullcalendar/rendering/noEventsDidMount.js 0.00% <0.00%> (ø) 0.00 <0.00> (?)
src/fullcalendar/rendering/eventDidMount.js 27.45% <4.16%> (ø) 0.00 <0.00> (?)
src/filters/dateRangeFormat.js 100.00% <100.00%> (ø) 0.00 <0.00> (ø)
lib/Controller/ViewController.php
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 12fc1b6...d2f46f2. Read the comment docs.

@kbeerepoot kbeerepoot mentioned this pull request Aug 19, 2020
@jean-gui
Copy link
Contributor Author

The conflict above is because I based this MR on the tag 1.7.3 because I can't get master to work, the public calendar views remain desperately empty (even without my changes).

@georgehrke
Copy link
Member

@jean-gui Thanks a lot for your pull-request!
We just merged a PR updating FullCalendar to 5.3 a couple of days ago.

Can you please rebase your pull-request?

Also it does not show the location / description.
If space allows, at least the first two lines of location / description should be shown.

@georgehrke georgehrke added the 2. developing Work in progress label Aug 30, 2020
@jean-gui
Copy link
Contributor Author

jean-gui commented Sep 1, 2020

@jean-gui Thanks a lot for your pull-request!
We just merged a PR updating FullCalendar to 5.3 a couple of days ago.

Can you please rebase your pull-request?

Also it does not show the location / description.
If space allows, at least the first two lines of location / description should be shown.

Done. I think a change in an html class had broken location. I have now also added the description. If it's longer than two lines, it adds '...' after those first two lines.

@georgehrke georgehrke mentioned this pull request Sep 1, 2020
@tcitworld tcitworld added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Sep 2, 2020
@georgehrke
Copy link
Member

@jean-gui I hope you don't mind, but i went ahead and pushed on your branch. There have been a couple of minor things and i really want to include this in 2.1.

Light Dark
empty_light empty_dark
list_light list_dark

Signed-off-by: Jean-Guilhem Rouel <jean-gui@w3.org>

Translation of buttons for list views

Signed-off-by: Jean-Guilhem Rouel <jean-gui@w3.org>

Show location in list views when available

Signed-off-by: Jean-Guilhem Rouel <jean-gui@w3.org>

Remove unneeded code per #2476 (comment)

Signed-off-by: Jean-Guilhem Rouel <jean-gui@w3.org>

Fix location, parent class changed

Signed-off-by: Jean-Guilhem Rouel <jean-gui@w3.org>

Show start of description in list views, if available.

Signed-off-by: Jean-Guilhem Rouel <jean-gui@w3.org>

Add start of description if available in list view

Signed-off-by: Jean-Guilhem Rouel <jean-gui@w3.org>

Remove week list view

Signed-off-by: Jean-Guilhem Rouel <jean-gui@w3.org>
@georgehrke
Copy link
Member

I also removed the translations you added. Our translations are managed via http://transifex.com/ and automatically synced here via a cron-job. Every manual change to l10n/ will be lost after the cron-job.

Copy link
Member

@georgehrke georgehrke left a comment

Choose a reason for hiding this comment

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

👍
Let's get this in

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
@jean-gui
Copy link
Contributor Author

jean-gui commented Sep 3, 2020

@jean-gui I hope you don't mind, but i went ahead and pushed on your branch. There have been a couple of minor things and i really want to include this in 2.1.

No problem at all

I also removed the translations you added. Our translations are managed via http://transifex.com/ and automatically synced here via a cron-job. Every manual change to l10n/ will be lost after the cron-job.

Will you add the new string to transifex? If you tell me how to do so, I can add the French translation.

@georgehrke georgehrke merged commit d3a3ab2 into nextcloud:master Sep 3, 2020
@georgehrke
Copy link
Member

Will you add the new string to transifex? If you tell me how to do so, I can add the French translation.

I will do that in the next couple of days, but our translation community is so fast, so I'm pretty sure they will be faster than me.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List view [$45]
3 participants