-
Notifications
You must be signed in to change notification settings - Fork 405
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
CB-5867 show objects description #3170
Conversation
@@ -52,6 +54,7 @@ export const NavigationNodeControl: NavTreeControlComponent = observer( | |||
const styles = useS(style); | |||
const mouseContextMenu = useMouseContextMenu(); | |||
const treeNodeContext = useContext(TreeNodeContext); | |||
const elementsTreeContext = useContext(ElementsTreeContext); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be useMemo
would be enough here for treeNodeContext.selected
and elementsTreeContext?.tree.settings?.objectsDescription
?
|
||
import type { IElementsTreeCustomNodeInfo } from './useElementsTree.js'; | ||
|
||
export function transformDescriptionNodeInfo(navNodeInfoResource: NavNodeInfoResource): IElementsTreeCustomNodeInfo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is not a part of your task, but this type name is misleading. I don't anticipate a function from type named like that. Maybe just add Fn suffix to show that this is function. Or smth like IElementsTreeCustomNodeInfoModifier
We probably want to wrap context in useObjectRef or pass this setting as prop to avoid perfomance issues because of the using useContext