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

fix(tab):id attribute added to tab wrapper #224

Merged
merged 2 commits into from
Aug 17, 2023

Conversation

tatata96
Copy link
Contributor

@tatata96 tatata96 self-assigned this Jan 18, 2023
@tatata96 tatata96 changed the base branch from main to next-release January 18, 2023 08:03
@github-actions
Copy link

github-actions bot commented Jan 18, 2023

PR Preview Action v1.4.4
Preview removed because the pull request was closed.
2023-08-17 09:05 UTC

Copy link
Contributor

@gulcinuras gulcinuras left a comment

Choose a reason for hiding this comment

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

@tatata96 I think it looks good, just I was thinking if we can improve the name like tabContainerId to be more descriptive 🤔

src/tab/Tab.tsx Outdated
Comment on lines 75 to 77
activeTabIndexFromProps === undefined
? activeTabIndex
: activeTabIndexFromProps
Copy link
Collaborator

Choose a reason for hiding this comment

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

The indentation doesn't look correct,
content of [] should be deeper, why was it changed in the first place? 🤔 I believe we already have eslint rules for the toolkit, it should take care of this.

Same for the diff in ControlledTabProps

src/tab/Tab.tsx Outdated
Comment on lines 25 to 37
// if one of the controlled tab props are present
// other controlled tab prop is required
// and initialActiveTabIndex should be undefined
type ControlledTabProps =
| {
activeTabIndex: number;
onTabChange: (index: number) => void;
initialActiveTabIndex?: number;
}
activeTabIndex: number;
onTabChange: (index: number) => void;
initialActiveTabIndex?: number;
}
| {
activeTabIndex?: number;
onTabChange?: (index: number) => void;
};
activeTabIndex?: number;
onTabChange?: (index: number) => void;
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is totally unrelated to the issue, but I was trying to understand this comment and the type and I couldn't.
Do you (or anyone) know what is our purpose with this type? Why do we need the second part?

    activeTabIndex?: number;
    onTabChange?: (index: number) => void;

(BTW, code formatting here also looks weird as I mentioned in the other comment)

@tatata96 tatata96 added Ready for new release PR is reviewed and ready to be merged and removed ready for review labels Apr 18, 2023
@jamcry jamcry merged commit 44fd716 into next-release Aug 17, 2023
@jamcry jamcry deleted the fix/tab-id-for-wrapper branch August 17, 2023 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for new release PR is reviewed and ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants