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

Fix for #1619 & #579 & #225 #1621

Closed
wants to merge 6 commits into from
Closed

Fix for #1619 & #579 & #225 #1621

wants to merge 6 commits into from

Conversation

jonhue
Copy link

@jonhue jonhue commented Nov 21, 2017

@amsheehan

Building on @jamesmfriedman 's proposal, I found that this solution is working for me.

Fixing #1619, #579

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

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.

This PR appears to be breaking tests. It also seems to reference a method that isn't guaranteed to exist? (componentClickHandler_ is created on MDCTemporaryDrawerFoundation instances, but you're referencing it in MDCSlidableDrawerFoundation; the former extends the latter, not the other way around.)

More importantly, though, I clearly notice a regression: now even when you click anywhere within the drawer in the Temporary Drawer demo, it immediately hides the drawer. Preventing this was what the stopPropagation was doing before.

We can't simply remove the stopPropagation call; we need to reimplement the behavior that stopPropagation was accomplishing by other means. I suspect this would amount to checking in the current temporary drawer click handler whether the click actually came from the inner drawer element, and not closing the drawer if it did.

@jamesmfriedman
Copy link
Contributor

@kfranqueiro it seems that this PR was based off some work I did in my React lib. In my code, I do a check in the event path to see whether or not I should close it.

@jonhue, take a look.

https://github.com/jamesmfriedman/rmwc/blob/master/src/Base/withMDCDrawer.js#L36

@googlebot
Copy link

CLAs look good, thanks!

@jonhue
Copy link
Author

jonhue commented Nov 23, 2017

@kfranqueiro

It should work as intended now.

@jonhue
Copy link
Author

jonhue commented Nov 23, 2017

This should fix #225 as well.

@jonhue jonhue changed the title Fix for #1619 & #579 Fix for #1619 & #579 & #225 Nov 23, 2017
@codecov-io
Copy link

codecov-io commented Nov 23, 2017

Codecov Report

Merging #1621 into master will decrease coverage by 0.05%.
The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1621      +/-   ##
==========================================
- Coverage   99.62%   99.56%   -0.06%     
==========================================
  Files          72       72              
  Lines        3439     3446       +7     
  Branches      420      424       +4     
==========================================
+ Hits         3426     3431       +5     
- Misses         13       15       +2
Impacted Files Coverage Δ
packages/mdc-drawer/slidable/foundation.js 98.58% <75%> (-1.42%) ⬇️

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 875e393...d0d24c7. Read the comment docs.

@jonhue
Copy link
Author

jonhue commented Nov 25, 2017

@kfranqueiro

I'd love it, if this could be merged!

@jonhue
Copy link
Author

jonhue commented Dec 1, 2017

@acdvorak @lynnjepsen

Why doesn't this get merged?

@kfranqueiro
Copy link
Contributor

We've merged 3e173e1 (based on #1138) which resolves this by completely removing stopPropagation from the drawer code.

@kfranqueiro kfranqueiro closed this Dec 4, 2017
@jonhue
Copy link
Author

jonhue commented Jan 1, 2018

@kfranqueiro When can I expect the changes to be released?

@kfranqueiro
Copy link
Contributor

Our next release should be next Monday (we skipped one release cycle due to the holidays).

@jamesmfriedman
Copy link
Contributor

Awesome, I'm looking forward to this one! It also seems like the temporary drawer is suffering from some animation issues on the newest iOS safari, but it could very likely be related to the hacky workaround I had to implement to fix this in RMWC.

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.

5 participants