-
Notifications
You must be signed in to change notification settings - Fork 885
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
[Workspace] feat: comply recent items with workspace #7115
[Workspace] feat: comply recent items with workspace #7115
Conversation
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7115 +/- ##
=======================================
Coverage 67.56% 67.56%
=======================================
Files 3469 3469
Lines 68499 68502 +3
Branches 11138 11140 +2
=======================================
+ Hits 46280 46283 +3
Misses 19514 19514
Partials 2705 2705
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
The test snapshot is updated by intention because previous result is wrong that it does not reflect the basePath info when generating the final jumping href for the recent items. |
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.
Thanks, looks good to me!
@ruanyl I changed the base branch by mistake and dismissed your approval. Could you please re-approve? |
pick the latest main and re-run all checkings |
* feat: comply recent items with workspace Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * Changeset file for PR #7115 created/updated * feat: comply recent items with workspace Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: comply recent items with workspace Signed-off-by: SuZhou-Joe <suzhou@amazon.com> * feat: update snapshot Signed-off-by: SuZhou-Joe <suzhou@amazon.com> --------- Signed-off-by: SuZhou-Joe <suzhou@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Co-authored-by: ZilongX <99905560+ZilongX@users.noreply.github.com> (cherry picked from commit d0a844f) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* feat: comply recent items with workspace * Changeset file for PR #7115 created/updated * feat: comply recent items with workspace * feat: comply recent items with workspace * feat: update snapshot --------- (cherry picked from commit d0a844f) Signed-off-by: SuZhou-Joe <suzhou@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Co-authored-by: ZilongX <99905560+ZilongX@users.noreply.github.com>
Description
Recent items storage is using
basePath
as the partition of its storage.Before workspace feature is introduced, it works well because the only factor of basePath is
serverBasePath
, which is defined in opensearch_dashboards.yml file.After workspace feature is enabled, things get weird because workspace will modify basePath service so that basePath consists of two parts: 1. serverBasePath 2. currentWorkspaceId. As a result, recent items storage is distinct by workspace, and user can not see all the recent items in any of the page or workspace.
This PR is fixing this issue by only take serverBasePath into consideration when generating the storage key of recent items.
Issues Resolved
closes #7116
Screenshot
You can see all the recent items in home or inside workspace
Redirect when clicking items in recent items section
20240627105211509.mp4
Testing the changes
Changelog
recent items
with workspaceCheck List
yarn test:jest
yarn test:jest_integration