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

fix: Correctly construct URL by re-ordering portals #3773

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Oct 8, 2024

What's the problem?

What's the solution?

  • The order of portals in the URL is hierarchical (grandparent → parent → child), but the path generated by getPathForNode() is in opposite order (current node → parent → grandparent).
  • This means just need to call reverse() on the list of internal portals 👌

To test -

Next steps...

It's a little unexpected that the navigation happens after you close the modal, I think I'd expect it on click of the result card when the modal is opened. This may not be an easy change, but I'll timebox a look into this one.

This really highlights to me how valuable it would be to locate your node in the X/Y space of the flow editor. I'll add a card to the backlog for this, and might try to pick it up before a Friday show + tell.

Copy link

github-actions bot commented Oct 8, 2024

Removed vultr server and associated DNS entries

Copy link
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

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

Hey thanks for digging into this one!

Getting some unexpected behavior on pizza:

  • If I start here: https://3773.planx.pizza/opensystemslab/permitteddevelopment
  • And do a data-only search for internal.mezzanine (which is the data val on one of the options in the root-level Checklist)
  • My results are nearly all for non-data-field content in internal portals and the root-level option is never picked up?
    Screenshot from 2024-10-08 14-58-21

Haven't compared this to staging behavior yet, but doesn't feel expected - anything I might be missing here?

@DafyddLlyr DafyddLlyr changed the base branch from main to dp/search-all-ui October 8, 2024 17:34
@DafyddLlyr DafyddLlyr changed the base branch from dp/search-all-ui to main October 8, 2024 17:34
@DafyddLlyr DafyddLlyr force-pushed the dp/fix-portal-navigation branch from 6c4e9b5 to eab729c Compare October 8, 2024 19:21
@DafyddLlyr
Copy link
Contributor Author

Ah! This is a feature flag issue sorry - I've kept the button disabled but not correctly handled the initial values.

I'm actually removing the flag in this PR - #3763

In the meantime, we can wait for the above to merge, or test this PR after toggling the feature flag (window.featureFlags.toggle("DATA_ONLY_SEARCH"))

Copy link
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

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

Aha thanks for confirming feature flag issue - happy to ignore that then here.

URLs are correct, thanks for pinpointing sort issue here! Indeed agree navigation is a bit unexpected (both that it happens after closing modal, and that it maintains previous scroll x/y position which no longer matches new result) - but correct URLs feel most important priority!

@DafyddLlyr DafyddLlyr merged commit 7a5a4ba into main Oct 9, 2024
12 checks passed
@DafyddLlyr DafyddLlyr deleted the dp/fix-portal-navigation branch October 9, 2024 06:40
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.

2 participants