-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
RTL support for user content in the app #4970
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conflicts: # jsapp/js/components/common/multiCheckbox.tsx
# Conflicts: # jsapp/js/account/usage/usageProjectBreakdown.tsx # jsapp/js/components/common/modal.scss # jsapp/js/components/library/assetContentSummary.tsx # jsapp/js/components/modalForms/languageForm.es6 # jsapp/js/components/modalForms/translationSettings.es6 # jsapp/js/components/submissions/columnsHideForm.tsx # jsapp/js/components/submissions/tableColumnSortDropdown.es6 # jsapp/scss/libs/react-tagsinput.scss
# Conflicts: # jsapp/js/components/common/modal.scss # jsapp/js/components/reports/reportTable.component.tsx # jsapp/js/components/submissions/submissionDataTable.scss # jsapp/scss/components/_kobo.bem.ui.scss
RuthShryock
requested changes
Jul 30, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just two comments :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
Description
Almost all the places that display user-generated content will now correctly display RTL text (regardless of the app language selected in settings, i.e. Arabic text in English UI will be displayed as RTL).
Notes
Good reading on styling RTL: https://rtlstyling.com/
Things changed:
dir="auto"
to a lot of places - it makes the browser built-in functionality decide how to render the contents of given HTML node. Some notable components (that will handle RTL out of the box now):KoboTagsInput
KoboSelect
MultiCheckbox
TextBox
(this was already done in [TASK-548] NLP add rtl script support #4904)ToggleSwitch
: it now works correctly when parent gives itdir="auto"
margin-*
tomargin-inline-*
, as the first doesn't changed when RTL direction kicks in, and the latter does it awesomely (Note: we should most probably migrate much more margins in future)text-align: left
totext-align: initial
, as only the latter supports RTLKoboSelect
component now supports placement (the more genericKoboDropdown
already supports placement, so we only had to pass it on)CopyTeamPermissions
component (from project sharing modal) now uses ourKoboSelect
componentjsapp/scss/libs/react-tagsinput.scss
Testing tips:
cmd+c
shortcut so best to userightclick→copy
). At least have:dir="auto"
changes. But for sure these places are improved:Related issues
Related to #4904