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

Events lose position during week change #186

Open
1 task done
tyler-dane opened this issue Dec 13, 2024 · 0 comments
Open
1 task done

Events lose position during week change #186

tyler-dane opened this issue Dec 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@tyler-dane
Copy link
Contributor

tyler-dane commented Dec 13, 2024

Prerequisites

  • Using an up-to-date main branch

Expected Behavior

Current Behavior

Look at the all-day row during week changes:

bug.demo.mov

Steps to Reproduce

  1. Add an all-day and timed event in a different week.
  2. Move the view to that week, so you can see the events. They should render properly.
  3. Move back to the previous week.
  4. Notice: that an all-day event with the duration of the whole view quickly shows (for less than a second) then disappears.
  5. Notice: timed events shift to the left, losing their original position

Possible Solution (Not obligatory)

Non-ideal Fix
One approach would be to hide the issue from the user. This would involve adding an overlay over the calendar so the user doesn't see the events changing position. This overlay could be a loading spinner, or an animated skeleton.

This approach is non-ideal because it doesn't fix the root cause and decreases performance by requiring the UI to render an overlay and the grid

Ideal Fix
Another approach is to find a way to prevent this from happening in the first place. This would require us to skip the computation of an event's width/height/grid coordinates during a pending navigation.

Root Cause

When we change the week, CalendarView re-renders, triggering re-renders in all its component tree until reaching event components, which re-calculates their position and size.

Context

This makes the app feel less smooth and lowers the user's confidence in its performance and reliability.

@tyler-dane tyler-dane added the bug Something isn't working label Dec 13, 2024
@tyler-dane tyler-dane moved this to Backlog in 🏗 Compass Roadmap Dec 13, 2024
@tyler-dane tyler-dane changed the title 🐛 All-day events flicker during week change 🐛 All-day events flicker and move during week change Dec 13, 2024
@tyler-dane tyler-dane changed the title 🐛 All-day events flicker and move during week change 🐛 Events lose position during week change Dec 13, 2024
@tyler-dane tyler-dane moved this from Backlog to Ready in 🏗 Compass Roadmap Dec 13, 2024
@tyler-dane tyler-dane changed the title 🐛 Events lose position during week change Events lose position during week change Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Ready
Development

No branches or pull requests

1 participant