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

DC-857: hierarchy view stub removal #4730

Merged
merged 14 commits into from
Mar 29, 2024
Merged

Conversation

pshapiro4broad
Copy link
Member

@pshapiro4broad pshapiro4broad commented Mar 20, 2024

Jira Ticket: https://broadworkbench.atlassian.net/browse/DC-857

What

Update UI code with backend API changes for "get hierarchy" snapshot builder API.

Why

When adding backend support for "get concept hierarchy", we found that the concept tree is actually a graph. So the original API plan to pass a single tree root in the reply no longer works. To support a tree with shared branches, the response is now a list of parents and their children. As in an earlier API, the first element in the list is the root node. (Although the root node could also be derived by finding the one node that's not a child of any other node.)

Testing strategy

Unit tests, manually tested using local TDR.

Visual Aids

In this clip the Observation "Kitchen Practice" is shown in the hierarchy view. This concept occurs in two different subtrees in the hierarchy view. The actual time to bring up the hierarchy view is about 20 seconds.

demo.mov

@pshapiro4broad pshapiro4broad marked this pull request as ready for review March 26, 2024 14:47
@pshapiro4broad pshapiro4broad requested a review from a team as a code owner March 26, 2024 14:47
src/components/TreeGrid.ts Show resolved Hide resolved
Copy link
Contributor

@rjohanek rjohanek left a comment

Choose a reason for hiding this comment

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

Would it be possible to add an auto scroll to the first instance of the item in the hierarchy? It doesn't have to happen in this PR, but if we think this is a good idea we could make a ticket

@pshapiro4broad
Copy link
Member Author

@rjohanek

Would it be possible to add an auto scroll to the first instance of the item in the hierarchy? It doesn't have to happen in this PR, but if we think this is a good idea we could make a ticket

That's a good point, it is part of the UX spec but there wasn't a ticket for it yet, I created https://broadworkbench.atlassian.net/browse/DC-950 for it.

@evansuslovich evansuslovich added the On Hold Not being actively worked on label Mar 28, 2024
@evansuslovich evansuslovich self-requested a review March 28, 2024 18:47
Copy link
Contributor

@evansuslovich evansuslovich left a comment

Choose a reason for hiding this comment

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

Looks good! I think a comment will be useful in TreeGrid.ts explaining that a child can have several parents? Also, when you're selecting parents[0] to create a root (i.e ConceptSelector line 86), explaining why the first is chosen in the code may be helpful.

@pshapiro4broad pshapiro4broad removed the On Hold Not being actively worked on label Mar 28, 2024
Copy link
Contributor

@rjohanek rjohanek left a comment

Choose a reason for hiding this comment

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

changes and refactors look good! thank you!

Copy link

sonarcloud bot commented Mar 29, 2024

@pshapiro4broad pshapiro4broad added this pull request to the merge queue Mar 29, 2024
Merged via the queue into dev with commit d311e9a Mar 29, 2024
9 checks passed
@pshapiro4broad pshapiro4broad deleted the ps/dc-857-hierarchy-api-change branch March 29, 2024 14:03
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