Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customizable event stacking #31

Closed
JonasWanke opened this issue Jul 11, 2020 · 5 comments · Fixed by #34
Closed

Customizable event stacking #31

JonasWanke opened this issue Jul 11, 2020 · 5 comments · Fixed by #34
Assignees
Labels
C: Timetable Component: The actual timetable package T: Feature Type: :tada: New Features

Comments

@JonasWanke
Copy link
Owner

A few users mentioned the need for customizable event stacking/overlap behavior (#29 (comment), #17 (comment)). I'd like to add two new properties (shown with their default values) to TimetableThemeData:

  • bool enablePartDayEventStacking = true: If set to true, intersecting events may be stacked if their start values differ by at least the following value. If set to false, intersecting events will always be shown next to each other and not overlap.
  • Period partDayEventMinimumDeltaForStacking = Period(minutes: 15): Two events whose start values differ by this value or more can be stacked by the layout algorithm. If the difference is less, they will be shown next to each other.
@JonasWanke JonasWanke added T: Feature Type: :tada: New Features C: Timetable Component: The actual timetable package labels Jul 11, 2020
@JonasWanke JonasWanke self-assigned this Jul 11, 2020
@TatsuUkraine
Copy link
Contributor

Just curious, if it possible to add these props to event itself, rather then to theme?

@TatsuUkraine
Copy link
Contributor

So each event can define if it can be overlayed or not. JFI, I'm fine with theme props) just curious if it possible) I can imagine that in some cases , when event has info that shouldn't be overlayed for any cost, and some less critical info, that can be overlayed, dev could define overlay delta based on the size of critical info that he want to show

@TatsuUkraine
Copy link
Contributor

I haven't seen this particular feature (with event based delta rather than global time table config) anywhere, but it might be much more flexible comparing to just global (Theme) config

If it requires a lot of time investment - ignore my comments 😁

@JonasWanke
Copy link
Owner Author

@TatsuUkraine That would be possible, but I plan to develop a new layout algorithm (see #32 — I have to remember to open issues for things I've planned…) so I don't think adding such a property to events directly is worth the effort (for now).

@TatsuUkraine
Copy link
Contributor

@JonasWanke sure, np) approach that you suggested totally solves my issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Timetable Component: The actual timetable package T: Feature Type: :tada: New Features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants