Skip to content
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

Tabs.Link: fix selected state on=darkBackground #446

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

christianvuerings
Copy link
Contributor

Background

Noticed the following issue in VSCode:

Property 'selectedTabDarkBackground' does not exist on type '{ tabContainerlightBackground: string; tabContainerDarkBackground: string; selectedTabOnLightBackground: string; selectedTabOnDarkBackground: string; unselectedTab: string; link: string; }'. Did you mean 'selectedTabOnDarkBackground'?

Screenshot 2024-06-09 at 8 11 14 AM

Note that this TS issue doesn't fail the build because of this outstanding TS ticket to support plugins during compilation:

Before (incorrect selected state)

Screenshot 2024-06-09 at 8 16 50 AM

After

Screenshot 2024-06-09 at 8 17 05 AM

Notes

Also added a light / dark toggle to the Tabs.Link example so we can easily test:
Screenshot 2024-06-09 at 8 26 29 AM

Copy link

vercel bot commented Jun 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
syntax ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 10, 2024 3:48am

Copy link

changeset-bot bot commented Jun 9, 2024

🦋 Changeset detected

Latest commit: 8ada765

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@cambly/syntax-core Minor
@syntax/storybook Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@zprong zprong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for catching + fixing this!

@@ -57,7 +57,7 @@ const TabLink = forwardRef<HTMLAnchorElement, TabLinkProps>(
[styles.unselectedTab]: !selected,
[styles.selectedTabOnLightBackground]:
selected && on === "lightBackground",
[styles.selectedTabDarkBackground]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦

@christianvuerings christianvuerings merged commit ddd4776 into main Jun 11, 2024
10 checks passed
@christianvuerings christianvuerings deleted the christian/fix-selectedTabDarkBackground branch June 11, 2024 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants