Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

fix(Modal): Use Transition to simplify animation; add close button; convert to hooks #24

Merged
merged 6 commits into from
Mar 13, 2019

Conversation

kylealwyn
Copy link
Contributor

No description provided.

@codecov-io
Copy link

codecov-io commented Mar 2, 2019

Codecov Report

Merging #24 into master will increase coverage by 2.92%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #24      +/-   ##
==========================================
+ Coverage   71.91%   74.84%   +2.92%     
==========================================
  Files          12       12              
  Lines         146      163      +17     
  Branches       19       24       +5     
==========================================
+ Hits          105      122      +17     
  Misses         31       31              
  Partials       10       10
Impacted Files Coverage Δ
src/utils.js 100% <0%> (ø) ⬆️
src/Card/Card.js 100% <0%> (ø) ⬆️

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 045ae6a...b8f91ce. Read the comment docs.

@kylealwyn kylealwyn changed the title fix(Modal): Use Transition to simplify animation fix(Modal): Use Transition to simplify animation; convert to hooks Mar 7, 2019
@kylealwyn kylealwyn changed the title fix(Modal): Use Transition to simplify animation; convert to hooks fix(Modal): Use Transition to simplify animation; add close button; convert to hooks Mar 7, 2019
@kylealwyn kylealwyn requested a review from a team March 12, 2019 18:40
useEffect(() => {
document.addEventListener('keydown', handleKeyDown);
return () => document.removeEventListener('keydown', handleKeyDown);
})

Choose a reason for hiding this comment

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

worth conditionally firing with [isOpen, props.closeOnEscape]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just gave that a try. Presented weird behavior that closes both modals and reopens the second when pressing escape

Copy link
Contributor

@cehsu cehsu left a comment

Choose a reason for hiding this comment

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

Looks good. When testing locally, I noticed a non-blocking, existing error regarding the .mdx file not providing keys to the mapped <p> in the console.

@kylealwyn kylealwyn merged commit 4e0f374 into master Mar 13, 2019
@kylealwyn kylealwyn deleted the fix/modal-enhancements branch March 13, 2019 16:44
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.

4 participants