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

Please close the image when the user clicks outside the image (Not only swipe downwards but also dismiss when clicked outside) #64

Open
envererdem18 opened this issue Jun 28, 2024 · 3 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@envererdem18
Copy link

No description provided.

@jfahrenkrug
Copy link
Collaborator

@envererdem18 Thank you for opening an issue. Please provide more details: Maybe a video or an image that clearly describes what you mean. Thank you.

@envererdem18
Copy link
Author

issue

The close button in the top right corner can be difficult to click and is not good for the user experience. We should also be able to close the image by clicking on the areas indicated by white text.

@jfahrenkrug
Copy link
Collaborator

@envererdem18 Thank you for the great explanation and image. I looked into this a bit today and I'm leaving some notes here (mainly for myself to remember):

  • We are using showDialog with the default value of true for barrierDismissable left untouched.
  • The body of showDialog is an instance of EasyImageViewerDismissibleDialog. That widget's height and width is unrestricted, which means that by default it fills all available space. Since we set our own background color, we don't technically have a "barrier" the user can tap on, so barrierDismissable: true really has no effect.

Ideas:

  • Implement an option for the EasyImageViewerDismissableDialog not to take up all available space, thus releasing the barrier. This is tricky because we could be dealing with images or varying sizes and aspect ratios in the page controller. But it would be nice to simply expose the default dismiss behavior.
  • Implement our own "barrierDismissable" by capturing taps on the background.

Note:

  • We need to make the close button widget optional/customizable.

@jfahrenkrug jfahrenkrug self-assigned this Jul 17, 2024
@jfahrenkrug jfahrenkrug added the good first issue Good for newcomers label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants