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

Improve presentation order of upcoming and live events #688

Merged

Conversation

owi92
Copy link
Member

@owi92 owi92 commented Jan 23, 2023

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:

  • The presentation order of the upcoming events is not configurable as I figured that we would always want to show the soonest one first, but that would be a small add if desired.
  • I initially wanted to add some animation as the pop up of the details/summary element is a little sudden, but that turned out to be a little more complicated with that element because it doesn't have a fixed height, and also isn't super neccessary and might also look weird with too many upcoming events.

Closes #586

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.

@owi92 owi92 added the changelog:user User facing changes label Jan 23, 2023
@github-actions github-actions bot temporarily deployed to test-deployment-pr688 January 23, 2023 10:56 Destroyed
Copy link
Member

@LukasKalbertodt LukasKalbertodt left a 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 ;-)

frontend/src/i18n/locales/en.yaml Outdated Show resolved Hide resolved
frontend/src/ui/Blocks/Series.tsx Outdated Show resolved Hide resolved
frontend/src/ui/Blocks/Series.tsx Outdated Show resolved Hide resolved
frontend/src/ui/Blocks/Series.tsx Outdated Show resolved Hide resolved
frontend/src/ui/Blocks/Series.tsx Outdated Show resolved Hide resolved
frontend/src/ui/Blocks/Series.tsx Outdated Show resolved Hide resolved
frontend/src/ui/Blocks/Series.tsx Outdated Show resolved Hide resolved
frontend/src/ui/Blocks/Series.tsx Outdated Show resolved Hide resolved
@github-actions github-actions bot added the status:conflicts This PR has conflicts that need to be resolved label Jan 24, 2023
@github-actions
Copy link

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

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.
@owi92 owi92 force-pushed the improve-order-of-planned-live-streams branch from c127189 to cf26593 Compare January 24, 2023 17:56
@github-actions github-actions bot removed the status:conflicts This PR has conflicts that need to be resolved label Jan 24, 2023
@github-actions github-actions bot temporarily deployed to test-deployment-pr688 January 24, 2023 18:00 Destroyed
@owi92 owi92 force-pushed the improve-order-of-planned-live-streams branch from cf26593 to 52e7c7a Compare January 25, 2023 09:35
@github-actions github-actions bot temporarily deployed to test-deployment-pr688 January 25, 2023 09:39 Destroyed
frontend/src/ui/Blocks/Series.tsx Outdated Show resolved Hide resolved
frontend/src/ui/Blocks/Series.tsx Outdated Show resolved Hide resolved
frontend/src/ui/Blocks/Series.tsx Outdated Show resolved Hide resolved
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.
@owi92 owi92 force-pushed the improve-order-of-planned-live-streams branch from 52e7c7a to 2811504 Compare January 25, 2023 11:37
@github-actions github-actions bot temporarily deployed to test-deployment-pr688 January 25, 2023 11:43 Destroyed
@LukasKalbertodt LukasKalbertodt merged commit c21a318 into elan-ev:master Jan 25, 2023
@owi92 owi92 deleted the improve-order-of-planned-live-streams branch March 4, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:user User facing changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve order/presentation of planned live-streams in video blocks
2 participants