Skip to content

Commit 4898acd

Browse files
authored
feat: add RTL support to OrgTeamsPanel (#334)
1 parent 5076001 commit 4898acd

1 file changed

Lines changed: 19 additions & 16 deletions

File tree

app/components/OrgTeamsPanel.vue

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,13 @@ watch(lastExecutionTime, () => {
261261
class="bg-bg-subtle border border-border rounded-lg overflow-hidden"
262262
>
263263
<!-- Header -->
264-
<div class="flex items-center justify-between p-4 border-b border-border">
264+
<div class="flex items-center justify-start p-4 border-b border-border">
265265
<h2 id="teams-heading" class="font-mono text-sm font-medium flex items-center gap-2">
266-
<span class="i-carbon-group w-4 h-4 text-fg-muted" aria-hidden="true" />
266+
<span class="i-carbon:group w-4 h-4 text-fg-muted" aria-hidden="true" />
267267
{{ $t('org.teams.title') }}
268268
<span v-if="teams.length > 0" class="text-fg-muted">({{ teams.length }})</span>
269269
</h2>
270+
<span aria-hidden="true" class="flex-shrink-1 flex-grow-1" />
270271
<button
271272
type="button"
272273
class="p-1.5 text-fg-muted hover:text-fg transition-colors duration-200 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
@@ -275,7 +276,7 @@ watch(lastExecutionTime, () => {
275276
@click="loadTeams"
276277
>
277278
<span
278-
class="i-carbon-renew block w-4 h-4"
279+
class="i-carbon:renew block w-4 h-4"
279280
:class="{ 'animate-spin': isLoadingTeams }"
280281
aria-hidden="true"
281282
/>
@@ -286,7 +287,7 @@ watch(lastExecutionTime, () => {
286287
<div class="flex items-center gap-2 p-3 border-b border-border bg-bg">
287288
<div class="flex-1 relative">
288289
<span
289-
class="absolute left-2 top-1/2 -translate-y-1/2 i-carbon-search w-3.5 h-3.5 text-fg-subtle"
290+
class="absolute inset-is-2 top-1/2 -translate-y-1/2 i-carbon:search w-3.5 h-3.5 text-fg-subtle"
290291
aria-hidden="true"
291292
/>
292293
<label for="teams-search" class="sr-only">{{ $t('org.teams.filter_label') }}</label>
@@ -297,7 +298,7 @@ watch(lastExecutionTime, () => {
297298
name="teams-search"
298299
:placeholder="$t('org.teams.filter_placeholder')"
299300
v-bind="noCorrect"
300-
class="w-full pl-7 pr-2 py-1.5 font-mono text-sm bg-bg-subtle border border-border rounded text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
301+
class="w-full ps-7 pe-2 py-1.5 font-mono text-sm bg-bg-subtle border border-border rounded text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
301302
/>
302303
</div>
303304
<div
@@ -331,7 +332,7 @@ watch(lastExecutionTime, () => {
331332
<!-- Loading state -->
332333
<div v-if="isLoadingTeams && teams.length === 0" class="p-8 text-center">
333334
<span
334-
class="i-carbon-rotate-180 block w-5 h-5 text-fg-muted motion-safe:animate-spin mx-auto"
335+
class="i-carbon:rotate-180 block w-5 h-5 text-fg-muted motion-safe:animate-spin mx-auto"
335336
aria-hidden="true"
336337
/>
337338
<p class="font-mono text-sm text-fg-muted mt-2">{{ $t('org.teams.loading') }}</p>
@@ -361,19 +362,19 @@ watch(lastExecutionTime, () => {
361362
<li v-for="teamName in filteredTeams" :key="teamName" class="bg-bg">
362363
<!-- Team header -->
363364
<div
364-
class="flex items-center justify-between p-3 hover:bg-bg-subtle transition-colors duration-200"
365+
class="flex items-center justify-start p-3 hover:bg-bg-subtle transition-colors duration-200"
365366
>
366367
<button
367368
type="button"
368-
class="flex-1 flex items-center gap-2 text-left rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
369+
class="flex-1 flex items-center gap-2 text-start rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
369370
:aria-expanded="expandedTeams.has(teamName)"
370371
:aria-controls="`team-${teamName}-members`"
371372
@click="toggleTeam(teamName)"
372373
>
373374
<span
374-
class="w-4 h-4 transition-transform duration-200"
375+
class="w-4 h-4 transition-transform duration-200 rtl-flip"
375376
:class="[
376-
expandedTeams.has(teamName) ? 'i-carbon-chevron-down' : 'i-carbon-chevron-right',
377+
expandedTeams.has(teamName) ? 'i-carbon:chevron-down' : 'i-carbon:chevron-right',
377378
'text-fg-muted',
378379
]"
379380
aria-hidden="true"
@@ -390,17 +391,18 @@ watch(lastExecutionTime, () => {
390391
</span>
391392
<span
392393
v-if="isLoadingUsers[teamName]"
393-
class="i-carbon-rotate-180 w-3 h-3 text-fg-muted motion-safe:animate-spin"
394+
class="i-carbon:rotate-180 w-3 h-3 text-fg-muted motion-safe:animate-spin"
394395
aria-hidden="true"
395396
/>
396397
</button>
398+
<span aria-hidden="true" class="flex-shrink-1 flex-grow-1" />
397399
<button
398400
type="button"
399401
class="p-1 text-fg-subtle hover:text-red-400 transition-colors duration-200 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
400402
:aria-label="$t('org.teams.delete_team', { name: teamName })"
401403
@click.stop="handleDestroyTeam(teamName)"
402404
>
403-
<span class="i-carbon-trash-can block w-4 h-4" aria-hidden="true" />
405+
<span class="i-carbon:trash-can block w-4 h-4" aria-hidden="true" />
404406
</button>
405407
</div>
406408

@@ -419,21 +421,22 @@ watch(lastExecutionTime, () => {
419421
<li
420422
v-for="user in teamUsers[teamName]"
421423
:key="user"
422-
class="flex items-center justify-between py-1 pl-2 pr-1 rounded hover:bg-bg-subtle transition-colors duration-200"
424+
class="flex items-center justify-start py-1 pl-2 pr-1 rounded hover:bg-bg-subtle transition-colors duration-200"
423425
>
424426
<NuxtLink
425427
:to="{ name: '~username', params: { username: user } }"
426428
class="font-mono text-sm text-fg-muted hover:text-fg transition-colors duration-200"
427429
>
428430
@{{ user }}
429431
</NuxtLink>
432+
<span class="font-mono text-sm text-fg">{{ teamName }}</span>
430433
<button
431434
type="button"
432435
class="p-1 text-fg-subtle hover:text-red-400 transition-colors duration-200 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
433436
:aria-label="$t('org.teams.remove_user', { user })"
434437
@click="handleRemoveUser(teamName, user)"
435438
>
436-
<span class="i-carbon-close block w-3.5 h-3.5" aria-hidden="true" />
439+
<span class="i-carbon:close block w-3.5 h-3.5" aria-hidden="true" />
437440
</button>
438441
</li>
439442
</ul>
@@ -469,7 +472,7 @@ watch(lastExecutionTime, () => {
469472
:aria-label="$t('org.teams.cancel_add_user')"
470473
@click="showAddUserFor = null"
471474
>
472-
<span class="i-carbon-close block w-4 h-4" aria-hidden="true" />
475+
<span class="i-carbon:close block w-4 h-4" aria-hidden="true" />
473476
</button>
474477
</form>
475478
</div>
@@ -526,7 +529,7 @@ watch(lastExecutionTime, () => {
526529
:aria-label="$t('org.teams.cancel_create')"
527530
@click="showCreateTeam = false"
528531
>
529-
<span class="i-carbon-close block w-4 h-4" aria-hidden="true" />
532+
<span class="i-carbon:close block w-4 h-4" aria-hidden="true" />
530533
</button>
531534
</form>
532535
</div>

0 commit comments

Comments
 (0)