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

Make full height frame usable when main scrollable content is not the root element #72

Open
Inwerpsel opened this issue Jul 25, 2024 · 0 comments
Labels
enhancement New feature or request NOT a bug You'd think its' a bug, but it's not

Comments

@Inwerpsel
Copy link
Owner

Inwerpsel commented Jul 25, 2024

Some sites make the root element fixed (or not overflowing the window height), so that the full height preview is not able to have the full height. Instead, it will look identical to the main inspection frame.

This happens for the halfmoon demo (they now don't do this in v2), and several other pages from major live sites that I tested locally.

notactuallyfullheight

Afaik, there's no advantage to doing this, you can achieve the same effect by making secondary elements fixed or sticky.

This pattern has some serious drawbacks, mainly that upon refreshing the page the browser is not able to restore the scroll position in the same way it would normally do on the main content. For the user this is extremely confusing, as the page looks exactly like a normal page with fixed elements which would restore the position.

Nevertheless, it would be nice to make the full height view work anyway for such cases, as it's always a lot of work to change how scrolling works and needs a lot of testing.

If the code has to detect this case anyway, it can also notify the user that this has to be addressed. This would need some thinking of how to detect and present a list of antipatterns to the user.

If this is handled, the same logic can probably be used to sync the scroll position of (non-main) fixed elements, most commonly a sidebar menu with many entries.

@Inwerpsel Inwerpsel added the NOT a bug You'd think its' a bug, but it's not label Jul 25, 2024
@Inwerpsel Inwerpsel added the enhancement New feature or request label Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request NOT a bug You'd think its' a bug, but it's not
Projects
None yet
Development

No branches or pull requests

1 participant