-
Notifications
You must be signed in to change notification settings - Fork 974
When Modal Overlays are layered, only bottom layer has a dark background (fix #4808) #4820
Conversation
Could you provide before / after screenshots? |
@bbondy, yep! |
Viewing the code I think setting background:none to |
@luixxiul agree. I just tested this and replaced my commit in this PR with your solution by force-push. |
@willy-b One slight problem with this PR (sorry it hadn't been looked at before If the top level modal is smaller than the previous one / ones, you can see that they aren't being grayed out. In this case, I had to hack the DOM to get this showing... but if the child window is smaller, this would be a problem. I simulated this by cracking open the dev tools and removing the main content div from the "recover your wallet" page |
good catch. looking into this now |
hey @bsclifton, after trying a bunch of CSS-only solutions, I fixed this by adding some logic to keep track of all the ModalOverlay instances and ensure only the top-most one has a It's a little trickier than it looks ( |
If |
@willy-b it does look good for |
@bsclifton: there is now only one modal background in view for all cases and the QR popup background is styled correctly. the background for the Coinbase iframe modal is still a bit darker because the background is actually from Coinbase's site which uses a darker gray. not sure what the best approach there is, feel free to advise! |
@willy-b sorry it's taken me a few days to get back to you; I tried this out...\
Regarding the iframe styles, the coloring is in the body tag for the buy widget. You might be able to select it with document.querySelectAll() and then update the object returned's style attribute (removing background-color or replacing with transparent). |
Hey @bsclifton, I made the change you asked for, but I just noticed @luixxiul has some changes on the way that may obsolete this (see #6009 (comment)). |
Didn't mean to step on your toes @luixxiul, didn't see your changes. |
@willy-b No, I cannot find a solution by myself. Please go ahead :-) |
Sorry. I'm confused. Is this issue supposed to be fixed in commit https://github.com/luixxiul/browser-laptop/commit/2327e9eca53eb4a637dd4c3e3a2a1d1f613c2fbc#commitcomment-19937858? |
This looks fixed in your screenshots, let's close this PR. |
OK, I just tested your commit @luixxiul https://github.com/luixxiul/browser-laptop/commit/2327e9eca53eb4a637dd4c3e3a2a1d1f613c2fbc#commitcomment-19937858 , and it looks perfect for the recovery dialog. The QR code popup still has a double overlay, which is not present in this PR, but I'm sure you can fix that too. The results are otherwise identical and your solution is MUCH cleaner (all CSS/LESS). You guys (@bsclifton, @luixxiul) make the call. Thanks! |
@willy-b I have been trying CSS solution too but couldn't find the solution. I thnk it doesn't solve the issue found by @bsclifton here above: #4820 (comment) |
OK awesome; @luixxiul's PR has been accepted. @willy-b, can you rebase? I think you're safe to own this change (the darkening of the modal issue) since you had already started this with a PR. Your last commit that I tested was working great, but we just needed to tune the behavior with regards to the buy widget... choosing either to:
|
- tried several CSS-only solutions for ensuring only the top-most modal had a gray background, but I think using some JS is actually simpler, so that is what I did here - keeping modalOverlay background when opening iframe w/ Coinbase widget (decision made w/ @bsclifton after trying alternatives) fixes #4808
Hey @bsclifton, thanks again for reviewing. I pushed a commit implementing the first option (keeping the overlay for the Coinbase iframe) 4 days ago and force-pushed a rebase of that here just now. (in case anyone wants to check something, I kept the old/pre-rebase branch at https://github.com/willy-b/browser-laptop/tree/issue-4808-old) |
Great job! This looks and feels great 😄 @cezaraugusto, wanna give it a go? |
++!! looks awesome, great work! |
@willy-b Hi Willy, is it possible to add |
@luixxiul would you be able to open a separate issue for that? I think it's possible, but would be good to track separately 😄 |
git rebase -i
to squash commits (if needed).Test Plan: