Skip to content

Commit

Permalink
Merge pull request #6480 from nextcloud-libraries/backport/6455/next
Browse files Browse the repository at this point in the history
[next] fix(NcAppNavigation + NcUserBubble + NcRichContenteditable): RTL support
  • Loading branch information
ShGKme authored Jan 31, 2025
2 parents d796386 + 2a41dec commit e8e83e9
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions src/assets/NcAppNavigationItem.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

&:not(.app-navigation-entry--editing) {
.app-navigation-entry-link, .app-navigation-entry-button {
padding-right: $icon-margin;
padding-inline-end: $icon-margin;
}
}

Expand Down Expand Up @@ -135,15 +135,15 @@
.app-navigation-entry {
display: inline-flex;
flex-wrap: wrap;
padding-left: $icon-size;
padding-inline-start: $icon-size;
}
}

/* Deleted entries */
.app-navigation-entry__deleted {
display: inline-flex;
flex: 1 1 0;
padding-left: calc(var(--default-clickable-area) - $icon-margin) !important;
padding-inline-start: calc(var(--default-clickable-area) - $icon-margin) !important;
.app-navigation-entry__deleted-description {
position: relative;
overflow: hidden;
Expand All @@ -166,8 +166,8 @@
}
/* counter */
.app-navigation-entry__counter-wrapper {
// Add slightly more space to the right of the counter
margin-right: calc(var(--default-grid-baseline) * 2);
// Add slightly more space to the end of the counter
margin-inline-end: calc(var(--default-grid-baseline) * 2);
display: flex;
align-items: center;
flex: 0 1 auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ export default {
box-shadow: none !important;
flex-shrink: 0;
// padding to align the name with the icon of app navigation items
padding: 0 calc(var(--default-grid-baseline, 4px) * 2) 0 calc(var(--default-grid-baseline, 4px) * 2);
padding-block: 0;
padding-inline: calc(var(--default-grid-baseline, 4px) * 2) 0;
margin-top: 0px;
margin-bottom: var(--default-grid-baseline);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default {
position: relative;
z-index: 105; // above a, under button
color: var(--color-main-text);
right: 0;
inset-inline-end: 0;
&--open {
color: var(--color-main-text);
&:hover{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export default {
max-width: 100%;
white-space: nowrap;
text-overflow: ellipsis;
padding-left: 7px;
padding-inline-start: 7px;
font-size: 14px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ export default {
box-shadow: none;
border: 0;
border-radius: var(--body-container-radius);
text-align: left;
text-align: start;
font-weight: normal;
font-size: 100%;
color: var(--color-main-text);
padding-right: 14px;
padding-inline-end: 14px;
line-height: var(--default-clickable-area);

&:hover,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default {
--auto-complete-result-status-icon-position: calc(var(--auto-complete-result-avatar-size) / 2 * (1 - 1 / sqrt(2)) - var(--auto-complete-result-status-icon-size) / 2);
box-sizing: border-box;
position: absolute;
right: var(--auto-complete-result-status-icon-position);
inset-inline-end: var(--auto-complete-result-status-icon-position);
bottom: var(--auto-complete-result-status-icon-position);
height: var(--auto-complete-result-status-icon-size);
width: var(--auto-complete-result-status-icon-size);
Expand Down
7 changes: 3 additions & 4 deletions src/components/NcRichContenteditable/NcMentionBubble.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ $bubble-avatar-size: $bubble-height - 2 * $bubble-padding;
height: $bubble-height ;
-webkit-user-select: none;
user-select: none;
padding-right: $bubble-padding * 3;
padding-left: $bubble-padding;
padding-inline: $bubble-padding $bubble-padding * 3;
border-radius: math.div($bubble-height, 2);
background-color: var(--color-background-dark);
}
Expand All @@ -145,7 +144,7 @@ $bubble-avatar-size: $bubble-height - 2 * $bubble-padding;

&__title {
overflow: hidden;
margin-left: $bubble-padding;
margin-inline-start: $bubble-padding;
white-space: nowrap;
text-overflow: ellipsis;
// Put title in ::before so it is not selectable
Expand All @@ -158,7 +157,7 @@ $bubble-avatar-size: $bubble-height - 2 * $bubble-padding;
&__select {
position: absolute;
z-index: -1;
left: -100vw;
inset-inline-start: -100vw;
width: 1px;
height: 1px;
overflow: hidden;
Expand Down
10 changes: 5 additions & 5 deletions src/components/NcUserBubble/NcUserBubble.vue
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export default {
borderRadius: this.size / 2 + 'px',
},
avatar: {
marginLeft: this.margin + 'px',
marginInlineStart: this.margin + 'px',
},
}
},
Expand Down Expand Up @@ -300,8 +300,8 @@ export default {
}

> :last-child {
// border radius left padding
padding-right: 8px;
// border radius end padding
padding-inline-end: 8px;
}
}

Expand All @@ -318,8 +318,8 @@ export default {
&__name,
&__secondary {
// proper spacing between avatar, name & slot
padding: 0;
padding-left: 4px;
padding-block: 0;
padding-inline: 4px 0;
}
}
</style>

0 comments on commit e8e83e9

Please sign in to comment.