-
Notifications
You must be signed in to change notification settings - Fork 901
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
[VisBuilder-Next] Migrate legacy visualizations to visbuilder by mapping the url #7529
Conversation
ℹ️ Manual Changeset Creation ReminderPlease ensure manual commit for changeset file 7529.yml under folder changelogs/fragments to complete this PR. If you want to use the available OpenSearch Changeset Bot App to avoid manual creation of changeset file you can install it in your forked repository following this link. For more information about formatting of changeset files, please visit OpenSearch Auto Changeset and Release Notes Tool. |
❌ Changeset File Not Added YetPlease ensure manual commit for changeset file 7529.yml under folder changelogs/fragments to complete this PR. File still missing. |
044f558
to
0bfcd1a
Compare
Signed-off-by: Shey Gao <[email protected]>
Signed-off-by: Shey Gao <[email protected]>
Signed-off-by: Shey Gao <[email protected]>
4f7d634
to
5a552e8
Compare
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.
general question for core team, with force pushes i find it hard to tell what the delta is comparing to the last time i reviewed. Is there a good way to see what changed?
doing a direct ..
comparison shows a lot more upstream changes through rebase rather than changes brought by this PR: https://github.com/opensearch-project/OpenSearch-Dashboards/compare/836974a163480915278a090fc0c955243b138d61..a5149689f199a2fabb19f02daf39674a7eea96d9
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-7529-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 231337231be2ad98f7086b154de43339205f9ca6
# Push it to GitHub
git push --set-upstream origin backport/backport-7529-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x Then, create a pull request where the |
…ing the url (opensearch-project#7529) * migration of visualization objects to visbuilder Signed-off-by: Shey Gao <[email protected]> * update layover Signed-off-by: Shey Gao <[email protected]> * fixed a bug Signed-off-by: Shey Gao <[email protected]> * Changeset file for PR opensearch-project#7529 created/updated --------- Signed-off-by: Shey Gao <[email protected]> Co-authored-by: Shey Gao <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 2313372)
…ing the url (opensearch-project#7529) * migration of visualization objects to visbuilder Signed-off-by: Shey Gao <[email protected]> * update layover Signed-off-by: Shey Gao <[email protected]> * fixed a bug Signed-off-by: Shey Gao <[email protected]> * Changeset file for PR opensearch-project#7529 created/updated --------- Signed-off-by: Shey Gao <[email protected]> Co-authored-by: Shey Gao <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 2313372)
…ing the url (#7529) (#7832) * migration of visualization objects to visbuilder Signed-off-by: Shey Gao <[email protected]> * update layover Signed-off-by: Shey Gao <[email protected]> * fixed a bug Signed-off-by: Shey Gao <[email protected]> * Changeset file for PR #7529 created/updated --------- Signed-off-by: Shey Gao <[email protected]> Co-authored-by: Shey Gao <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 2313372)
Description
In this PR, we aim to migrate legacy visualization objects compatible with VisBuilder to VisBuilder objects, enabling users to directly open these legacy objects in VisBuilder. The method involves constructing a URL that navigates directly to the VisBuilder page rendering the object. Key changes to the existing codebase include:
visbuilderEditItem
, triggered when users click theImport to VisBuilder
button. This function takes a legacy visualization item as input, migrating the states from the visualization object to those required in the VisBuilder URL by callingconstructVisBuilderPath
, and then navigates to the VisBuilder app with the constructed path to complete the migration.Edit
to open the object in its original format orImport to VisBuilder
to open it in VisBuilder, instead of only having theEdit
option previously.Issues Resolved
Screenshot
Screen.Recording.2024-08-01.at.12.47.47.PM.mov
Screen.Recording.2024-07-31.at.6.42.50.PM.mov
Testing the changes
For testing purposes, we have added unit tests for two files:
edit_action_dropdown.test.tsx
to verify the updated UI changes, andmigrate_url.test.tsx
to validate the migration URL functionality. Additional functional tests will be included in a different repository.Changelog
Check List
yarn test:jest
yarn test:jest_integration