Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dir is not being injected in Mobile layout #1136

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

AhyoungRyu
Copy link
Contributor

No description provided.

@AhyoungRyu AhyoungRyu self-assigned this Jun 13, 2024
@@ -29,7 +29,6 @@
@include mobile() {
min-width: 288px;
width: 100%;
padding-right: 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The channel creation dialog layout won't be broken even without this.

LTR

Screenshot 2024-06-13 at 4 36 26 PM

RTL

Screenshot 2024-06-13 at 4 36 22 PM

@AhyoungRyu AhyoungRyu requested a review from HoonBaek June 13, 2024 07:49
Copy link
Collaborator

@HoonBaek HoonBaek left a comment

Choose a reason for hiding this comment

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

LGTM

useEffect(() => {
ELEMENT_IDS.forEach((id) => {
const element = document.getElementById(id);
if (element) {
element.dir = direction;
}
});
}, [direction]);
}, [direction, isMobile]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

isMobile is determined within useMediaQueryContext, and this needs to run separately of the useApplyTextDirection hook. This ensures that the internal logic of the useApplyTextDirection hook is executed only after the isMobile value has been properly set.

@AhyoungRyu AhyoungRyu merged commit 49bd7c6 into feat/CLNP-3674 Jun 13, 2024
4 checks passed
@AhyoungRyu AhyoungRyu deleted the fix/mobile-rtl-layout branch June 13, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants