feat: improve support for right-to-left languages in Dashboard app #2985
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.
Implements DHIS2-16778
Key features
cli-style
to a version that supports checking logical properties (and automatically converting physical to logical properties)Description
This PR implements better support for right-to-left languages in the app, by leveraging the use of logical CSS properties that are independent of language direction, rather than physical properties (i.e.
*-start
instead of-left
and*-end
instead*-right
). Logical properties are widely supported now and they should become the default way for layout going-forward to ensure that we support RTL languages without extra development burden (which will be enforced byd2 style
).Although the change set is big. It's mostly done automatically using
d2 style apply css
which under the hood uses stylelint to enforce and apply the rules.The better support for RTL builds on top of previous work done in the platform, namely:
d2.config
that allows apps to declare they're ready to support RT. The platform changes also takes care of setting the correct direction and language for the header among other things: feat: add configurabledir
for language directions to app adapter [DHIS2-16480] app-platform#825Testing
Screenshots