-
Notifications
You must be signed in to change notification settings - Fork 894
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]Remove collaborators in workspace creation page and refactor with getDisplayedType #8520
[Workspace]Remove collaborators in workspace creation page and refactor with getDisplayedType #8520
Conversation
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8520 +/- ##
=======================================
Coverage 60.95% 60.96%
=======================================
Files 3777 3777
Lines 89641 89639 -2
Branches 14046 14049 +3
=======================================
+ Hits 54643 54646 +3
+ Misses 31584 31583 -1
+ Partials 3414 3410 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -177,7 +167,7 @@ export const WorkspaceCreator = (props: WorkspaceCreatorProps) => { | |||
savedObjects={savedObjects} | |||
onSubmit={handleWorkspaceFormSubmit} | |||
operationType={WorkspaceOperationType.Create} | |||
permissionEnabled={isPermissionEnabled} | |||
permissionEnabled={false} |
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.
Can we remove this props instead of giving false. I think this permissionEnabled props is not needed any more right?
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.
You're right, let's remove the permissionEnabled property. I met a unit tests failed without this property before. But seems all the unit tests can be passed now. Let me remove this property.
Signed-off-by: Lin Wang <[email protected]>
newWorkspaceId, | ||
http.basePath | ||
DetailTab.Collaborators |
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.
do we need to check permission enabled?
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.
Good point, I think we should check this. Let me add a fallback logic here.
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
Hi @SuZhou-Joe @Hailong-am , I've refactor the type column in the collaborator table. Feel free to help me take a look. Thank you. |
Signed-off-by: Lin Wang <[email protected]>
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-8520-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 fcc18fb2033f7216ca51854900946339d53bc772
# Push it to GitHub
git push --set-upstream origin backport/backport-8520-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 |
…or with getDisplayedType (#8520) * Remove workspace collaborators section in workspace creation Signed-off-by: Lin Wang <[email protected]> * Redirect to workspace detail collaborators tab after workspace created Signed-off-by: Lin Wang <[email protected]> * Changeset file for PR #8520 created/updated * Add getDisplayedType in default collaborator types Signed-off-by: Lin Wang <[email protected]> * Update detail type to ReactNode Signed-off-by: Lin Wang <[email protected]> * Add learn more link Signed-off-by: Lin Wang <[email protected]> * Remove permissionEnabled passed in WorkspaceCreatorForm Signed-off-by: Lin Wang <[email protected]> * Redirect to use case landing page if permission not enabled Signed-off-by: Lin Wang <[email protected]> * Use getDisplayedType and render — for empty Signed-off-by: Lin Wang <[email protected]> * Fix incorrect unit tests Signed-off-by: Lin Wang <[email protected]> * Assign current user as workspace admin Signed-off-by: Lin Wang <[email protected]> --------- Signed-off-by: Lin Wang <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit fcc18fb) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…or with getDisplayedType (#8520) (#8560) * Remove workspace collaborators section in workspace creation * Redirect to workspace detail collaborators tab after workspace created * Changeset file for PR #8520 created/updated * Add getDisplayedType in default collaborator types * Update detail type to ReactNode * Add learn more link * Remove permissionEnabled passed in WorkspaceCreatorForm * Redirect to use case landing page if permission not enabled * Use getDisplayedType and render — for empty * Fix incorrect unit tests * Assign current user as workspace admin --------- (cherry picked from commit fcc18fb) Signed-off-by: Lin Wang <[email protected]> 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>
…or with getDisplayedType (opensearch-project#8520) * Remove workspace collaborators section in workspace creation Signed-off-by: Lin Wang <[email protected]> * Redirect to workspace detail collaborators tab after workspace created Signed-off-by: Lin Wang <[email protected]> * Changeset file for PR opensearch-project#8520 created/updated * Add getDisplayedType in default collaborator types Signed-off-by: Lin Wang <[email protected]> * Update detail type to ReactNode Signed-off-by: Lin Wang <[email protected]> * Add learn more link Signed-off-by: Lin Wang <[email protected]> * Remove permissionEnabled passed in WorkspaceCreatorForm Signed-off-by: Lin Wang <[email protected]> * Redirect to use case landing page if permission not enabled Signed-off-by: Lin Wang <[email protected]> * Use getDisplayedType and render — for empty Signed-off-by: Lin Wang <[email protected]> * Fix incorrect unit tests Signed-off-by: Lin Wang <[email protected]> * Assign current user as workspace admin Signed-off-by: Lin Wang <[email protected]> --------- Signed-off-by: Lin Wang <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Description
This PR updates below for collaborators in workspace creation page and workspace setting page.
getDisplayedType
generate displayed types in collaborators tableScreenshot
Testing the changes
yarn osd bootstrap --single-version loose
config/opensearch_dashboards.yml
yarn start --no-base-path
Changelog
Check List
yarn test:jest
yarn test:jest_integration