Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

fix(ripple): Expose focus/blur handlers #2905

Merged
merged 7 commits into from
Jun 8, 2018

Conversation

abhiomkar
Copy link
Collaborator

This change adds two new public methods to MDC Ripple Foundation - including handleFocus and handleBlur to be used by other frameworks on focus and blur.

Fixes #2838

@abhiomkar abhiomkar requested a review from kfranqueiro June 7, 2018 23:17
@codecov-io
Copy link

codecov-io commented Jun 7, 2018

Codecov Report

Merging #2905 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2905      +/-   ##
=========================================
+ Coverage    98.3%   98.3%   +<.01%     
=========================================
  Files         101     101              
  Lines        4359    4363       +4     
  Branches      563     563              
=========================================
+ Hits         4285    4289       +4     
  Misses         74      74
Impacted Files Coverage Δ
packages/mdc-ripple/foundation.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 14cb0bf...a6cc513. Read the comment docs.

@kfranqueiro kfranqueiro changed the title fix(ripple): Expose focus/blur handlers feat(ripple): Expose focus/blur handlers Jun 8, 2018
Copy link
Contributor

@kfranqueiro kfranqueiro left a comment

Choose a reason for hiding this comment

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

Please add the two new methods to the README under MDCRippleFoundation methods.

@kfranqueiro
Copy link
Contributor

Also, it should be feasible to add tests for these 2 new methods, right?

@@ -150,6 +150,8 @@ Method Signature | Description
`activate() => void` | Proxies to the foundation's `activate` method
`deactivate() => void` | Proxies to the foundation's `deactivate` method
`layout() => void` | Proxies to the foundation's `layout` method
`handleFocus() => void` | Adds `BG_FOCUSED` class to the ripple surface
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd genericize these descriptions to simply state that they handle focus / blur events on the ripple surface (see also e.g. Text Field's descriptions of handle methods)

@abhiomkar abhiomkar changed the title feat(ripple): Expose focus/blur handlers fix(ripple): Expose focus/blur handlers Jun 8, 2018
@abhiomkar abhiomkar merged commit 31d81ad into master Jun 8, 2018
@kfranqueiro kfranqueiro deleted the fix_ripple_handlefocusblur_issue2838 branch August 1, 2018 16:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants