hoangnm / react-native-week-view

Week View Component for react-native
MIT License
306 stars 97 forks source link

Feature request: Fixed lanes? #334

Open jagthedrummer opened 9 months ago

jagthedrummer commented 9 months ago

Describe the feature you'd like

I'm wondering if there's an easy way to achieve "fixed lanes" for overlapping event display. My use case is that I'm showing a schedule for a music festival where there are multiple stages operating simultaneously on the same day. I'd like for all the events for Stage A to be in the first column, all the events for Stage B to be in the next column, etc...

Visual demo

Here's a rough mock up of what I have in mind.

CleanShot 2024-01-04 at 14 23 28

The stage headers would be nice to have, but primarily I'm interested in finding a way to keep all of the events for a single stage in the same lane within a day.

(optional) Is your feature request related to a specific problem?

Yes, this is related to large multi-track events like a festival or a conference.

(optional) Additional context

Looking for suggestions for other things to consider.

jagthedrummer commented 9 months ago

Just to add a little more context, here's a specific example of the problem I'm trying to resolve.

CleanShot 2024-01-04 at 14 36 10

I'm looking for a way to keep the blue Stage A event all in the first column, and the red Stage B events all in the second column, regardless of how their start times may compare.

jagthedrummer commented 9 months ago

I think I'm looking for some way to do a laneKey that would be analogous to the stackKey mentioned here: https://hoangnm.github.io/react-native-week-view/guides/overlap#example-using-stack-keys

pdpino commented 9 months ago

Hi @jagthedrummer

Thanks for the feature request, looks interesting!

At first look I think is feasible, something like laneKey as you say.

Regarding the stage headers, do you want them just below the day? For example "stage A" and "stage B" below "Feb 20"? You can modify the day header with the prop DayHeaderComponent.

I've been super busy lately but I'm trying to find time for this project :)

jagthedrummer commented 9 months ago

@pdpino ideally yeah, the stage headers would be below the day. But even if there weren't any sort of lane header, just being able to get things to sort into the right lane would be huge.