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

CB-5867 show objects description #3170

Merged
merged 7 commits into from
Jan 10, 2025
Merged

CB-5867 show objects description #3170

merged 7 commits into from
Jan 10, 2025

Conversation

devnaumov
Copy link
Member

@devnaumov devnaumov commented Dec 30, 2024

We probably want to wrap context in useObjectRef or pass this setting as prop to avoid perfomance issues because of the using useContext

@@ -52,6 +54,7 @@ export const NavigationNodeControl: NavTreeControlComponent = observer(
const styles = useS(style);
const mouseContextMenu = useMouseContextMenu();
const treeNodeContext = useContext(TreeNodeContext);
const elementsTreeContext = useContext(ElementsTreeContext);
Copy link
Contributor

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 {
Copy link
Contributor

@SychevAndrey SychevAndrey Jan 10, 2025

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

@Wroud Wroud merged commit 06f8b44 into devel Jan 10, 2025
7 of 8 checks passed
@Wroud Wroud deleted the CB-5867-node-description branch January 10, 2025 17:43
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.

5 participants