Campus-Android
Campus-Android copied to clipboard
Custom colors for calendar-events
Issue
Fixes: #1331
Description
My plan for this feature is to allow users to:
- apply custom colours to classes displayed in the calendar,
- choose a custom colour while creating a regular in-app task,
- specify if the colour is for a single event, or for a group of the same events,
- edit colour.
Information about event colours will be stored locally in SQLite DB
This is what my changes look like. Let me know what do u think
If the changes are fine, to make them work for current users, migration of the database is needed. Should I commit the migration in this PR or it should be done just before the next release to combine all potential migrations into one?
Just one question, without looking deeper into the code. If setting the color for one lecture, is it applied for all recurring instances of that lecture?
Yeah, by default it is applied to all recurring instances of that lecture, but there is an option to apply colour to a single event, which always overrides the colour set for the group of same lectures.
Should I commit the migration in this PR or it should be done just before the next release to combine all potential migrations into one?
Feel free to commit it here in the same go.
I have already added the migration in the last commit
Hey, what is exactly decided by this selection:
So for my understanding, it decides whether the color should be applied to all entries (if it's a repeating one) right? Maybe we could make this a little more precise? Why do you need this input from the user?
Yeah, if "Repeats Weekly" is selected, then the colour is applied to all entries (all events of the selected lecture). If it is unselected then the colour is applied only to one single event.
To make it more precise, we can change the text to sth else, but I don't have any good idea ^^ (mb sth like "All events"?). Is there anything more we can do to make it more user-friendly than changing the name?
Yeah, if "Repeats Weekly" is selected, then the colour is applied to all entries (all events of the selected lecture). If it is unselected then the colour is applied only to one single event.
To make it more precise, we can change the text to sth else, but I don't have any good idea ^^ (mb sth like "All events"?). Is there anything more we can do to make it more user-friendly than changing the name?
I guess something like "Apply to all occurrences" would at least explain better what the feature does. Is this text too long?
Yeah, it might be better. I will test it, and if it is too long I will just wrap the text to the second line or make the font slightly smaller.
I have merged and changed the text. Text is for sure not too long, but in case some small screens text should wrap to the second line.
![pic 1](https://user-images.githubusercontent.com/23524945/180613642-c36ac1ae-fa38-4441-81c6-986f8fedbf8e.jpeg)
@joschahenningsen @kordianbruck could you check if the database migration is fine as it is? Apart from that I guess we could merge it.
Can you please revert changes to the migration #6 pls? Or were these intentional?
Can you please revert changes to the migration #6 pls? Or were these intentional?
I have again tested this via
- cloning +running master
- cloning +running this branch
The change works ⇒ I am merging it.