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

fix: horizontal drag without opening drawer #562

Closed
wants to merge 4 commits into from
Closed

Conversation

cswills
Copy link
Collaborator

@cswills cswills commented Jul 16, 2022

closes #555

This was a lot more difficult than I thought it would be. To allow for resizing of the activity feed in landscape mode, a custom gesture is used that has priority in the gesture arena. However, this method does not work for the command bar because the gesture has priority over the button presses as well. I found a workaround though. The command bar only shows when the keyboard is open, so disabling the drawer open gesture while the keyboard is open allows the user to scroll through commands.

@cswills cswills marked this pull request as draft July 17, 2022 14:16
@cswills cswills marked this pull request as ready for review July 17, 2022 14:29
@kevmo314
Copy link
Contributor

closes #555

This was a lot more difficult than I thought it would be. To allow for resizing of the activity feed in landscape mode, a custom gesture is used that has priority in the gesture arena. However, this method does not work for the command bar because the gesture has priority over the button presses as well. I found a workaround though. The command bar only shows when the keyboard is open, so disabling the drawer open gesture while the keyboard is open allows the user to scroll through commands.

Hmm, would this work if we show the command bar/other sliding gestures without the keyboard? @chungwwei's upcoming UI might result in that. I suppose a way around that is we could avoid horizontal drag patterns in the UI.

@cswills
Copy link
Collaborator Author

cswills commented Jul 19, 2022

Hmm, would this work if we show the command bar/other sliding gestures without the keyboard? @chungwwei's upcoming UI might result in that. I suppose a way around that is we could avoid horizontal drag patterns in the UI.

This method only works with widgets whose only gesture is dragging, but I could look into this more for an alternative method for a persistent command bar. With the current solution, either the command bar would have to scroll vertically (maybe collapsible?), or the drawer gesture detector's width would have to be reduced. For the latter, extra horizontal padding could be added to the command bar for an easier to open drawer.

@juaoose
Copy link
Collaborator

juaoose commented Jul 19, 2022

Maybe we should just revert to the original behavior for a while? While having this is nice, maybe it isn't that relevant? wdyt @cswills @kevmo314

Copy link
Contributor

@kevmo314 kevmo314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about this some more, I think the horizontal drag to open the drawer is actually really nice. I'd rather relayout the command bar than lose that feature. So actually let's:

  1. Skip this PR (sorry @cswills D:) and leave the bug as-is for now
  2. In @chungwwei's upcoming feature we'll also incorporate the commands in a vertically scrolling grid or something, on a separate tab besides slash commands. I'll doodle some UI flows for this.

@cswills
Copy link
Collaborator Author

cswills commented Jul 22, 2022

@kevmo314 Should I create another PR with just the fix for resizing the activity feed in landscape mode?

@kevmo314
Copy link
Contributor

@kevmo314 Should I create another PR with just the fix for resizing the activity feed in landscape mode?

Yeah sounds good

@cswills cswills closed this Jul 22, 2022
@juaoose juaoose deleted the drag-priority branch February 2, 2023 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Command bar not scrollable
3 participants