react-native-week-view icon indicating copy to clipboard operation
react-native-week-view copied to clipboard

Stack event when they can

Open rdewolff opened this issue 3 years ago • 7 comments
trafficstars

What do you think about a more clever way to stack event when they can?

We could overlap events based on the text in it's content.

Check for example how Apple Calendar is doing it:

Screenshot 2022-07-12 at 16 06 11

What do u think?

rdewolff avatar Jul 12 '22 14:07 rdewolff

Sounds interesting!

Any API suggestions? I'd prefer something more flexible than detecting the same description, to support multiple use cases (e.g. a user may still want some events non-stacked, even if they have the same description)

pdpino avatar Jul 12 '22 15:07 pdpino

I got this working, user can decide per event if wants to stack or not

image

I can send a PR after solving open PRs #227, #229

pdpino avatar Jul 18 '22 14:07 pdpino

Woaw that's really nice!

rdewolff avatar Jul 18 '22 14:07 rdewolff

When you stack them, what happens if you put event A at 17h00 and event B at 17h15 ?

rdewolff avatar Jul 18 '22 20:07 rdewolff

image

do you mean one of those?

pdpino avatar Jul 19 '22 14:07 pdpino

If you keep adding Event-A's to Tue19, they fall into the same stack, but other events will fall into their own lane:

image

pdpino avatar Jul 19 '22 14:07 pdpino

That seems like a perfect solution. Looking forward testing this!

rdewolff avatar Aug 01 '22 19:08 rdewolff