fix: animate the page rather than the window, and let the browser fetch the bundles - #2235
Merged
Merged
Conversation
Clicking an entry in the sidebar slid the entire interface sideways -- the sidebar itself, the header, the search box -- rather than only the page being opened. `::view-transition-old(root)` and `new(root)` are what the browser calls a picture of the *whole window*. Animating those animates everything in it, so the parts of the app that had not changed at all were carried across with the part that had. It is invisible in the DOM, because a view transition animates snapshots that sit outside the layout, which is why it survived the tests: a frame caught mid-transition shows every sidebar entry doubled over itself. Naming the page gives the browser something smaller to animate and lifts it out of that picture; the rest of the window is then the same before and after, and is told to stay still rather than cross-fade an identical image. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Frank Karlitschek <frank.karlitschek@nextcloud.com>
`js/.htaccess` holds `Deny from all`, and `js/` is exactly the directory a browser has to fetch: every bundle this app ships is under it. It has been harmless only where Apache is configured with `AllowOverride None`, which means the file is never read. On an instance set up the way Nextcloud's own documentation recommends -- `AllowOverride All`, so that the server's `.htaccess` works -- every request for a bundle is answered 403, Apache falls through to `index.php`, and the app renders an empty page with no error anybody would connect to a file checked in years ago. The other three copies stay: nothing fetches `src/`, `appinfo/` or `context/` over HTTP, so denying those costs nothing and is a sensible default. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Frank Karlitschek <frank.karlitschek@nextcloud.com>
The app version reaches the webpack build, so the committed bundle has to be rebuilt with it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Frank Karlitschek <frank.karlitschek@nextcloud.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes found by running the app rather than by testing it. They are independent — the commits split cleanly if you would rather have them separately.
The page transition slid the whole window
Clicking an entry in the sidebar slid the entire interface sideways: the sidebar itself, the top bar, the search box, the logo — not only the page being opened. Reported by a reader as "the view moves a bit from left to right".
::view-transition-old(root)andnew(root)are the browser's name for a picture of the whole window. Animating those animates everything in it, so the parts of the app that had not changed were carried across with the part that had. Naming the page gives the browser something smaller to animate and lifts it out of that picture; the rest of the window is then identical before and after, and is told to hold still rather than cross-fade the same image against itself.It is invisible in the DOM, which is why it survived the tests that shipped it: a view transition animates snapshots that sit outside the layout, so measuring element positions during a navigation shows nothing moving at all. What proves it is a frame caught mid-transition, with the animation slowed down — every sidebar entry doubled over itself. The same frame afterwards shows the sidebar sharp and still with only the page moving.
The new test pins the scoping, so this cannot quietly go back to
root.The app's own JavaScript was denied to the browser
js/.htaccessholdsDeny from all, andjs/is exactly the directory a browser must fetch — every bundle this app ships is under it.It has been harmless only where Apache runs with
AllowOverride None, which means the file is never read. On an instance configured the way Nextcloud's own documentation recommends —AllowOverride All, so that the server's.htaccessworks — every request for a bundle is answered 403, Apache falls through toindex.php, and the app renders an empty page. Nothing in the log points at a file checked in years ago; it tookLogLevel warnand Apache'sAH01797 client denied by server configurationto find it.The other three copies stay. Nothing fetches
src/,appinfo/orcontext/over HTTP, so denying those costs nothing and is a sensible default.Testing
npx vitest run— 2530 tests, all passing, including the two new ones for the transition scope.npm run lintandnpm run typecheckclean. Bundle rebuilt for 0.26.16 and reproducible on a second build.AI disclosure
Written with Claude Code (Claude Opus 5). Reviewed before submitting.