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

Shayan/webrel 2149/implement vertical tab #65

Merged
merged 13 commits into from
Feb 9, 2024

Conversation

shayan-deriv
Copy link
Contributor

@shayan-deriv shayan-deriv commented Feb 6, 2024

changes:

  • added VerticalTab Component

image

@shayan-deriv shayan-deriv marked this pull request as ready for review February 7, 2024 10:30
@@ -0,0 +1,107 @@
.vertical-tab__wrapper {
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: any reason for not putting this inside .vertical-tab ?

}
}

.collapsible-vertical-tab {
Copy link
Contributor

Choose a reason for hiding this comment

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

that should be in separate file for separate component

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but in this case does it make any difference? because the consumer should use them all together. so that's why I put all styles in one file to avoid external request from consumer side

<div
className={
clsx('vertical-tab__item', {
'vertical-tab__item--active': tab.title === selectedTab,
Copy link
Contributor

Choose a reason for hiding this comment

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

is tab.title an arbitrary string, or is it a specific enum?
based on the naming itself, feels like one is title/translation and the other one is enum

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's string but not optional param.
I didn't understand the issue. could u pleas elaborate more?

className={
clsx('vertical-tab__item', {
'vertical-tab__item--active': tab.title === selectedTab,
'vertical-tab__item--disabled': tab.is_disabled
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm seems like the condition for --active and --disabled is different,
does not feel good, it feels like it migth be possible to have both --disabled and --enabled class or none,
ideallly, they both should use the same flag/variable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but they are totally different. with active we only handle the style. but with disabled we also disable the functionality for onClick as well/ that's why I used two different things.

@shayan-deriv shayan-deriv merged commit 9bad8ea into main Feb 9, 2024
1 check passed
Copy link

github-actions bot commented Feb 9, 2024

🎉 This PR is included in version 1.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@shayan-deriv shayan-deriv deleted the shayan/webrel-2149/implement-vertical-tab branch February 14, 2024 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants