-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix(catalog): Support multi-level group & high-level withdrawn control anchor links #758
fix(catalog): Support multi-level group & high-level withdrawn control anchor links #758
Conversation
Is there sample data or a test to ensure this works? I remember some talk on this being tricky, but this also seems like something we'd prefer to not just trust it works. At the very least discussion on why this can't be done would be good here. In the past, we have made dummy data to at least show a feature works even if we don't push it to our actual sample data. |
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 think some changes in your previous pr to groups may have broken how we handle groups within groups.
Replication
- Go to Test Group E
- Click on Test Group E.1
group.title is ensured to be used when group.id isn't included, including at the start of the application running. Also state is better handled at top level groupings in order to avoid any unnecessary group opening/scrolling.
Doing some additional testing on this issue, I believe this is now in proper working order to fully support multi-level groups.
Yes, when ensuring that a Hey, this is actually a pretty good example to test multi-layered groups. Thanks for sharing this! I'll go ahead and place it in the description under "Testing". |
Remaining state problems for groups and high level controls have been resolved. An additional state check to match the previous handled fragment was found useful. Additionally upper- level withdrawn controls were not appearing properly due to a similar issue.
5972770
to
30d75bf
Compare
I've tried to stress test these groups and they seem to be working as intended. I also noticed that high-level withdrawn controls had some state issues in a similar vein, so I've made a fix to them as well. Please refer to the test data provided above, when testing. |
packages/oscal-react-library/src/components/OSCALCatalogGroup.js
Outdated
Show resolved
Hide resolved
Are you talking about #743 or another issue? |
It's related to handling anchor link navigation for withdrawn controls. It's unrelated to opening a withdrawn control. |
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.
@Bronstrom I really appreacite all your hard work! These are some fairly complex changes, so my comments are mostly just about clarity. I think a bit of jsdoc and renaming could make things a bit easier to understand here.
This PR supports anchor links for multiple-levels of control groups.
Testing
Navigate to the Catalog Viewer and reload the following catalog(s):
Relates to #176