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: fix popover behavior to accept click (default) OR hover event #678

Merged
merged 4 commits into from
Aug 30, 2023

Conversation

flavia-moraes
Copy link
Collaborator

issue JIRA

🐞[FIX]: Popover behavior for mobile

To adjust the behavior for mobile, the onTouch event was removed and the onClick event was preserved to keep the popover open without the need to keep pressing the button.

For this, the click event will be considered the default and a listener has been added for clicks outside the button element. The hover event has been kept as optional, if chosen the click event should be overridden for this behavior.
Keyboard event by default was also kept with click event.

Platforms 📲

  • Web
  • Mobile

Type of change 🔍

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested? 🧪

[Enter the tips to test this PR]

  • Unit Test
  • Snapshot Test

Checklist: 🔍

  • My code follows the contribution guide of this project Contributing Guide
  • Layout matches design prototype: FIGMA
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Screenshots 📸

[BEFORE]

Bug report video:

scrnli_14_08_2023_12-03-45.2.mp4

[AFTER]

Mobile, after fix with click behavior

Gravacao.de.Tela.2023-08-22.as.10.59.00.mov

Mobile, after fix with click behavior and keyboard

Gravacao.de.Tela.2023-08-22.as.11.00.18.mov

Web, after fix with click and keboard

Gravacao.de.Tela.2023-08-22.as.11.01.35.mov

Web, after fix with hover option

Gravacao.de.Tela.2023-08-22.as.11.02.55.mov

@sonarcloud
Copy link

sonarcloud bot commented Aug 22, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

packages/yoga/src/Popover/web/Popover.jsx Outdated Show resolved Hide resolved
packages/yoga/src/Popover/web/Popover.jsx Outdated Show resolved Hide resolved
packages/yoga/src/Popover/web/Popover.jsx Outdated Show resolved Hide resolved
packages/yoga/src/Popover/web/Popover.jsx Outdated Show resolved Hide resolved
packages/yoga/src/Popover/web/Popover.jsx Outdated Show resolved Hide resolved
@flavia-moraes flavia-moraes merged commit 4f65bc1 into master Aug 30, 2023
3 checks passed
@flavia-moraes flavia-moraes deleted the fix/popover-behavior branch August 30, 2023 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants