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 more rtl issues #8194

Merged
merged 11 commits into from
Sep 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 38 additions & 8 deletions packages/rocketchat-google-vision/.npm/package/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion packages/rocketchat-livechat/app/client/lib/tapi18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ this.tr = function(key, options, ...replaces) {
}
};

this.isRtl = (language) => language != null && ['ar', 'dv', 'fa', 'he', 'ku', 'ps', 'sd', 'ug', 'ur', 'yi'].includes(language.split('-').shift().toLowerCase());
this.isRtl = (lang) => {
const language = lang ? lang : localStorage.getItem('userLanguage');
return ['ar', 'dv', 'fa', 'he', 'ku', 'ps', 'sd', 'ug', 'ur', 'yi'].includes(language.split('-').shift().toLowerCase());
};
2 changes: 0 additions & 2 deletions packages/rocketchat-livechat/client/stylesheets/livechat.less
Original file line number Diff line number Diff line change
Expand Up @@ -625,8 +625,6 @@
}

.livechat-status {
float: right;
margin-right: 16px;
font-size: 20px;
line-height: 18px;
color: #9d9fa3;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<template name="livechat">
<div class="livechat-section">
<h3 class="rooms-list__type {{isActive}}">
<span class="rooms-list__type-text--livechat">{{_ "Livechat"}}</span>
{{#with available}}
<i class="livechat-status {{status}} {{icon}}" title="{{hint}}"></i>
{{/with}}
{{_ "Livechat"}}
</h3>

{{#if guestPool}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,9 @@
}
}
}

.rtl .rc-message-box__typing {
right: 0;

margin-right: 24px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,8 @@
.first-unread .message-actions {
top: 18px;
}

.rtl .message-actions {
right: auto;
left: 2px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

&__switches {
display: flex;
flex-wrap: wrap;
}

& .rc-switch {
Expand All @@ -47,3 +48,15 @@
opacity: 1;
}
}

@media (width <= 400px) {
.create-channel {
& .rc-switch {
width: 100%;

&:not(:last-child) {
margin-bottom: 2rem;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,42 @@
}

&__back-text {
margin-right: 0.375rem;
margin-right: 2px;

line-height: 22px;
}

&__back-icon {
width: 10px;
height: 10px;
stroke: currentColor;
transform: rotate(45deg);

font-size: 1rem;
}
}

@media (width < 1024px) {
.full-modal {
padding: 50px;

&__wrapper {
margin: 0;
}
}
}

@media (width <= 400px) {
.full-modal {
&__back-button {
top: -1.5rem;
}
}
}

.rtl .full-modal {
&__back-button {
left: 0
}

&__back-text {
margin-left: 0.375rem;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,10 @@
opacity: 1;
}
}

.rtl .rc-popover {
&__item-text {
margin-right: 0.25rem;
margin-left: auto;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
font-size: var(--rooms-list-title-text-size);
align-items: center;

&-text {
margin: 0 8px;
&-text--livechat {
flex: 1;
}
}

&__empty-room {
margin-left: calc(var(--sidebar-default-padding) - calc(var(--sidebar-default-padding) / 3));
padding: 0 var(--sidebar-default-padding);

color: var(--rooms-list-empty-text-color);

Expand Down Expand Up @@ -62,10 +62,6 @@
.rooms-list {
&__type,
&__empty-room {
margin-left: 0;
}

&__type {
padding: 0 calc(var(--sidebar-small-default-padding) - 4px) 0.5rem calc(var(--sidebar-small-default-padding) - 4px);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.sidebar__account {
display: flex;

margin: calc(var(--sidebar-default-padding) / 2) 0;
margin: 0 0 var(--sidebar-header-small-padding);

padding: calc(var(--sidebar-default-padding) / 2) var(--sidebar-default-padding);
padding: var(--sidebar-header-small-padding) var(--sidebar-default-padding) var(--sidebar-header-small-padding);

align-items: center;

Expand All @@ -21,6 +21,10 @@
& .sidebar__account-menu {
fill: var(--sidebar-account-username-color-darker);
}

&.active:hover {
background-color: var(--sidebar-background-light-hover);
}
}

&-thumb {
Expand All @@ -29,7 +33,7 @@

width: var(--sidebar-account-thumb-size);
height: var(--sidebar-account-thumb-size);
margin: 0 0.5rem;
margin: 0 0.5rem 0 0;
}

&-data {
Expand Down Expand Up @@ -144,6 +148,7 @@
@media (width <= 400px) {
.sidebar__account {
margin: 0 0 5px;
padding: var(--sidebar-header-small-padding) calc(var(--sidebar-small-default-padding) - 8px) var(--sidebar-header-small-padding);

&-thumb {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
&__back-button {
margin-left: 0.25rem;

padding: 1rem var(--sidebar-default-padding) 1.5rem;

color: var(--sidebar-flex-back-button-color);

font-size: 1rem;
Expand Down Expand Up @@ -36,3 +38,11 @@
}
}
}

@media (width <= 400px) {
.sidebar-flex {
&__back-button {
padding: 1rem calc(var(--sidebar-small-default-padding) - 8px) 1.5rem;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
text-overflow: ellipsis;

font-size: var(--sidebar-item-text-size);
line-height: var(--sidebar-item-height);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@

@media (width <= 400px) {
.toolbar {
padding: 0 var(--sidebar-small-default-padding) var(--sidebar-small-default-padding);
padding: 0 calc(var(--sidebar-small-default-padding) - 8px) var(--sidebar-small-default-padding);
}
}

.rtl .toolbar {
& .rc-input__icon + .rc-input__element {
padding: 0.5rem 2.25rem 0.5rem 1rem;
}
}
5 changes: 5 additions & 0 deletions packages/rocketchat-theme/client/imports/forms/popup-list.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,8 @@
}
}
}

.rtl .rc-popup-list__item-image {
margin-right: 0;
margin-left: 1rem;
}
15 changes: 15 additions & 0 deletions packages/rocketchat-theme/client/imports/forms/switch.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,18 @@
font-size: var(--input-font-size);
}
}

.rtl .rc-switch {
&__button {
margin-right: 0;
margin-left: 0.5rem;
}

&__button-inside {
transform: translate3d(-13px, 1px, 0);
}

&__input:checked + .rc-switch__button .rc-switch__button-inside {
transform: translate3d(-1px, 1px, 0);
}
}
18 changes: 5 additions & 13 deletions packages/rocketchat-theme/client/imports/general/rtl.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
.rtl {
direction: rtl;

& .rc-old .page-container .content .rocket-form .submit {
text-align: left;
}

& button {
text-align: right;
}
Expand Down Expand Up @@ -237,7 +241,7 @@
}

& .messages-box {
margin: 60px 0 0 20px;
margin: 60px 0 0;

& .new-message {
right: 50%;
Expand Down Expand Up @@ -641,18 +645,6 @@
}
}

& .first-unread .body {
&::before {
right: 20px;
left: 0;
}

&::after {
right: auto;
left: 0;
}
}

& .ticks-bar {
right: auto;
left: 2px;
Expand Down
Loading