Skip to content

fix(ripple-effect): ripple displays on click or touch #25102

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

Merged
merged 7 commits into from
Apr 12, 2022
Merged

Conversation

sean-perkins
Copy link
Contributor

@sean-perkins sean-perkins commented Apr 12, 2022

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

The ripple effect is broken and does not display when clicking or tapping a button.

Issue URL: #25094

What is the new behavior?

Reverts the optional chaining fixes for eslint and restores the original behavior for ripple effect.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Dev build: 6.0.17-dev.11649730310.17726968

@sean-perkins sean-perkins requested a review from a team April 12, 2022 02:29
@github-actions github-actions bot added the package: core @ionic/core package label Apr 12, 2022
Copy link
Contributor

@liamdebeasi liamdebeasi left a comment

Choose a reason for hiding this comment

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

Is there a way to write a test for this?

}

// Waits for the ripple effect to be added
await page.waitForSelector(`${selector}.ion-activated`);
Copy link
Contributor

Choose a reason for hiding this comment

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

If I check the button demo on https://ionicframework.com/docs, the button receives ion-activated for a brief moment on click, even with the busted ripple effect. Does the test fail with the broken state? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are you possibly being served from a cache? I don't see the class added to the button element when clicking and holding on the button in the docs examples. Chrome also doesn't indicate that the class attribute was modified during mouse down.

Copy link
Contributor

Choose a reason for hiding this comment

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

Happens in incognito, screencast: https://user-images.githubusercontent.com/90629384/163048183-3adafc01-3551-43a5-b6e9-962630f7df91.mp4 The class is on there as long as I have the mouse button held down.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Strange that doesn't happen on Mac 🤔 https://user-images.githubusercontent.com/13732623/163049314-6e795818-897e-464b-ba0c-ba589f0bd4fe.mp4

Anyways, I confirmed that with the changes on main, the test suite fails. With the changes in this branch, the test suite passes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Cool, that's what's important 👍

Copy link
Contributor

@liamdebeasi liamdebeasi left a comment

Choose a reason for hiding this comment

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

Great job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants