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

fix(web): fix lost scrollpos on deep link to timeline asset, scrub stop #16305

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

midzelis
Copy link
Contributor

Description

This fixes the problems in maintaining scroll position (i.e. to a given deep-linked bucket) as the buckets above the current bucket as loaded and change height. The same problem also happened when clicking on the scrub bar on an unloaded part of the timeline (towards the bottom).

The root causes:

  1. the id='bucket' was changed to a bucket class instead, causing _updateLastIntersectedBucketDate to fail
  2. _updateLastIntersectedBucketDate was not working properly anyways, since on scrub, the scrubbar creates an invisible overlay over the entire #asset-grid causing getElementAtPoint to fail.
  3. The above was replaced with an alternative method to find the last 'intersected' bucket in the asset-grid by using an intersection observer.
  4. Bucket-height event was not sent on initial layout of bucket
  5. use the measuring component as a skeleton (in later PR drop skeleton component completely)

Other changes

  • Asset-store isn't a store anymore - needed to rename asset.store.ts to asset-store.svelte.ts - the store.svelte.ts pattern caused problems with the compiler, so using hyphen instead. Using .svelete.ts so that you can use $state in non-components.

How Has This Been Tested?

  • Existing tests pass, needed to disable one due to wasm layout
  • Manual testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants