-
Notifications
You must be signed in to change notification settings - Fork 15
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
Improve presentation order of upcoming and live events #688
Improve presentation order of upcoming and live events #688
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it already and I think it's a big UX win. I have a few comments though.
The presentation order of the upcoming events is not configurable [...]
That's fine I think.
I initially wanted to add some animation [...]
Oh yeah the old problem of animating between height: 0
and height: auto
. It's pretty annoying. The most common workaround recommended online (just use height: 8000
) is bad and broken, and every other workaround is super involved and not worth it.
Edit: to test this, you need to either create some upcoming and live events or edit the status (is_live and start_time) of some events in the database.
Reviewers very much appreciate comments like this ;-)
This pull request has conflicts ☹ |
This adds a collapsible box to event blocks which hides upcoming events if there are more than one present. These events are ordered by their starting time so that the earliest upcoming event is shown first. Presentation of the remaining events is also reorganzied so that live events are always shown before non-live events and all events are now ordered by their starting time instead of creation time.
This removes the reliance on stable sorting and adds a helper function to determine the starting or creation time of events in milliseconds.
c127189
to
cf26593
Compare
cf26593
to
52e7c7a
Compare
Since there might somehow be scheduled events which are not live, they would previously show up inside the `upcoming live streams` box but don't actually feature the `upcoming` label. Now they will be shown with the "regular" events.
52e7c7a
to
2811504
Compare
This adds a collapsible box to event blocks which hides upcoming events if there are more than one present. These events are ordered by their starting time so that the earliest upcoming event is shown first.
Presentation of the remaining events is also reorganzied so that live events are always shown before non-live events and all events are now ordered by their starting time instead of creation time.
Notes:
Closes #586
Edit: to test this, you need to either create some upcoming and live events or edit the status (
is_live
andstart_time
) of some events in the database.