Skip to content

Conversation

@vpolessky-dn
Copy link
Collaborator

@vpolessky-dn vpolessky-dn requested a review from aroba-dn January 8, 2026 14:00
@mmurawski-dn
Copy link
Collaborator

Question: wouldn't be easier to maintain if we keep all the tabs related components inside the ds-tabs directory? 🤔 Each sub component can be placed in its own directory as it is now 💯

Copy link
Collaborator

@mmurawski-dn mmurawski-dn left a comment

Choose a reason for hiding this comment

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

Feature works nicely 🍻 I would adjust a few things and, most importantl, add tests ✅

mmurawski-dn
mmurawski-dn previously approved these changes Jan 12, 2026
Copy link
Collaborator

@StyleShit StyleShit left a comment

Choose a reason for hiding this comment

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

I think there are too many files here. Feels so overwhelming and hard to follow.
Maybe we need to talk as a team about the API of this, because it's a very complicated component

Copy link
Collaborator

@StyleShit StyleShit left a comment

Choose a reason for hiding this comment

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

Looking great!

import type { DsTabsContentProps } from '../../ds-tabs.types';
import styles from './ds-tabs-content.module.scss';

export const DsTabsContent = ({ value, className, style, children }: DsTabsContentProps) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we need multiple files for all these components? can't they be in the same file like others?
it's easier to follow, especially when reviewing

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is a good practice to keep code moduled and splitted into smaller parts for easier support. If changes will be required in future it is much easier to review isolated part

Comment on lines +8 to +19
.tabList-horizontal {
flex-direction: row;
align-items: center;
border-bottom: $border-width solid var(--color-border-main);
gap: var(--spacing-xs);
}

.tabList-vertical {
flex-direction: column;
align-items: stretch;
border-right: $border-width solid var(--color-border-main);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do you need these classes? you can use the data-attrs for this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As data-attrs are handled by the arc-ui (and possible be updated in some version) it is more reliable to create the styling class and manage it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think I would vote for the data-attrs 🤔 But that's something we can agree upon after this sprint 👍

Comment on lines +26 to +31
const contextValue: DsTabsContextType = {
orientation,
size,
currentValue: value,
onValueChange,
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do you need to pass all of this?
seems like it's just the size that you'll need deeply, and I think we can maybe try to find a better way for this

e.g. css vars, or maybe using a single scss file for everything and checking for root-${size} > .content or something

feels like this context is an unnecessary overhead

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In case we want to keep components inside tabs separated it is good approach to use context:

  • values easily accessible in each component without props drilling
  • props management in single place
  • isolated usage of context is affecting only tabs instance itself

Copy link
Collaborator

Choose a reason for hiding this comment

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

My small note: I see the value in going with the CSS vars (as we only need it for styling and nothing else); it removes extra boilerplate and code. On the other hand, the React Context is pretty common use case for this kind of scenarios.

Probably, keeping those in one place and just using dynamic CSS vars would be simplest, but I can live with both 🫡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants