-
Notifications
You must be signed in to change notification settings - Fork 167
feat(google-docs): reference tree preview ui [INTEG-3425] #10509
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
base: master
Are you sure you want to change the base?
Conversation
…ar reference cases
| const pathKey = nodePath.join('/'); | ||
|
|
||
| // Stop at max depth | ||
| if (level >= MAX_TREE_DEPTH) { |
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.
any ideas on how(or if?) we should display entries past the max depth limit?
| * Extracts all reference tempIds from an entry's fields | ||
| */ | ||
| function extractReferences(entry: EntryToCreate): string[] { | ||
| const referenceTempIds: string[] = []; |
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.
If order doesn't matter, make this a set, not an array
| </Text> | ||
| </Flex> | ||
| </Box> | ||
| {treeNodes.map((node, index) => ( |
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.
We should just make a wrapper component and just pass the treeNodes as a prop instead of doing this loop
Purpose
This PR introduces a hierarchical tree visualization for the entry preview modal in the Google Docs app, replacing the previous flat list. The tree view shows parent-child relationships between entries up to 4 levels of nesting and handles circular references.
Approach
New Components:
TreeRow- Renders each node with proper indentationEntryCard- Displays entry information (title, content type)Indentation- Renders tree connector lines (├─, │, └─)Two Display Modes:
a) Normal Tree Structure (entries with clear hierarchy):
b) Flat List (all entries circular):
When ALL entries are part of circular reference chains, shows a flat list:
Testing screenshots