Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

fix(svelte): Data/code preloading doesn't work when using panels#63339

Merged
fkling merged 4 commits into
mainfrom
fkling/srch-507-data-pre-loading-doesnt-work
Jun 19, 2024
Merged

fix(svelte): Data/code preloading doesn't work when using panels#63339
fkling merged 4 commits into
mainfrom
fkling/srch-507-data-pre-loading-doesnt-work

Conversation

@fkling

@fkling fkling commented Jun 19, 2024

Copy link
Copy Markdown
Contributor

Fixes srch-507

The panels code prevents event propagation of mouse move events, which in turn seems to prevent SvelteKit from its own preloading logic.

Looking at the event handlers it seems they are global only (per document), so I don't think that stopping the propagation is necessary for the panel itself to work. However, I think it makes sense to stop any of default event behavior when the mouse is currently pressed, since that means the user is currently dragging a resize handler. Would love to get @vovakulikov's confirmation that my understanding is correct.

Test plan

Manual testing. Changing the size of a panel (e.g. repo page) seems to work as expected. Hovering over a file tree entry preloads data and code now, as visible in the network tab.

The panels code prevents event propagation of mouse move events, which
in turn seems to prevent SvelteKit from its own preloading logic.

Looking at the event handlers it seems they are global only (per
document), so I don't think that stopping the propagation is necessary
for the panel itself to work. However, I think it makes sense to stop
any of default event behavior when the mouse is currently pressed, since
that means the user is currently dragging a resize handler.
@fkling fkling requested review from a team and vovakulikov June 19, 2024 12:18
@cla-bot cla-bot Bot added the cla-signed label Jun 19, 2024
@fkling fkling self-assigned this Jun 19, 2024
@fkling fkling enabled auto-merge (squash) June 19, 2024 15:37
@fkling fkling merged commit 8b5eec2 into main Jun 19, 2024
@fkling fkling deleted the fkling/srch-507-data-pre-loading-doesnt-work branch June 19, 2024 16:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants