mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
(Arabic and its variants, Persian/Farsi, Hebrew, Uyghur, Uzbek-Arabic and Yiddish — the languages flagged `rtl: true` in `imports/i18n/languages.js`). Previously only some pages flipped. The root `<html>` element now gets a reactive `dir="rtl"`/`dir="ltr"` attribute that follows the chosen language, so the whole UI mirrors at once. To make this work on every page rather than a handful, all directional component CSS was converted to CSS logical properties (`margin-left`→`margin-inline-start`, `left:`→`inset-inline-start:`, `text-align: left`→`text-align: start`, `float: left`→`float: inline-start`, and the mirror-image right/end variants) across 48 stylesheets, which flip automatically with `dir`. Horizontal-centering rules using `left: 50%` + `transform: translate(-50%, …)` were intentionally kept physical, since those already center correctly in both directions. The calendar view also renders RTL. Thanks to xet7 and Claude. - Tests for the RTL UI. A fast, server-less `tests/rtl.test.js` (run with `node tests/rtl.test.js`) checks that exactly the expected languages are flagged `rtl: true`, that the direction helper maps each language to the right `dir` value, that the root `<html>` and the client keep `dir` in sync, and — as a regression guard — that component CSS keeps using logical properties (no physical `margin-left`/`float: left`/bare `left:` offsets sneak back in). A Playwright browser spec `tests/playwright/specs/18-rtl-layout.e2e.js` drives the app in both English (LTR) and Arabic (RTL) and asserts, on the boards list, board view, card details, my-cards / due-cards / global-search, the admin settings page and the login page, that the direction is correct, the translated text is visible, and leading-edge content (the boards menu, the first board list) sits on the correct side. Thanks to xet7 and Claude. - Fixed the "Meteor unit tests" CI job hanging until its 45-minute timeout. The workflow set `TEST_WATCH: '0'`, but meteortesting:mocha computes `testWatch: TEST_WATCH || …` and the string `'0'` is truthy in JavaScript, so it turned on watch mode and the process never exited. Removing the env var lets `meteor test --once` finish and exit with the correct status. Thanks to xet7 and Claude ! Fixes #6136, fixes #3376, fixes #884
281 lines
8.6 KiB
CSS
281 lines
8.6 KiB
CSS
.flex,
|
|
.setting-content .content-body .side-menu ul li a,
|
|
.option {
|
|
display: -webkit-box;
|
|
display: -moz-box;
|
|
display: -webkit-flex;
|
|
display: -moz-flex;
|
|
display: -ms-flexbox;
|
|
display: flex;
|
|
height: 100%;
|
|
}
|
|
.setting-content {
|
|
color: #727479;
|
|
background: #dedede;
|
|
width: 100%;
|
|
height: 100%;
|
|
position: absolute;
|
|
}
|
|
.setting-content .content-title {
|
|
font-size: clamp(16px, 3.5vw, 22px);
|
|
}
|
|
.setting-content .content-body {
|
|
display: flex;
|
|
/* Always keep the menu (left) and content (right) side by side, even on
|
|
narrow windows. The side menu has a fixed basis and the main body fills
|
|
the rest, so both stay visible without switching to a stacked layout. */
|
|
flex-direction: row;
|
|
flex-wrap: nowrap;
|
|
padding-top: 2vh;
|
|
height: 100%;
|
|
gap: 1.3vw;
|
|
}
|
|
.setting-content .content-body .side-menu {
|
|
background-color: #f7f7f7;
|
|
border: 1px solid #f0f0f0;
|
|
border-radius: 0.5vw;
|
|
width: min(250px, 32vw);
|
|
/* Never let the menu be squeezed away on narrow windows; keep it visible. */
|
|
flex: 0 0 auto;
|
|
box-shadow: inset -0.2vh -0.2vh 0.4vh rgba(0,0,0,0.05);
|
|
}
|
|
.setting-content .content-body .side-menu ul li {
|
|
margin: 0.2vh 0.3vw;
|
|
}
|
|
.setting-content .content-body .side-menu ul li.active {
|
|
background: #fff;
|
|
box-shadow: 0 0.2vh 0.3vh rgba(0,0,0,0.15);
|
|
}
|
|
.setting-content .content-body .side-menu ul li:hover {
|
|
background: #fff;
|
|
box-shadow: 0 0.2vh 0.3vh rgba(0,0,0,0.15);
|
|
}
|
|
.setting-content .content-body .side-menu ul li a {
|
|
padding: 1.3vh 0 1.3vh 1.3vw;
|
|
width: 95%;
|
|
}
|
|
.setting-content .content-body .side-menu ul li a span {
|
|
font-size: 13px;
|
|
}
|
|
.setting-content .content-body .side-menu ul li a i {
|
|
margin-inline-end: 20px;
|
|
}
|
|
.setting-content .content-body .main-body {
|
|
-webkit-user-select: text;
|
|
-moz-user-select: text;
|
|
-ms-user-select: text;
|
|
user-select: text;
|
|
max-height: 100%;
|
|
overflow-x: scroll !important;
|
|
overflow-y: scroll !important;
|
|
scrollbar-gutter: stable;
|
|
/* Grow into the space left next to the side menu. flex-basis MUST be 0 here:
|
|
this element holds a min-width:1200px table and a 100vw ::after, so a
|
|
content-based (auto) basis is huge and, as an overflow:scroll flex item,
|
|
resolves unpredictably (collapsing the panel). Basis 0 + grow makes the
|
|
width = container - side menu, deterministically. min-width:0 lets it
|
|
shrink so the side menu is never pushed out on narrow windows. */
|
|
flex: 1 1 0;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* Ensure scrollbars are always visible with proper styling for all admin pages */
|
|
.setting-content .content-body .main-body::-webkit-scrollbar {
|
|
width: 12px;
|
|
height: 12px;
|
|
display: block !important;
|
|
visibility: visible !important;
|
|
}
|
|
|
|
.setting-content .content-body .main-body::-webkit-scrollbar-track {
|
|
background: #f1f1f1;
|
|
border-radius: 6px;
|
|
display: block !important;
|
|
visibility: visible !important;
|
|
}
|
|
|
|
.setting-content .content-body .main-body::-webkit-scrollbar-thumb {
|
|
background: #888;
|
|
border-radius: 6px;
|
|
display: block !important;
|
|
visibility: visible !important;
|
|
}
|
|
|
|
.setting-content .content-body .main-body::-webkit-scrollbar-thumb:hover {
|
|
background: #555;
|
|
}
|
|
|
|
.setting-content .content-body .main-body::-webkit-scrollbar-corner {
|
|
background: #f1f1f1;
|
|
}
|
|
|
|
/* Ensure tables and content are wide enough to trigger horizontal scrolling */
|
|
.setting-content .content-body .main-body table {
|
|
min-width: 1200px !important;
|
|
width: max-content !important;
|
|
table-layout: auto !important;
|
|
}
|
|
|
|
/* Force tables to always trigger horizontal scrolling */
|
|
.setting-content .content-body .main-body table td,
|
|
.setting-content .content-body .main-body table th {
|
|
white-space: nowrap;
|
|
min-width: 120px;
|
|
}
|
|
|
|
/* Ensure there's enough content to trigger vertical scrolling */
|
|
.setting-content .content-body .main-body {
|
|
min-height: calc(100vh - 200px);
|
|
padding-bottom: 50px;
|
|
}
|
|
|
|
/* Admin panel buttons should use theme darker color */
|
|
.setting-content .content-body .main-body .setting-detail button.btn {
|
|
background: #005377;
|
|
color: #fff;
|
|
border: none;
|
|
}
|
|
|
|
.setting-content .content-body .main-body .setting-detail button.btn:hover,
|
|
.setting-content .content-body .main-body .setting-detail button.btn:focus {
|
|
background: #004766;
|
|
color: #fff;
|
|
}
|
|
|
|
.setting-content .content-body .main-body .setting-detail button.btn:active {
|
|
background: #01628c;
|
|
color: #fff;
|
|
}
|
|
|
|
/* Force horizontal scrollbar to always be visible at bottom */
|
|
.setting-content .content-body .main-body {
|
|
position: relative;
|
|
}
|
|
|
|
/* Add invisible content to force horizontal scrolling when needed */
|
|
.setting-content .content-body .main-body::after {
|
|
content: '';
|
|
display: block;
|
|
width: 100vw;
|
|
height: 1px;
|
|
position: absolute;
|
|
bottom: 0;
|
|
inset-inline-start: 0;
|
|
pointer-events: none;
|
|
}
|
|
.setting-content .content-body .main-body ul li {
|
|
padding: 0.5rem 0.5rem;
|
|
}
|
|
.setting-content .content-body .main-body ul li a .is-checked {
|
|
border-bottom: 2px solid #3cb500;
|
|
border-inline-end: 2px solid #3cb500;
|
|
}
|
|
/* Grey checkmarks when grey icons setting is enabled */
|
|
body.grey-icons-enabled .setting-content .content-body .main-body ul li a .is-checked {
|
|
border-bottom: 2px solid #7a7a7a;
|
|
border-inline-end: 2px solid #7a7a7a;
|
|
}
|
|
.setting-content .content-body .main-body ul li a span {
|
|
padding: 0 0.5rem;
|
|
}
|
|
.setting-content .content-body .main-body ul li .admin-announcement,
|
|
.setting-content .content-body .main-body ul li .admin-accessibility,
|
|
.setting-content .content-body .main-body ul li .invite-people,
|
|
.setting-content .content-body .main-body ul li .layout {
|
|
padding-inline-start: 20px;
|
|
}
|
|
.setting-content .content-body .main-body ul li .admin-announcement li,
|
|
.setting-content .content-body .main-body ul li .admin-accessibility li,
|
|
.setting-content .content-body .main-body ul li .invite-people li,
|
|
.setting-content .content-body .main-body ul li .layout li {
|
|
min-width: 500px;
|
|
}
|
|
.setting-content .content-body .main-body ul li .admin-announcement li ul.no-margin-bottom,
|
|
.setting-content .content-body .main-body ul li .admin-accessibility li ul.no-margin-bottom,
|
|
.setting-content .content-body .main-body ul li .invite-people li ul.no-margin-bottom,
|
|
.setting-content .content-body .main-body ul li .layout li ul.no-margin-bottom {
|
|
margin-bottom: 0;
|
|
}
|
|
.setting-content .content-body .main-body ul li .admin-announcement li .bg-white a,
|
|
.setting-content .content-body .main-body ul li .admin-accessibility li .bg-white a,
|
|
.setting-content .content-body .main-body ul li .invite-people li .bg-white a,
|
|
.setting-content .content-body .main-body ul li .layout li .bg-white a {
|
|
background: #f7f7f7;
|
|
}
|
|
.setting-content .content-body .main-body ul li .admin-announcement li .bg-white a.is-checked,
|
|
.setting-content .content-body .main-body ul li .admin-accessibility li .bg-white a.is-checked,
|
|
.setting-content .content-body .main-body ul li .invite-people li .bg-white a.is-checked,
|
|
.setting-content .content-body .main-body ul li .layout li .bg-white a.is-checked {
|
|
background: #fff;
|
|
}
|
|
.setting-content .content-body .main-body ul li input[type=radio] {
|
|
margin: 4px;
|
|
}
|
|
.option {
|
|
-webkit-border-radius: 3px;
|
|
border-radius: 3px;
|
|
background: #fff;
|
|
text-decoration: none;
|
|
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2);
|
|
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
|
|
margin-top: 5px;
|
|
padding: 5px;
|
|
}
|
|
.title {
|
|
font-weight: 700;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
.description {
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
.bg-white {
|
|
background: #f9fbfc;
|
|
}
|
|
.wekan-form-control.has-error {
|
|
border-color: #a94442;
|
|
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
|
|
}
|
|
li.has-error {
|
|
color: #a94442;
|
|
}
|
|
li.has-error .form-group .wekan-form-control {
|
|
border-color: #a94442;
|
|
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
|
|
}
|
|
|
|
/* Constrain textarea elements with balanced left/right spacing */
|
|
.setting-content .content-body .main-body textarea.wekan-form-control {
|
|
width: calc(100% - 20px);
|
|
margin: 0 10px;
|
|
max-width: calc(100vw - 320px);
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* For nested custom head/manifest/assetlinks sections */
|
|
.setting-content .content-body .main-body .custom-head-settings textarea.wekan-form-control,
|
|
.setting-content .content-body .main-body .custom-manifest-settings textarea.wekan-form-control,
|
|
.setting-content .content-body .main-body .custom-assetlinks-settings textarea.wekan-form-control {
|
|
width: calc(100% - 20px);
|
|
margin-inline-start: 0;
|
|
margin-inline-end: 10px;
|
|
max-width: calc(100vw - 240px);
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.setting-content .content-body .main-body .attachment-limit-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
max-width: 560px;
|
|
}
|
|
|
|
.setting-content .content-body .main-body .attachment-limit-row input.wekan-form-control {
|
|
flex: 1;
|
|
min-width: 200px;
|
|
}
|
|
|
|
.setting-content .content-body .main-body .attachment-limit-row select.wekan-form-control {
|
|
width: 120px;
|
|
min-width: 120px;
|
|
}
|