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

Add support for categories. #48

Open
bramwaas opened this issue Oct 21, 2024 · 1 comment
Open

Add support for categories. #48

bramwaas opened this issue Oct 21, 2024 · 1 comment

Comments

@bramwaas
Copy link
Owner

bramwaas commented Oct 21, 2024

Create a filter with a list of categories and if one ore more categories of this list exist in the categories list of the event the event will be included (logical OR).
Complement it with a negative filter to exclude this events.
Also a filter that includes only events with all categories of the list (logical AND)
And its complement none.
Add all categories as css classes to the displayed event.
Add a toggle to display/hide a list of categories before the first line of the event.

Also add a faq to state that although Microsoft Outlook supports categories, those categories do not appear in the ical file and therefore also not in my plugin.

@bramwaas
Copy link
Owner Author

This is what I have in mind now for the implementation:

  • Retrieve the set of categories from the iCal events (when they exist) into my plugin-events as the event-set. Keep in mind that one event can contain 0 or more categories and that a category can contain a space.

  • Make one filter with a comma separated list of categories as the filter-set.

  • Make possible to choose one method to assess the intersection of both sets from a limited list of operators, ANY, ALL, NOTANY, NOTALL (maybe I find better names or symbols later)

  • ANY is true when at least one of the elements of the filter-set is contained in the event set, or in other words, the filter-set intersects the event-set, the intersection contains at least one element. This seems to me the most practical operator.

  • ALL is true when all the elements of the filter-set are contained in the event set, or in other words, the intersection contains the same number of elements as the filter-set. The event-set may contain other elements.

  • NOTANY is true when ANY is NOT true. The intersection is empty.

  • NOTALL is true when ALL is NOT true. The intersection contains less elements then the filter-set.

  • A special case are events without a categories set. As I have described it here the will only appear when the operator is NOTANY or NOTALL. I think of using a null-string (“”) in the filter set to represent events without a categories set. I don’t think this is correct in set theory and it may theoretical possible to define a category as a null string. Nevertheless I think this is te most practical solution to add the events without a category positive to a filter.

  • Make a toggle (or select) option to display the set of categories on top of an event (in a SMALL HTML line)

  • Add the list of categories of an event cleaned as classes (removed spaces etc.) to the html-classes of event.

  • Categories (at least in this plugin) behave like simple tags and have no intrinsic meaning or relation. So if you want to select all events with catergory flower, rose or tulip you have to add them all in the filterlist category flower will not automatical also select rose and tulip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant