-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve support for right-to-left languages in Dashboard app (#…
…2985) Implements DHIS2-16778 Key features * Use logical CSS properties instead of physical properties throughout the project (done automatically with a tool) * Update the 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 by d2 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: * changing the UI library to support RTL: feat: rtl support for components [LIBS-525] ui#1448 * introducing an opt-in option in 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 configurable dir for language directions to app adapter [DHIS2-16480] app-platform#825 * updates to cli-style to enforce and apply rules for using logical CSS properties: feat: add stylelint cli-style#464
- Loading branch information
Showing
72 changed files
with
1,349 additions
and
2,087 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const { config } = require('@dhis2/cli-style') | ||
|
||
module.exports = { | ||
extends: [config.stylelint], | ||
rules: { | ||
'csstools/use-logical': [ | ||
true, | ||
{ | ||
// overriding the default config to error since this should be all fixed in this repo | ||
severity: 'error', | ||
}, | ||
], | ||
}, | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ const config = { | |
|
||
minDHIS2Version: '2.40', | ||
|
||
direction: 'auto', | ||
|
||
pwa: { | ||
enabled: true, | ||
caching: { | ||
|
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
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
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
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
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
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
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
Oops, something went wrong.