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

Right to left (RTL) direction support #833

Merged
merged 48 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
d849d7c
Right to left (RTL) direction support
timisenco2015 Jul 4, 2023
efa9008
Right to left (RTL) direction support
timisenco2015 Jul 4, 2023
876ca65
add RTL to about.vue
timisenco2015 Jul 4, 2023
5ae956a
add RTL to about.vue
timisenco2015 Jul 4, 2023
4d3b78a
Fix RTL alignment on create new form ui
timisenco2015 Jul 6, 2023
6c299da
fix multilanguage RTL alginment issues
timisenco2015 Jul 7, 2023
20d7ca4
Merge branch 'master' of https://github.com/timisenco2015/common-host…
timisenco2015 Jul 15, 2023
31cdd85
working on alignment issue for rtl support
timisenco2015 Jul 15, 2023
4286c17
remove codes that I should not have commited
timisenco2015 Jul 15, 2023
06c81ff
Fix rtl aligment issues in APIKey and FormSetting
timisenco2015 Jul 17, 2023
6a51f80
Merge branch 'master' of https://github.com/timisenco2015/common-host…
timisenco2015 Jul 18, 2023
229d078
fix alignment issues with RTL languages support
timisenco2015 Jul 18, 2023
8a44487
Fix alignment issues with RTL languages support
timisenco2015 Jul 18, 2023
b1a9147
fix PR review suggested changes
timisenco2015 Jul 18, 2023
484660c
fix PR review suggested changes
timisenco2015 Jul 18, 2023
b2d9134
remove delCurrformErrMsg translations from all the translation files
timisenco2015 Jul 18, 2023
c6d9456
remove delCurrformErrMsg translations from all the translation files
timisenco2015 Jul 18, 2023
4cf2549
remove slider css
timisenco2015 Jul 18, 2023
dd18c2c
remove slider css
timisenco2015 Jul 18, 2023
6d89111
remove multiLanguage from computed
timisenco2015 Jul 18, 2023
76a52a7
remove multiLanguage from computed
timisenco2015 Jul 18, 2023
54a0b7e
fix alignment issues
timisenco2015 Jul 19, 2023
a6f5ab1
fix alignment issues
timisenco2015 Jul 19, 2023
cb023f0
fix layout issue
timisenco2015 Jul 19, 2023
6181b1f
code clean up and refractoring
timisenco2015 Jul 19, 2023
27ab5b5
Code clean up and refractor
timisenco2015 Jul 19, 2023
28d06d1
more alignment fixed for rtl support
timisenco2015 Jul 19, 2023
cff8952
more alignment fixed for rtl support
timisenco2015 Jul 19, 2023
7128004
remove multiLanguage from AdminPage
timisenco2015 Jul 19, 2023
88f152e
remove multiLanguage from AdminPage
timisenco2015 Jul 19, 2023
ea09f69
fix missing translation and alignment issues, remove pu.json
timisenco2015 Jul 19, 2023
1f89a55
fix missing translation and alignment issues, remove pu.json
timisenco2015 Jul 19, 2023
51ac43e
fix PR review suggested changes
timisenco2015 Jul 20, 2023
32feb2b
fix PR review suggested changes
timisenco2015 Jul 20, 2023
bf6d40a
fix wrong error message in create.vue
timisenco2015 Jul 20, 2023
13fb540
Merge pull request #911 from timisenco2015/chefs_rtl_supports
timisenco2015 Jul 20, 2023
f240fc4
fix RTL align Preview.vue and others
timisenco2015 Jul 20, 2023
e60927d
fix RTL align Preview.vue and others
timisenco2015 Jul 20, 2023
6a448f4
remove getStarted from homepage chefsHowToSub translation
timisenco2015 Jul 20, 2023
536ed0b
general review and fixing alignment issue with RTL
timisenco2015 Jul 21, 2023
e03f4ce
remove typo
timisenco2015 Jul 21, 2023
94e7f76
general review and fixing alignment issue with RTL
timisenco2015 Jul 21, 2023
5e92c39
fix language selection drop menu height in home page
timisenco2015 Jul 25, 2023
3acbf14
fix language selection drop menu height in home page
timisenco2015 Jul 25, 2023
8b8163e
remove span from ul li tags in FormDisclaimer
timisenco2015 Jul 25, 2023
537ae36
remove span from ul li tags in FormDisclaimer
timisenco2015 Jul 25, 2023
7de7175
remove rtl support for vuetify v-switch
timisenco2015 Jul 25, 2023
a5c4682
remove rtl support for vuetify v-switch
timisenco2015 Jul 25, 2023
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
23 changes: 23 additions & 0 deletions app/frontend/src/assets/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -592,3 +592,26 @@ a,
justify-content: center;
min-height: 300px;
}

.label .v-label {
right: 0 !important;
left: auto !important;
}

.flex-xs-column-reverse {
flex-direction: column-reverse;
}

