-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
fix: use a rounded corner decoration by default for ShadTabs to match the official shadcn implementation #203
Open
helightdev
wants to merge
4
commits into
nank1ro:main
Choose a base branch
from
helightdev:tabs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
74699ea
Fix onChanged being called on every controller update
helightdev d27f33c
Merge remote-tracking branch 'origin/main'
helightdev 435a7bd
fix: use a rounded corner decoration by default for ShadTabs to match…
helightdev c72d7b3
fix: copy theme changes to default_theme_no_secondary_border_variant …
helightdev 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 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 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 |
---|---|---|
|
@@ -728,6 +728,9 @@ class ShadDefaultThemeVariant extends ShadThemeVariant { | |
tabForegroundColor: colorScheme.foreground, | ||
tabSelectedForegroundColor: colorScheme.foreground, | ||
tabSelectedShadows: ShadShadows.sm, | ||
tabDecoration: ShadDecoration( | ||
border: ShadBorder.all(radius: radius, width: 0), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update the radius to 4 as mentioned above |
||
), | ||
); | ||
} | ||
|
||
|
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.
Update the radius to 4
As you can see in the image above, the default radius used by ui.shadcn.com is 4px.
0.5 rem = 8 px
8px - 4px = 4px
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.
Just checked the source code and it uses
rounded-sm
which is 2px.https://github.com/shadcn-ui/ui/blob/805ed4120a6a8ae6f6e9714cbd776e18eeba92c7/apps/www/registry/default/ui/tabs.tsx#L32C66-L32C76
So the source code and what is rendered on the docs is different.
No idea of what is supposed to be the right value.
Probably 4px is more elegant than just 2px