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

348 add deep linking to controls #544

Closed
wants to merge 4 commits into from

Conversation

vanessuniq
Copy link
Contributor

  • Each control is wrapped in a hyperlink element that opens in a new tab. We can also select a control without clicking on the link.
  • Alternatively, we can add a link icon to each control and wrap it in a hyperlink element.

image

@vanessuniq vanessuniq added enhancement Pull requests that add a new feature feature request labels Mar 2, 2023
@vanessuniq vanessuniq linked an issue Mar 2, 2023 that may be closed by this pull request
@vanessuniq vanessuniq temporarily deployed to vulcan-pr-544 March 2, 2023 08:05 Inactive
Signed-off-by: Vanessa Fotso <vfotso@mitre.org>
Refactored Rules component to set the queried rule as the the selected rule and pass selected/open rules data top -> down (form parent to children)

Added link to individual control, to be open in a new tab if clicked

Used window.history method to change url in the browser without refreshing the page when selecting a control

Signed-off-by: Vanessa Fotso <vfotso@mitre.org>
Signed-off-by: Vanessa Fotso <vfotso@mitre.org>
…as well, for user with no edit privilege

Signed-off-by: Vanessa Fotso <vfotso@mitre.org>
@vanessuniq vanessuniq force-pushed the 348-add-deep-linking-to-controls branch from 992bcd4 to 868b225 Compare March 2, 2023 08:05
@vanessuniq vanessuniq temporarily deployed to vulcan-pr-544 March 2, 2023 08:06 Inactive
@freddyfeelgood
Copy link
Contributor

Initial testing looks good. One minor "bug" is in the URL, if you change the component ID, but leave the rest, it will navigate you to the control in the new component with the same last 6 digits (looks like the "prefix" isn't being checked).
So for example, if I am at location:
http://127.0.0.1:3000/components/97/controls/HZNV-8X-000021
And I change to component 103:
http://127.0.0.1:3000/components/103/controls/HZNV-8X-000021
It loads the page, but the control is actually PHTN-30-000021 (in this example).
Clicking another control in the project and coming back to PHTN-30-000021 then refreshes the URL correctly.

@freddyfeelgood
Copy link
Contributor

More issues found... for example, unlocking a control doesn't refresh the screen. Then when changing the status, the other mandatory fields don't change like they're supposed to. Also, if typing into a field, then nagivating to another control, the text in the field doesn't change as expected.

@smarlaku820
Copy link
Contributor

Hi @vanessuniq ,

I love the way I can get to any control by performing a GET.
observed a lot going in the backend. lot of queries.

If I click, 4 or 5 controls on the page, its even getting delayed in loading the page & hitting the performance. Can we do something to cache the responses ? And did you observe this pattern at your end ?

@vanessuniq
Copy link
Contributor Author

Initial testing looks good. One minor "bug" is in the URL, if you change the component ID, but leave the rest, it will navigate you to the control in the new component with the same last 6 digits (looks like the "prefix" isn't being checked). So for example, if I am at location: http://127.0.0.1:3000/components/97/controls/HZNV-8X-000021 And I change to component 103: http://127.0.0.1:3000/components/103/controls/HZNV-8X-000021 It loads the page, but the control is actually PHTN-30-000021 (in this example). Clicking another control in the project and coming back to PHTN-30-000021 then refreshes the URL correctly.

nice catch

@vanessuniq
Copy link
Contributor Author

Hi @vanessuniq ,

I love the way I can get to any control by performing a GET. observed a lot going in the backend. lot of queries.

If I click, 4 or 5 controls on the page, its even getting delayed in loading the page & hitting the performance. Can we do something to cache the responses ? And did you observe this pattern at your end ?

Yes, I noticed that. I did not want to change the workflow that was already in place, just build on top of it. This is due to several event listener within all involved Rules vue components that triggers axios. This workflow definitely needs to be optimized.

@vanessuniq
Copy link
Contributor Author

Moving this to draft, continue working on the issues

@vanessuniq vanessuniq marked this pull request as draft March 2, 2023 16:17
@vanessuniq
Copy link
Contributor Author

resolved with pr #546

@vanessuniq vanessuniq closed this Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Pull requests that add a new feature feature request
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

Add deep linking to controls
3 participants