-
Notifications
You must be signed in to change notification settings - Fork 404
Extract AssetsSidebarTab template and improve UI structure #6164
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
Merged
christian-byrne
merged 9 commits into
feature/media-asset-sidebar-tab
from
feature/job-detail-view
Oct 23, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
910c4e7
feat: add job folder view for grouped batch outputs in media assets
viva-jinyi b2c5857
refactor: replace custom formatExecutionTime with formatDuration utility
viva-jinyi 2cfc25d
refactor: Extract AssetsSidebarTab template and improve UI structure
viva-jinyi 2495cea
refactor: Create reusable Tab components and update AssetsSidebarTab UI
viva-jinyi 0a20dab
feature: tab storybook added
viva-jinyi 75c865c
chore: icon -> button markup
viva-jinyi eb5e7d9
feature: reapply code
viva-jinyi c07fcc8
refactor: Apply code review feedback for media assets and accessibility
viva-jinyi 4fc9ba4
fix: Improve type safety in asset metadata
viva-jinyi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| <template> | ||
| <div | ||
| class="flex h-full flex-col bg-interface-panel-surface" | ||
| :class="props.class" | ||
| > | ||
| <div> | ||
| <div | ||
| v-if="slots.top" | ||
| class="flex min-h-12 items-center border-b border-interface-stroke px-4 py-2" | ||
| > | ||
| <slot name="top" /> | ||
| </div> | ||
| <div v-if="slots.header" class="px-4"> | ||
| <slot name="header" /> | ||
| </div> | ||
| </div> | ||
| <!-- h-0 to force scrollpanel to grow --> | ||
| <ScrollPanel class="h-0 grow"> | ||
| <slot name="body" /> | ||
| </ScrollPanel> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import ScrollPanel from 'primevue/scrollpanel' | ||
| import { useSlots } from 'vue' | ||
| const props = defineProps<{ | ||
| class?: string | ||
| }>() | ||
| const slots = useSlots() | ||
| </script> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| <template> | ||
| <button | ||
| :id="tabId" | ||
| :class="tabClasses" | ||
| role="tab" | ||
viva-jinyi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| :aria-selected="isActive" | ||
| :aria-controls="panelId" | ||
| :tabindex="0" | ||
| @click="handleClick" | ||
| > | ||
| <slot /> | ||
| </button> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import type { Ref } from 'vue' | ||
| import { computed, inject } from 'vue' | ||
|
|
||
| import { cn } from '@/utils/tailwindUtil' | ||
|
|
||
| const { value, panelId } = defineProps<{ | ||
| value: string | ||
| panelId?: string | ||
| }>() | ||
|
|
||
| const currentValue = inject<Ref<string>>('tabs-value') | ||
| const updateValue = inject<(value: string) => void>('tabs-update') | ||
|
|
||
| const tabId = computed(() => `tab-${value}`) | ||
| const isActive = computed(() => currentValue?.value === value) | ||
|
|
||
| const tabClasses = computed(() => { | ||
| return cn( | ||
| // Base styles from TextButton | ||
| 'flex items-center justify-center shrink-0', | ||
| 'px-2.5 py-2 text-sm rounded-lg cursor-pointer transition-all duration-200', | ||
| 'outline-hidden border-none', | ||
| // State styles with semantic tokens | ||
| isActive.value | ||
| ? 'bg-interface-menu-component-surface-hovered text-text-primary text-bold' | ||
| : 'bg-transparent text-text-secondary hover:bg-button-hover-surface focus:bg-button-hover-surface' | ||
| ) | ||
| }) | ||
|
|
||
| const handleClick = () => { | ||
| updateValue?.(value) | ||
| } | ||
| </script> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.