Skip to content

Commit 0167de8

Browse files
committed
fix: use rtl-safe classes
1 parent 44e8609 commit 0167de8

4 files changed

Lines changed: 19 additions & 15 deletions

File tree

app/components/diff/Line.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const rowClasses = computed(() => {
4949
})
5050
5151
const borderClasses = computed(() => {
52-
const classes = ['border-transparent', 'w-1', 'border-l-3']
52+
const classes = ['border-transparent', 'w-1', 'border-is-3']
5353
5454
if (props.line.type === 'insert') {
5555
classes.push('border-[color:var(--code-added)]/60')
@@ -63,7 +63,7 @@ const borderClasses = computed(() => {
6363
6464
const contentClasses = computed(() => {
6565
const shouldWrap = diffContext?.wordWrap?.value ?? false
66-
return ['pr-6', shouldWrap ? 'whitespace-pre-wrap break-words' : 'text-nowrap']
66+
return ['pe-6', shouldWrap ? 'whitespace-pre-wrap break-words' : 'text-nowrap']
6767
})
6868
6969
type RenderedSegment = { html: string; type: 'insert' | 'delete' | 'normal' }

app/components/diff/SidebarPanel.vue

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function handleFileSelect(file: FileChange) {
8585
<span class="i-lucide-lightbulb w-3.5 h-3.5" />
8686
{{ $t('compare.summary') }}
8787
</span>
88-
<div class="flex items-center gap-3 font-mono text-[10px]">
88+
<div class="flex items-center gap-3 font-mono text-3xs">
8989
<span class="flex items-center gap-1">
9090
<span class="text-green-500">+{{ compare.stats.filesAdded }}</span>
9191
<span class="text-fg-subtle">/</span>
@@ -106,7 +106,7 @@ function handleFileSelect(file: FileChange) {
106106
>
107107
<div class="flex items-start gap-2">
108108
<span class="i-carbon-warning w-3.5 h-3.5 text-yellow-500 shrink-0 mt-0.5" />
109-
<div class="text-[10px] text-fg-muted">
109+
<div class="text-3xs text-fg-muted">
110110
<p v-for="warning in compare.meta.warnings" :key="warning">{{ warning }}</p>
111111
</div>
112112
</div>
@@ -124,7 +124,7 @@ function handleFileSelect(file: FileChange) {
124124
{{ section.label }} ({{ section.changes.length }})
125125
</summary>
126126

127-
<div class="space-y-1 ml-5 max-h-40 overflow-y-auto">
127+
<div class="space-y-1 ms-5 max-h-40 overflow-y-auto">
128128
<div
129129
v-for="dep in section.changes"
130130
:key="dep.name"
@@ -149,7 +149,7 @@ function handleFileSelect(file: FileChange) {
149149
</NuxtLink>
150150

151151
<div
152-
class="flex items-center gap-1.5 text-fg-muted font-mono text-[10px] ml-auto shrink-0"
152+
class="flex items-center gap-1.5 text-fg-muted font-mono text-3xs ms-auto shrink-0"
153153
>
154154
<span
155155
v-if="dep.from"
@@ -163,7 +163,7 @@ function handleFileSelect(file: FileChange) {
163163

164164
<span
165165
v-if="dep.semverDiff"
166-
class="text-[9px] px-1.5 py-0.5 rounded font-medium shrink-0"
166+
class="text-4xs px-1.5 py-0.5 rounded font-medium shrink-0"
167167
:class="getSemverBadgeClass(dep.semverDiff)"
168168
>
169169
{{ dep.semverDiff }}
@@ -175,7 +175,7 @@ function handleFileSelect(file: FileChange) {
175175

176176
<div
177177
v-if="compare.dependencyChanges.length === 0 && !compare.meta.warnings?.length"
178-
class="px-3 py-2 text-[10px] text-fg-muted text-center"
178+
class="px-3 py-2 text-3xs text-fg-muted text-center"
179179
>
180180
{{ $t('compare.no_dependency_changes') }}
181181
</div>
@@ -198,21 +198,21 @@ function handleFileSelect(file: FileChange) {
198198
<div class="border-b border-border px-3 py-2 shrink-0 space-y-2">
199199
<div class="relative">
200200
<span
201-
class="absolute left-2 top-1/2 -translate-y-1/2 i-carbon-search w-3 h-3 text-fg-subtle pointer-events-none"
201+
class="absolute inset-is-2 top-1/2 -translate-y-1/2 i-carbon-search w-3 h-3 text-fg-subtle pointer-events-none"
202202
/>
203203
<input
204204
v-model="fileSearch"
205205
type="search"
206206
:placeholder="$t('compare.search_files_placeholder')"
207207
:aria-label="$t('compare.search_files_placeholder')"
208-
class="w-full text-[11px] pl-6.5 pr-2 py-1 bg-bg-subtle border border-border rounded font-mono placeholder:text-fg-subtle transition-colors hover:border-border-hover focus:border-accent focus:outline-none"
208+
class="w-full text-2xs ps-6.5 pe-2 py-1 bg-bg-subtle border border-border rounded font-mono placeholder:text-fg-subtle transition-colors hover:border-border-hover focus:border-accent focus:outline-none"
209209
/>
210210
</div>
211211
<div class="flex items-center justify-end">
212212
<select
213213
v-model="fileFilter"
214214
:aria-label="$t('compare.filter_files_label')"
215-
class="text-[10px] px-2 py-1 bg-bg-subtle border border-border rounded font-mono cursor-pointer hover:border-border-hover transition-colors"
215+
class="text-3xs px-2 py-1 bg-bg-subtle border border-border rounded font-mono cursor-pointer hover:border-border-hover transition-colors"
216216
>
217217
<option value="all">
218218
{{ $t('compare.file_filter_option.all', { count: allChanges.length }) }}
@@ -239,7 +239,11 @@ function handleFileSelect(file: FileChange) {
239239
? $t('compare.no_files_search', { query: fileSearch.trim() })
240240
: fileFilter === 'all'
241241
? $t('compare.no_files_all')
242-
: $t('compare.no_files_filtered', { filter: $t(`compare.filter.${fileFilter}`) })
242+
: fileFilter === 'added'
243+
? $t('compare.no_files_filtered', { filter: $t('compare.filter.added') })
244+
: fileFilter === 'removed'
245+
? $t('compare.no_files_filtered', { filter: $t('compare.filter.removed') })
246+
: $t('compare.no_files_filtered', { filter: $t('compare.filter.modified') })
243247
}}
244248
</div>
245249

app/components/diff/SkipBlock.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ defineProps<{
1616
<span class="i-lucide-chevrons-up-down w-4 h-4" />
1717
</td>
1818
<td>
19-
<span class="px-0 sticky left-2 italic opacity-50">
19+
<span class="px-0 sticky inset-is-2 italic opacity-50">
2020
{{ content || $t('compare.lines_hidden', { count }) }}
2121
</span>
2222
</td>

app/pages/diff/[...path].vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ useSeoMeta({
196196
<div v-else-if="compare" class="flex-1 flex flex-col md:flex-row min-h-0 overflow-hidden">
197197
<!-- Desktop sidebar -->
198198
<aside
199-
class="hidden md:flex w-80 border-r border-border bg-bg-subtle flex-col shrink-0 min-h-0"
199+
class="hidden md:flex w-80 border-ie border-border bg-bg-subtle flex-col shrink-0 min-h-0"
200200
>
201201
<DiffSidebarPanel
202202
:compare="compare"
@@ -214,7 +214,7 @@ useSeoMeta({
214214
<div
215215
class="md:hidden border-b border-border bg-bg-subtle px-4 py-3 flex items-center justify-between gap-3"
216216
>
217-
<div class="flex items-center gap-2 text-[11px] font-mono text-fg-muted">
217+
<div class="flex items-center gap-2 text-2xs font-mono text-fg-muted">
218218
<span class="flex items-center gap-1">
219219
<span class="text-green-500">+{{ compare.stats.filesAdded }}</span>
220220
<span class="text-fg-subtle">/</span>

0 commit comments

Comments
 (0)