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

[Spaces] Add warning for changes that impact other users #188728

Merged
merged 4 commits into from
Jul 23, 2024

Conversation

sebelga
Copy link
Contributor

@sebelga sebelga commented Jul 19, 2024

In this PR I've added a warning callout on top of the "Save" button to warn for changes that will impact other users.

The callout renders when:

  • editing an existing space (not on creation)
  • changing any of the "features" toggles
  • changing the solution view (but not if changing from undefined to classic)

Fixes https://github.com/elastic/platform-ux-team/issues/322

Screenshot

spaces-user-impact

@sebelga sebelga self-assigned this Jul 19, 2024
@sebelga
Copy link
Contributor Author

sebelga commented Jul 19, 2024

/ci

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
spaces 180.6KB 181.6KB +1.0KB

cc @sebelga

@ek-so
Copy link

ek-so commented Jul 19, 2024

Thank you, I like the solution!
I'm wondering:

  • Maybe we can say it a bit shorter, and right in the callout header?
  • Shouldn't we also mention that the page will be reloaded? I've seen it was there in the modal before.
    cc. @kevinsweet

CleanShot 2024-07-19 at 14 26 04@2x

@sebelga
Copy link
Contributor Author

sebelga commented Jul 22, 2024

Shouldn't we also mention that the page will be reloaded?

The page does not always reload. Only if the user is editing the current active space. For that we still have the modal that warns the user before saving.

@sebelga
Copy link
Contributor Author

sebelga commented Jul 22, 2024

Maybe we can say it a bit shorter, and right in the callout header?

I think it is good to have both a title and a description. Open to suggestion for both copy texts 👍

@ek-so
Copy link

ek-so commented Jul 22, 2024

The page does not always reload. Only if the user is editing the current active space. For that we still have the modal that warns the user before saving.

Oh, right, thanks! Then I agree we can leave Warning + text below.

But my idea was to get rid of modal entirely (because showing modal only to say that the page will reload seems too much). So how about this — we show callout instead of modal, but with 2 alternate texts (depending on whether it's current space or not):

  • Warning. The changes will impact all users in the space.
  • Warning. The changes will impact all users in the space. After update, this page will be reloaded.

What do you think @sebelga?

@sebelga
Copy link
Contributor Author

sebelga commented Jul 22, 2024

What do you think @sebelga?

I don't feel confident making decision for the security team.
As they own the space UI I think it would be best for them to decide what is best here.

cc @legrego @petrklapka

@sebelga sebelga marked this pull request as ready for review July 23, 2024 10:58
@sebelga sebelga requested a review from a team as a code owner July 23, 2024 10:58
@sebelga sebelga added Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! Feature:Security/Spaces Platform Security - Spaces feature Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) labels Jul 23, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@sebelga sebelga added the release_note:skip Skip the PR/issue when compiling release notes label Jul 23, 2024
@sebelga sebelga force-pushed the stateful-sidenav/space-ui-warn-impact branch from 9bda5e8 to 7e1a031 Compare July 23, 2024 11:03
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
spaces 180.6KB 181.7KB +1.0KB

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @sebelga

@petrklapka
Copy link
Member

@ek-so @legrego - Let's go with @sebelga simple change for now. It does what is needed. We don't need to reinvent the wheel. I don't want to add noise to the overall effort which is significant. If this UX isn't ideal, we can iterate.

Copy link
Contributor

@SiddharthMantri SiddharthMantri left a comment

Choose a reason for hiding this comment

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

Code changes LGTM! I've asked the team for their opinion on the modal. Happy to have this merged with a separate issue to remove/modify the modal.

@sebelga
Copy link
Contributor Author

sebelga commented Jul 23, 2024

Thanks for the review @SiddharthMantri !

@sebelga sebelga merged commit 1477021 into elastic:main Jul 23, 2024
21 checks passed
@sebelga sebelga deleted the stateful-sidenav/space-ui-warn-impact branch July 23, 2024 15:06
@kibanamachine kibanamachine added v8.16.0 backport:skip This commit does not require backporting labels Jul 23, 2024
@legrego
Copy link
Member

legrego commented Jul 25, 2024

Sorry for the delay, I was on PTO. I'm fine with the approach taken here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Security/Spaces Platform Security - Spaces feature release_note:skip Skip the PR/issue when compiling release notes Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants