Campus-Android icon indicating copy to clipboard operation
Campus-Android copied to clipboard

Custom colors for calendar-events

Open PiotrKedra opened this issue 2 years ago • 12 comments

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

PiotrKedra avatar May 25 '22 17:05 PiotrKedra

This is what my changes look like. Let me know what do u think

pic 1 pic 1 pic 1 pic 1

PiotrKedra avatar May 30 '22 10:05 PiotrKedra

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?

PiotrKedra avatar Jun 12 '22 09:06 PiotrKedra

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?

Bentipa avatar Jul 05 '22 12:07 Bentipa

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.

PiotrKedra avatar Jul 06 '22 11:07 PiotrKedra

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.

kordianbruck avatar Jul 13 '22 19:07 kordianbruck

I have already added the migration in the last commit

PiotrKedra avatar Jul 18 '22 20:07 PiotrKedra

Hey, what is exactly decided by this selection:

image

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?

Bentipa avatar Jul 19 '22 14:07 Bentipa

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?

PiotrKedra avatar Jul 19 '22 21:07 PiotrKedra

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?

Bentipa avatar Jul 20 '22 15:07 Bentipa

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.

PiotrKedra avatar Jul 21 '22 17:07 PiotrKedra

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

PiotrKedra avatar Jul 23 '22 16:07 PiotrKedra

@joschahenningsen @kordianbruck could you check if the database migration is fine as it is? Apart from that I guess we could merge it.

Bentipa avatar Jul 31 '22 09:07 Bentipa

Can you please revert changes to the migration #6 pls? Or were these intentional?

kordianbruck avatar Sep 21 '22 18:09 kordianbruck

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.

CommanderStorm avatar Sep 27 '22 13:09 CommanderStorm