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

Browser: keep selection visually stable #17747

Open
david-allison opened this issue Jan 7, 2025 · 12 comments · May be fixed by #17792
Open

Browser: keep selection visually stable #17747

david-allison opened this issue Jan 7, 2025 · 12 comments · May be fixed by #17792
Assignees

Comments

@david-allison
Copy link
Member

Before moving to a recyclerview, if long pressing an item, the selected item was still under the point that a user tapped after the grid had been resized

This is no longer the case

@david-allison david-allison changed the title Browser: keep selection stable Browser: keep selection visually stable Jan 7, 2025
@Scapesfear
Copy link
Contributor

i am working on this.

@Scapesfear
Copy link
Contributor

Scapesfear commented Jan 9, 2025

hey @david-allison
When reproducing the issue, I observed:

During long press, the grid scales up

  • If an entry's center was at position (x,y) before resize, it moves to (xscale, yscale) after

  • This naturally shifts the selected item away from the user's finger position

This shift is expected because:

  • The grid is maintaining relative positions of all entries while scaling
  • The scaling transformation inherently moves points away from their original positions

We could set the initial grid size in browser view to match the post-long-press grid size. This would eliminate the scaling transition and keep selected items aligned with touch points.

@david-allison
Copy link
Member Author

We could set the initial grid size in browser view to match the post-long-press grid size. This would eliminate the scaling transition and keep selected items aligned with touch points.

What does this mean? Making the items larger when the checkbox doesn't appear?

Not for now, we have a lot of information which we want to display, and we want the grid as vertically compact as possible.

If you try 2.20.1, this functionality works as expected, and we should maintain the same functionality.

@Scapesfear
Copy link
Contributor

Scapesfear commented Jan 9, 2025

We could set the initial grid size in browser view to match the post-long-press grid size. This would eliminate the scaling transition and keep selected items aligned with touch points.

What does this mean? Making the items larger when the checkbox doesn't appear?

Not for now, we have a lot of information which we want to display, and we want the grid as vertically compact as possible.

If you try 2.20.1, this functionality works as expected, and we should maintain the same functionality.

okay could you clarify me what are the exact steps to reproduce the bug and what is expected ,
from what i have understood is longPressing the row in Card Browser makes checkbox view visible and shifts the selected row away from user's fingertip , am i right ?

@Scapesfear
Copy link
Contributor

What does this mean? Making the items larger when the checkbox doesn't appear?

no it means to make sure upon selecting the row , the selected row doesn't shift from the position , we need to make the height of each cell in multiselect(or checkbox) view same as it was in normal recyclerview, i hope i make sense

@david-allison
Copy link
Member Author

That breaks accessibility. Checkboxes have a minimum required height

@Scapesfear
Copy link
Contributor

That breaks accessibility. Checkboxes have a minimum required height

you are right , but then we have to do the opposite of it , making the normal view's cell height bigger. I am just discussing possible fixes.

@Scapesfear
Copy link
Contributor

Scapesfear commented Jan 9, 2025

If you try 2.20.1, this functionality works as expected, and we should maintain the same functionality.

i tried with 2.20.1 and 2.21alpha5-debug both are working exacltly same

@mikehardy
Copy link
Member

@Scapesfear when there are not enough items to scroll, there's not much we can do, the items will expand to fill screen up to scroll. Try a deck with at least three screenfulls of cards and scroll to somewhere in the middle. Then test a long-press to switch into multi-select on an item in the middle of that second screen. What happens on 2.20.1 vs 2.21alpha5?

@mikehardy
Copy link
Member

Bonus, once you have more than 6 cards in your entire collection, you may have a chance at reproducing the crash-on-card edit using boundary condition scenarios as I mentioned.

@Scapesfear
Copy link
Contributor

okay i will do it and tell the results

@Scapesfear
Copy link
Contributor

i tested with 30cards and yes the 2.21alpha5 is not working as expected

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

Successfully merging a pull request may close this issue.

3 participants