calendar icon indicating copy to clipboard operation
calendar copied to clipboard

Fix category selection

Open max65482 opened this issue 3 years ago • 7 comments

This PR sketches a possible solution to fixes #3939 and fixes #3802. However, there might be better/easier ways to fix this.

The underlying issue was a binding problem in the Multiselect controls: The bound data source (the event's categories) is changed in the selectValue handler. As far as I understand, this causes rerendering inside the handler. That is why the selection does not complete and categories can be selected multiple times.

This is solved by having the Multiselect controls work on their own data (value). The event's categories are synchronized on startup and upon selection/deselection.

However, this proposal needs more attention. The following problems need to be addressed:

  • After opening an event, the category list is not collapsed, but squeezed in.
  • See warnings in browsler log.
  • See compile output.

max65482 avatar Feb 09 '22 11:02 max65482

Codecov Report

Merging #3944 (c17d609) into main (64a50a9) will decrease coverage by 0.06%. The diff coverage is 0.00%.

:exclamation: Current head c17d609 differs from pull request most recent head 1370ae4. Consider uploading reports for the commit 1370ae4 to get more accurate results

@@             Coverage Diff              @@
##               main    #3944      +/-   ##
============================================
- Coverage     29.36%   29.29%   -0.07%     
+ Complexity      330      322       -8     
============================================
  Files           221      221              
  Lines          7721     7613     -108     
  Branches       1026     1010      -16     
============================================
- Hits           2267     2230      -37     
+ Misses         5454     5383      -71     
Flag Coverage Δ
javascript 20.69% <0.00%> (+0.21%) :arrow_up:
php 67.35% <ø> (-1.45%) :arrow_down:

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

Impacted Files Coverage Δ
...nents/Editor/Properties/PropertySelectMultiple.vue 0.00% <0.00%> (ø)
...or/Properties/PropertySelectMultipleColoredTag.vue 0.00% <0.00%> (ø)
...apps/calendar/lib/Controller/BookingController.php 34.48% <0.00%> (-21.08%) :arrow_down:
...c/fullcalendar/eventSources/eventSourceFunction.js 92.72% <0.00%> (-0.13%) :arrow_down:
src/utils/router.js 67.74% <0.00%> (ø)
src/views/Calendar.vue 0.00% <0.00%> (ø)
src/views/Dashboard.vue 0.00% <0.00%> (ø)
src/views/EditSimple.vue 0.00% <0.00%> (ø)
src/mixins/EditorMixin.js 0.00% <0.00%> (ø)
src/views/EditSidebar.vue 0.00% <0.00%> (ø)
... and 89 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 64a50a9...1370ae4. Read the comment docs.

codecov[bot] avatar Feb 09 '22 12:02 codecov[bot]

After opening an event, the category list is not collapsed, but squeezed in.

Does somebody know how to fix this?

grafik

It's more of a glitch. After resizing the browser window, categories are properly collapsed.

The bug didn't come up with my changes, but existed before. This might be a good place to fix it, though.

max65482 avatar Mar 07 '22 08:03 max65482

I think it is worth reviewing this PR even without a fix for the cosmetic issue from my previous comment. It already fixes the functional limitations.

max65482 avatar Mar 11 '22 08:03 max65482

please update / rebase main branch please merge all commits all together

Done!

Please run npm run lint:fix

returned

/var/www/html/apps/calendar/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.js:278
  })() ?? jsdoc.source.findIndex(({
        ^
SyntaxError: Unexpected token '?'

However, I think I fixed the relevant linter complain manually (in-line v-if).

max65482 avatar Jul 01 '22 07:07 max65482

/backport to stable3.4

ChristophWurst avatar Jul 01 '22 07:07 ChristophWurst

Ready to merge from my perspective.

max65482 avatar Jul 04 '22 09:07 max65482

Ready to merge from my perspective.

Awesome. I'll have another look at the PR soon.

st3iny avatar Jul 04 '22 09:07 st3iny

Hi, I can't understand this is not still merged.... We can't use category in calendar, this is a main feature of the tools. (https://github.com/nextcloud/calendar/issues/3802) This is really a mess for some Teams which think about leaving Nextcloud because of this kind of regression. I'm pretty sad :(

Kayoku avatar Oct 05 '22 07:10 Kayoku

I'm well aware @Kayoku. Currently there are a bunch of high prio bugs we need to address. This is one of them: https://github.com/orgs/nextcloud/projects/61/views/9. We will have a look soon.

ChristophWurst avatar Oct 05 '22 16:10 ChristophWurst

/backport to stable3.5

st3iny avatar Oct 07 '22 07:10 st3iny

Thx you for this !

nderambure avatar Oct 07 '22 21:10 nderambure

/backport to stable3.3

miaulalala avatar Jun 16 '23 14:06 miaulalala