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

Request: Support for CATEGORIES field #107

Closed
ccoenen opened this issue Sep 30, 2016 · 17 comments · Fixed by #1540
Closed

Request: Support for CATEGORIES field #107

ccoenen opened this issue Sep 30, 2016 · 17 comments · Fixed by #1540
Assignees
Labels
2. developing Work in progress enhancement New feature request
Milestone

Comments

@ccoenen
Copy link

ccoenen commented Sep 30, 2016

(Spinoff from #71)

The ical standard defines a CATEGORIES field. I would like this to be exposed in the calendar app as well.

A simple text field would do in the short term.

A nicer solution for the future would be a combination of free form field and auto-complete.

Ideally, categories could somehow modify the appearance of a VEVENT. Thunderbird does this with a tiny colour-flag, but sky's the limit.

Here's an example of categorized entries in Thunderbird's calendar. (the "Urlaub" entries have a category)


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@georgehrke
Copy link
Member

A nicer solution for the future would be a combination of free form field and auto-complete.

Well, ideally this would even be integrated with Nextcloud's tag system, but that's something for the very far future ^^

@georgehrke
Copy link
Member

Ideally, categories could somehow modify the appearance of a VEVENT. Thunderbird does this with a tiny colour-flag, but sky's the limit.

Here's an example of categorized entries in Thunderbird's calendar. (the "Urlaub" entries have a category)

Can you define a color or does thunderbird just generate one?

@ccoenen
Copy link
Author

ccoenen commented Sep 30, 2016

There's a bunch of pre-defined categories in a drop down and i can add my own as well:

tb-categories-chooser

And, albeit well-hidden, you can edit the colors! (Thanks for suggesting that, so far I didn't bother to check :D ). If you run Thunderbird, go to Top-right Burger menu -> Settings -> Settings -> Calendar-Tab -> Categories-Sub-Tab.

tb-categories-settings

@ccoenen
Copy link
Author

ccoenen commented Sep 30, 2016

Another possibility seems to be, to edit userChrome.css - the calendar entries receive classes of their own, apparently. Here's an example involving moon calendar via categories, css classes and userChrome (german, sorry). This should allow even more styling, but I haven't personally confirmed that this way (still?) works.

@ruihildt
Copy link

That would be really interesting to be able to categorize events.

@georgehrke georgehrke added 1. to develop Accepted and waiting to be taken care of enhancement New feature request and removed enhancement-proposed labels Nov 29, 2016
@georgehrke georgehrke added this to the 1.8.0 milestone Nov 29, 2016
@devillemereuil
Copy link

To give some ideas, the "old-days" (doesn't work since 9.0 version) Calendar+ app did it by using the first letter of the category and randomly chosen colors (probably using an algorithm like ones for contacts):
calendarplus

It's not developed anymore, but the code is still there:
https://github.com/libasys/calendarplus

Maybe there is something to get from there.

@cluxter
Copy link

cluxter commented Sep 13, 2017

I would really love having colored categories in the web app. I use them all the time in Thunderbird (and I also use the addon Calendar Tweaks to display the color of the category on all the event, not just a little colored bar on the side, it's wayyy more convenient).

@gabrieleturchi
Copy link

I will be happy to help with this feature, but some introduction with the current code would be greatly appreciated to shorten the times.

@georgehrke
Copy link
Member

@gabrieleturchi This issue should be implemented in two phases ideally :)

  1. Add categories to the event editor
  2. Later on add a coloring like suggested by @ccoenen

Let's start with the first:

To see how the input works for files, see https://github.com/nextcloud/server/blob/4904117ba8206d24324d5c6a2f8150a1641e4ac5/core/js/systemtags/systemtagsinputfield.js
You can use something like this to get the same with angular: http://mbenford.github.io/ngTagsInput/
This was just the first hit i found, maybe do some more research on that ;)

There is already a tags system in Nextcloud: https://github.com/nextcloud/server/blob/master/lib/public/SystemTag/ISystemTagManager.php

To access it, you would have to write a SystemTagsController in the Calendar, that gets you a list of all tags, creates new ones, etc.
It will be similar to https://github.com/nextcloud/calendar/blob/master/controller/contactcontroller.php

@gabrieleturchi
Copy link

@georgehrke Thank you very much!
Now at least I can see a path in the code! :-)
With some dirty code I'm already able to read the categories in the event popup, but I have to familiarize a bit more with nc code...
I will keep you informed about my progress.

@samuelstein
Copy link

any plan when the feature will be available?

@georgehrke
Copy link
Member

@samuelstein
fb4381e2-4065-42ca-aa7a-b933f6cef123

See the milestone in the right sidebar 😉

@samuelstein
Copy link

thanks for your quick replay. i saw it but the interesting question is when will be milestone 2 released?

@corvus-albus
Copy link

I would love this feature but I want to point to a difficulty not yet mentioned. One event can have multiple categories. Thunderbird does allow multiple categories but does only show one color. I don't know how Thunderbird does choose the color, I can't find a rule but I haven't searched carefully.

What to do? I don't think that multiple colors are a good way out. If it won't be decided by chance, perhaps radio buttons are a good choice.

Cheers corvus albus

@ccoenen
Copy link
Author

ccoenen commented Jun 1, 2019

First one wins. This would already be immensely better than having no categories at all. Also this is less about styling and more about syncing tags and CATEGORIES so one can use them in both Nextcloud and Thunderbird (and others, of course).

Regarding the radio buttons: this would limit people to choosing at most one category for no other reason than "we can't figure out which color wins". What would you do with items synced in from other sources that might already have two or more categories? Making this a radio box solves only a part of the problem, while severely limiting functionality.

@samuelstein
Copy link

i completely agree with you @ccoenen .
Defining colors is not really necessary for the moment. for me they could be randomly chosen.

@corvus-albus
Copy link

corvus-albus commented Jun 3, 2019

Regarding the radio buttons: this would limit people to choosing at most one category for no other reason than "we can't figure out which color wins". What would you do with items synced in from other sources that might already have two or more categories? Making this a radio box solves only a part of the problem, while severely limiting functionality.

To make the suggestion clearer: I thought only of radio buttons for choosing the category which defines the color and not to limit the number of categories.

But indeed, if you sync events from other sources that have more than one category you have to do a random color choice at first.

And at least it is better to have colors than to have not. Most events will have only one category anyway. But I think it is important to know the problem exists. Then one can decide how to deal with it.

@georgehrke georgehrke self-assigned this Oct 19, 2019
@georgehrke georgehrke added 2. developing Work in progress and removed 1. to develop Accepted and waiting to be taken care of labels Oct 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress enhancement New feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants