Handle RTL in modals#2864
Conversation
9f6ec9b to
f1ff4c9
Compare
f1ff4c9 to
72a6fac
Compare
src/containers/error-boundary.jsx
Outdated
| }); | ||
|
|
||
| export default connect( | ||
| mapStateToProps |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
kchadha
left a comment
There was a problem hiding this comment.
One minor comment and also a question --
As far as I can tell, the unsupported browser modal doesn't look any different than before, is that true? And I wasn't sure, but should the image in the unsupported browser modal look any different or be flipped? I don't know if we have any examples of the entire browser changing its layout when in RTL...
|
I didn't reverse the browser image because it's just a facsimile of a browser window, but I just checked on one of the tablets and the arrows are to the right of the address bar in Chrome so perhaps it should. The other parts didn't change because everything is centered. |
Also just cleaner formatting of the connect in the `errorBoundary` container
4797f0b to
86c51bc
Compare
|
@kchadha I've added the no-op mapDispatchToProps to the errorBoundary container. |
|
Not a big deal but, I think both arguments to connect are optional and not passing mapDispatchToProps is very common C:\Users\DD\Git\scratch-gui\src\components\gui\gui.jsx: C:\Users\DD\Git\scratch-gui\src\components\stage-header\stage-header.jsx: C:\Users\DD\Git\scratch-gui\src\containers\custom-procedures.jsx: C:\Users\DD\Git\scratch-gui\src\containers\modal.jsx: C:\Users\DD\Git\scratch-gui\src\containers\paint-editor-wrapper.jsx: C:\Users\DD\Git\scratch-gui\src\containers\sound-editor.jsx: |
|
@fsih then are we wrong about what creates this warning? Because it wasn't always there... |

Resolves
What Github issue does this resolve (please include link)?
Proposed Changes
Describe what this Pull Request does
Wraps the modal content in a
<div dir=...and sets the direction based on theisRtlstate. Handles all the modals that useReactModaldirectly not theModalcomponent.Test Coverage
Try it:
https://chrisgarrity.github.io/scratch-gui/feature/2759-modals/?locale=he
Manual Testing:
Browser Coverage
Check the OS/browser combinations tested (At least 2)
Mac
Windows
Chromebook
iPad
Android Tablet