Skip to content

Conversation

@vovaspace
Copy link
Collaborator

No description provided.

Comment on lines +59 to +69
let arrowClassName = 'tree-view_arrow';
let containerClassName = 'tree-view_children';
if (collapsed) {
arrowClassName += ' tree-view_arrow-collapsed';
containerClassName += ' tree-view_children-collapsed';
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Left as it was to avoid rewriting selectors in styles.

Copy link
Member

Choose a reason for hiding this comment

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

Probably, it will be better to add additional block('tree-view') and set this styles with this block: className={treeViewBlock('arrow', {collapsed})} . With comment, that it was done not to override selectors

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 I see, block uses __ as separator for elements and react-treeview uses _. I can use block like treeViewBlock({arrow: true, 'arrow-collapsed': collapsed}) but it seems confusing.

I suggest just comment on what is happening with these classNames.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done! Also rewrote TreeView`s own selectors to BEM notation.

@vovaspace vovaspace force-pushed the react-treeview-removal branch from 7e7f5b4 to e910cad Compare January 15, 2024 11:05
@vovaspace vovaspace merged commit 48d0e4e into ydb-platform:main Jan 15, 2024
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