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

[Request]: Simplify window resizing #1053

Open
1 task done
bragefuglseth opened this issue Jul 1, 2024 · 1 comment
Open
1 task done

[Request]: Simplify window resizing #1053

bragefuglseth opened this issue Jul 1, 2024 · 1 comment
Labels
enhancement New feature or request performance Performance related issue

Comments

@bragefuglseth
Copy link
Contributor

bragefuglseth commented Jul 1, 2024

Describe the request

The window currently goes through a lot of different "states" when being resized, with an animation applied when posts are extended/contracted:

  1. Sidebar is visible, posts are cards, no top or bottom bar
  2. Sidebar is visible, posts are extended to the view edges, no top or bottom bar
  3. Sidebar is collpased, posts are cards, top bar
  4. Sidebar is collapsed, posts are extended to the view edges, top bar
  5. Sidebar is collapsed, posts are extended to the view edges, bottom bar

Some of these follow each other pretty closely, making resizing feel messy and laggy.

Here's a screencast showing all of the above:

Skjermopptak.fra.2024-07-01.15-10-47.webm

Is it feasible to consolidate all these independent resizing breakpoints into a few higher-level non-animated ones? E.g.:

  1. Sidebar is visible, posts are cards, no top or bottom bar
  2. Sidebar is collapsed, posts are cards, top bar
  3. Sidebar is collpased, posts are extended to the view edges, bottom bar

Some notes on the expanding/contracting animation for posts: It looks cool, but I suspect it's one of the reasons the window lags so much when resizing. It was added while libadwaita itself was using resizing animations widely, but that isn't the case anymore due to technical and design related constraints. Based on this, I don't think dropping the animation now would "hurt" as much as it would have done 1-2 years ago.

All of this is loosely related to #228, but this doesn't require as much design work, and should be a generally lower-hanging fruit for now 🙂

Implementation Details

@bragefuglseth bragefuglseth added the enhancement New feature or request label Jul 1, 2024
@GeopJr
Copy link
Owner

GeopJr commented Jul 1, 2024

Sorry I cannot take a deep look into it atm but for more info:

The transition is not entirely at fault here. It's just a little overhead on top of the elephant in the room, the ListBox. Too many items affected when resizing (animations, wrapping, labels with widgets, flexboxes etc etc etc). A recycler view (ListView with probably a lower default) would deal with that but #500 #504 #410 #179 and however many other issues and comments.

3 items, with nothing changes, has no lag. The animation has almost no impact at all

Screencast.from.2024-07-01.17-26-31.webm

vs many items with the animation disabled. The animation being off, similarly, has no impact at all

Screencast.from.2024-07-01.17-28-10.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance Performance related issue
Projects
None yet
Development

No branches or pull requests

2 participants