.flex-xs-column {
flex-direction: column;
}

.dir-rtl {
direction: rtl !important;
text-align: right;
}

.dir-ltl {
direction: ltr !important;
text-align: left;
}
20 changes: 16 additions & 4 deletions app/frontend/src/components/admin/AdminFormsTable.vue
Original file line number Diff line number Diff line change
@@ -1,24 +1,35 @@
<template>
<div>
<div :class="{ 'dir-rtl': isRTL }">
<v-row no-gutters>
<v-col cols="12" sm="8">
<v-checkbox
class="pl-3"
:class="isRTL ? 'float-right' : 'float-left'"
v-model="activeOnly"
:label="$t('trans.adminFormsTable.showDeletedForms')"
@click="refeshForms"
/>
>
<template #label>
<span :class="{ 'mr-2': isRTL }">
{{ $t('trans.adminFormsTable.showDeletedForms') }}
</span>
</template>
</v-checkbox>
</v-col>

<v-col cols="12" sm="4">
<!-- search input -->
<div class="submissions-search">
<div
class="submissions-search"
:class="isRTL ? 'float-left' : 'float-right'"
>
<v-text-field
v-model="search"
append-icon="mdi-magnify"
:label="$t('trans.adminFormsTable.search')"
single-line
hide-details
class="pb-5"
:class="{ 'dir-rtl': isRTL, label: isRTL }"
/>
</div>
</v-col>
Expand Down Expand Up @@ -85,6 +96,7 @@ export default {
},
computed: {
...mapGetters('admin', ['formList']),
...mapGetters('form', ['isRTL']),
calcHeaders() {
return this.headers.filter(
(x) => x.value !== 'updatedAt' || this.activeOnly
Expand Down
12 changes: 11 additions & 1 deletion app/frontend/src/components/admin/AdminPage.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-tabs>
<v-tabs :class="{ 'dir-rtl': isRTL }" v-model="tab">
<v-tab>{{ $t('trans.adminPage.forms') }}</v-tab>
<v-tab>{{ $t('trans.adminPage.users') }}</v-tab>
<v-tab>{{ $t('trans.adminPage.developer') }}</v-tab>
Expand All @@ -15,6 +15,7 @@
</template>

<script>
import { mapGetters } from 'vuex';
export default {
name: 'AdminPage',
components: {
Expand All @@ -27,8 +28,17 @@ export default {
},
data() {
return {
tab: null,
adminDashboardUrl: this.$config.adminDashboardUrl,
};
},
computed: {
...mapGetters('form', ['isRTL']),
},
watch: {
isRTL() {
this.tab = null;
jasonchung1871 marked this conversation as resolved.
Show resolved Hide resolved
},
},
};
</script>
9 changes: 7 additions & 2 deletions app/frontend/src/components/admin/AdminUsersTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@
<div>
<v-row no-gutters>
<v-spacer />
<v-col cols="12" sm="4">
<v-col cols="12">
<!-- search input -->
<div class="submissions-search">
<div
class="submissions-search"
:class="isRTL ? 'float-left' : 'float-right'"
>
<v-text-field
v-model="search"
append-icon="mdi-magnify"
:label="$t('trans.adminUsersTable.search')"
single-line
hide-details
class="pb-5"
:class="{ 'dir-rtl': isRTL, label: isRTL }"
/>
</div>
</v-col>
Expand Down Expand Up @@ -58,6 +62,7 @@ export default {
},
computed: {
...mapGetters('admin', ['userList']),
...mapGetters('form', ['isRTL']),
headers() {
return [
{
Expand Down
15 changes: 13 additions & 2 deletions app/frontend/src/components/base/BaseDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@keydown.esc="closeDialog"
>
<v-card>
<div class="dialog-body">
<div class="dialog-body" :class="{ 'dir-rtl': isRTL }">
<div v-if="showCloseButton">
<v-spacer />
<v-icon color="primary" class="float-right m-3" @click="closeDialog"
Expand Down Expand Up @@ -47,7 +47,12 @@
<span>{{ $t('trans.baseDialog.continue') }}</span>
</slot>
</v-btn>
<v-btn class="mb-5" outlined @click="closeDialog">
<v-btn
:class="{ 'dir-rtl': isRTL }"
class="mb-5"
outlined
@click="closeDialog"
>
<slot name="button-text-cancel">
<span>{{ $t('trans.baseDialog.cancel') }}</span>
</slot>
Expand All @@ -58,6 +63,7 @@
class="mb-5 mr-5"
color="primary"
depressed
:class="{ 'dir-rtl': isRTL }"
@click="continueDialog"
>
<slot name="button-text-continue">
Expand Down Expand Up @@ -104,6 +110,8 @@
</template>

<script>
import { mapGetters } from 'vuex';

export default {
name: 'BaseDialog',
methods: {
Expand All @@ -120,6 +128,9 @@ export default {
this.$emit('custom-dialog');
},
},
computed: {
...mapGetters('form', ['isRTL']),
},
props: {
value: {
default: false,
Expand Down
14 changes: 9 additions & 5 deletions app/frontend/src/components/base/BaseFilter.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-card>
<v-card :class="{ 'dir-rtl': isRTL }">
<v-card-title class="text-h5 pb-0 titleWrapper">
<slot name="filter-title"></slot>
</v-card-title>
Expand All @@ -18,8 +18,8 @@
filled
dense
class="mt-3"
>
</v-text-field>
:class="{ label: isRTL }"
/>
<v-tooltip bottom>
<template #activator="{ on, attrs }">
<v-btn
Expand Down Expand Up @@ -62,7 +62,8 @@
}}</v-btn>
<v-btn
@click="cancelFilterData"
class="mt-3 ml-3 primary--text"
class="mt-3 primary--text"
:class="isRTL ? 'mr-3' : 'ml-3'"
outlined
>{{ $t('trans.baseFilter.cancel') }}</v-btn
>
Expand All @@ -71,6 +72,7 @@
</template>

<script>
import { mapGetters } from 'vuex';
import i18n from '@/internationalization';
import { library } from '@fortawesome/fontawesome-svg-core';
import { faRepeat } from '@fortawesome/free-solid-svg-icons';
Expand Down Expand Up @@ -130,6 +132,9 @@ export default {
default: i18n.t('trans.baseFilter.filter'),
},
},
computed: {
...mapGetters('form', ['isRTL']),
},
data() {
return {
selectedData: this.preselectedData,
Expand Down Expand Up @@ -186,7 +191,6 @@ export default {
font-family: BCSans !important;
color: #000000 !important;
}

.hr {
height: 1px;
border: none;
Expand Down
6 changes: 3 additions & 3 deletions app/frontend/src/components/base/BaseInternationalization.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="text-center">
<div class="text-center" style="z-index: 100">
<v-menu offset-y>
<template v-slot:activator="{ on, attrs }">
<v-btn dark outlined v-bind="attrs" v-on="on" class="ml-3">
Expand All @@ -8,7 +8,7 @@
<font-awesome-icon icon="fa-solid fa-caret-down" class="ml-3" />
</v-btn>
</template>
<v-list>
<v-list style="height: 90vh; overflow-y: scroll">
<v-list-item-group color="primary" v-model="languageIndex">
<v-list-item
v-for="(item, i) in items"
Expand Down Expand Up @@ -54,7 +54,7 @@ export default {
{ title: 'Italian (Italy)', keyword: 'it' },
{ title: '日本語 (Japanese)', keyword: 'ja' },
{ title: '한국어 (Korean)', keyword: 'ko' },
{ title: 'ਪੰਜਾਬੀ (Punjabi)', keyword: 'pa' },
{ title: 'ਪੰਜਾਬੀ (Punjabi - Gurmukhi)', keyword: 'pa' },
{ title: 'Portuguese (Portugal)', keyword: 'pt' },
{ title: 'Русский (Russian)', keyword: 'ru' },
{ title: 'Tagalog (Filipino)', keyword: 'tl' },
Expand Down
7 changes: 5 additions & 2 deletions app/frontend/src/components/base/BaseNotificationBar.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<v-alert
:class="'target-notification ' + notification.class"
:class="['target-notification ' + notification.class, { 'dir-rtl': isRTL }]"
:icon="notification.icon"
prominent
dismissible
Expand All @@ -13,7 +13,7 @@
</template>

<script>
import { mapActions } from 'vuex';
import { mapActions, mapGetters } from 'vuex';
export default {
name: 'BaseNotificationBar',
props: {
Expand All @@ -30,6 +30,9 @@ export default {
timeout: null,
};
},
computed: {
...mapGetters('form', ['isRTL']),
},
methods: {
...mapActions('notifications', ['deleteNotification']),
alertClosed() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="notification-container">
<div class="notification-container" :class="{ 'dir-rtl': isRTL }">
<BaseNotificationBar
v-for="notification in notifications"
:key="notification.id"
Expand All @@ -9,10 +9,13 @@
</template>

<script>
import { mapState } from 'vuex';
import { mapState, mapGetters } from 'vuex';
export default {
name: 'BaseNotificationContainer',
computed: mapState('notifications', ['notifications']),
computed: {
...mapState('notifications', ['notifications']),
...mapGetters('form', ['isRTL']),
},
};
</script>

Expand Down
3 changes: 2 additions & 1 deletion app/frontend/src/components/designer/FloatButton.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div
:class="{ 'dir-rtl': isRTL }"
:style="[
{
display: 'flex',
Expand Down Expand Up @@ -206,7 +207,7 @@ export default {
};
},
computed: {
...mapGetters('form', ['multiLanguage']),
...mapGetters('form', ['multiLanguage', 'isRTL']),
},
props: {
formId: String,
Expand Down
Loading
Loading