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

docs: Refactor command tab code #2666

Merged
merged 2 commits into from
May 27, 2024

Conversation

romain-trotard
Copy link
Contributor

Hello :)

Following the discussion on this issue #2640, I open this PR.

So I have extracted all the logic of command / tab selection in a hook named useBashCommand. And watch the command directly in the DocsCodeBlock component to refresh the data to copy.

Hopefully I did not have to extract the tabState logic of the RowingTabs component :)

Note: Most of the code of useBashCommand is the same that the old getBashCommand file.

Note: On master, it seems to have a bug with the animation of tabs when going fast on selection (the problem is not added by this PR) :

TabProblem

Copy link

vercel bot commented May 22, 2024

@romain-trotard is attempting to deploy a commit to the Tamagui Team on Vercel.

A member of the Team first needs to authorize it.

@SamuraiF0x
Copy link
Contributor

Hi, thanks for the contribution :)

It seems bug still exists though:

Recording.2024-05-27.095720.mp4

@romain-trotard
Copy link
Contributor Author

Hello @SamuraiF0x

Yes I hadn't solve the problem, I thought to do it on another PR.
However, I took some times and found the problem, so I push it on the second commit ;)

@SamuraiF0x
Copy link
Contributor

Hi, it works now, thank you for your contribution!

@SamuraiF0x SamuraiF0x merged commit 6de4413 into tamagui:master May 27, 2024
0 of 2 checks passed
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