Discussion: filter calendar widget
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.1k
- Forks
- 233
- Avg merge
- 1h 44m
- Merged PRs (30d)
- 1
Description
Hi,
I'd like to propose a feature and also offer to implement it. The idea is to filter events or whole calendars from the day highlighting in the calendar while keeping the agenda untouched.
For that matter I would introduce a calendar-level config filter_from_highlighting that can either be a boolean or a string and defaults to False
- when set to
Truethe whole calendar would not be considered for day highlighting. A usecase would be birthday calendars that I myself want to be featured in the agenda in a prominent color (thus preventing me from just setting an empty calendar color) but don't want to show up in the calendar widget. - when set to a string it would considered to be a (python-re-style) regex that filters events from the calendar whose title matches the regex. For example on my business calendar I would use the regex
"(^Daily)|(^Away:)"which would filter both my Scrum dailies and away-notifications from colleges so a day in the calendar would only be highlighted in the color of the business calendar if I really have a meeting.
I had a deep dive into the relevant code parts yesterday. So I have a fair idea what I am getting myself into (including changes to sqlite schemata) and how to attack that problem.
Would that feature be interesting for you? Any changes you would suggest?
However as I already observed in a merge request the code implementing the day highlighting is pretty much duplicated for ikhal and khal calendar. So before making it even more complicated I would like to refactor it into a single code base for both usages that is actually testable and decoupled from the "dirty business of really applying the colors".
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing pull request 954 and comparing the duplicated day-highlighting paths in ikhal and khal calendar. Then trace the calendar configuration and SQLite schema areas mentioned in the proposal. Done means the requested calendar and title filtering is supported in both usages, with the shared logic testable and the agenda unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sqlite
- Domain
- cli, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100