-
-
Notifications
You must be signed in to change notification settings - Fork 424
refactor: remove class shortcuts #604
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
danielroe
merged 17 commits into
npmx-dev:main
from
essenmitsosse:refactor-remove-class-shortcuts
Feb 2, 2026
Merged
Changes from 8 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
778cfb1
refactor: extract reusable Card component
essenmitsosse 18b87a5
refactor: replace single use class-shortcut with atomic classes
essenmitsosse 9ac4b65
refactor: remove unused class-shortcut
essenmitsosse 136872f
refactor: remove unused class-shortcut
essenmitsosse 18e2f54
refactor: Extract reusable Skeleton components
essenmitsosse 740fbc7
refactor: replace single use class-shortcut with atomic classes
essenmitsosse d364269
Merge branch 'main' into refactor-remove-class-shortcuts
essenmitsosse 05fc000
Remove unused prop
essenmitsosse 9e8e19f
Merge branch 'main' into refactor-remove-class-shortcuts
danielroe f2c5fc7
Merge remote-tracking branch 'origin/main' into refactor-remove-class…
danielroe 156e7cc
Add explicit import to avoic naming conflict
essenmitsosse 86b3d1d
test: ignore components already under test via other components
essenmitsosse b50802e
Merge branch 'main' into refactor-remove-class-shortcuts
essenmitsosse 421a929
Merge branch 'main' into refactor-remove-class-shortcuts
essenmitsosse 4accb5e
Merge remote-tracking branch 'origin/main' into refactor-remove-class…
danielroe 2d32b62
fix: small fixes
danielroe 1bbbd2d
test: update tests
danielroe 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,23 @@ | ||
| <script setup lang="ts"> | ||
| defineProps<{ | ||
| /** Whether this is an exact match for the query */ | ||
| isExactMatch?: boolean | ||
| }>() | ||
| </script> | ||
|
|
||
| <template> | ||
| <article | ||
| class="group bg-bg-subtle border border-border rounded-lg p-4 sm:p-6 transition-[border-color,background-color] duration-200 hover:(border-border-hover bg-bg-muted) cursor-pointer relative focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-bg focus-within:ring-offset-2 focus-within:ring-fg/50 focus-within:bg-bg-muted focus-within:border-border-hover" | ||
| :class="{ | ||
| 'border-accent/30 bg-accent/5': isExactMatch, | ||
| }" | ||
| > | ||
| <!-- Glow effect for exact matches --> | ||
| <div | ||
| v-if="isExactMatch" | ||
| class="absolute -inset-px rounded-lg bg-gradient-to-r from-accent/0 via-accent/20 to-accent/0 opacity-100 blur-sm -z-1 pointer-events-none motion-reduce:opacity-50" | ||
| aria-hidden="true" | ||
| /> | ||
| <slot /> | ||
| </article> | ||
| </template> |
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
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
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,10 @@ | ||
| <!-- Vue component that only takes a class as prop and adds `bg-bg-elevated rounded animate-skeleton-pulse` to that class --> | ||
| <script setup lang="ts"> | ||
| const props = defineProps<{ | ||
| class?: string | ||
| }>() | ||
| </script> | ||
|
|
||
| <template> | ||
| <div :class="`bg-bg-elevated rounded animate-skeleton-pulse ${props.class ?? ''}`" /> | ||
| </template> |
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,12 @@ | ||
| <!-- Vue component that only takes a class as prop and adds `bg-bg-elevated rounded animate-skeleton-pulse` to that class --> | ||
| <script setup lang="ts"> | ||
| const props = defineProps<{ | ||
| class?: string | ||
| }>() | ||
| </script> | ||
|
|
||
| <template> | ||
| <span | ||
| :class="`inline-block bg-bg-elevated rounded animate-skeleton-pulse ${props.class ?? ''}`" | ||
| /> | ||
| </template> | ||
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi: you shouldn't create style or class bindings on vue components - vue handles it itself