[SR] Add callout for managed repository and prevent deletion from UI#36947
[SR] Add callout for managed repository and prevent deletion from UI#36947jen-huang merged 7 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/es-ui |
💚 Build Succeeded |
cjcenizal
left a comment
There was a problem hiding this comment.
I haven't reviewed the code yet, but I have a couple suggestions WRT copy and UX.
This is a detail panel where typically I'd expect users to look to learn more about a repository before editing it. You also can't do anything directly bad here (like delete the repo), so I think it might make more sense to leave out the "proceed with caution" warning, but add more copy to explain what a managed repository is. For example, "Managed repositories are created and consumed by other systems. Making changes to them can interfere with those systems' operation." I would like to hear @gchaps's thoughts on this.
For the edit form, I think the copy at the top is great, but we should incorporate whatever additional detail we add to the detail panel. In other words, let's keep the pattern of presenting a more verbose form of the detail panel warning.
Also, what do you think of having a less-enticing looking button at the bottom? I was thinking of maybe using a confirmation modal instead, but that seems like the wrong pattern to use here. If someone is in here, they should have already read a warning at some point in the UX and if they're making changes they probably know what they're doing. A modal just introduces more steps without informing them any more than they're already informed.
alisonelizabeth
left a comment
There was a problem hiding this comment.
Tested locally. LGTM.
One minor suggestion - what do you think about adding a tooltip to the checkbox/delete icon when its disabled in the table to explain why it can't be selected? Or do you think the badge is enough?
|
Going off what @cjcenizal and @alisonelizabeth said, here are some suggestions: Details pane This is a managed repository used by other systems. Any changes you make might affect how these systems operate. Edit pane This is a managed repository. Changing this repository might affect other systems that use it. Proceed with caution. Button label I played around with the button label a bit. I'm not really a fan of including parens in a button label. Maybe using the warning at the top and this button label would be enough? Save repository changes Tooltip You cannot delete a managed repository. |
|
@gchaps You're right, the warning at the top is probably enough. I don't feel too strongly about the copy inside the button, as long as it is styled differently so that users pause before instinctively clicking it. |
|
I've adjusted the copy, Save button styling, and added tooltips to disabled delete actions for a managed repository. Screenshots in main description has been updated. |
💔 Build Failed |
💚 Build Succeeded |
…lastic#36947) * Check repository plugins using callWithInternalUser instead * Add information about whether repository is managed (by Cloud) * Adjust warning copy, add warning Save button styling, and remove button tooltips * Add same tooltip to trash can icon * Fix prop
…lastic#36947) * Check repository plugins using callWithInternalUser instead * Add information about whether repository is managed (by Cloud) * Adjust warning copy, add warning Save button styling, and remove button tooltips * Add same tooltip to trash can icon * Fix prop


Relates to https://github.com/elastic/cloud/issues/29439
Summary
This PR adjusts the UI logic when a repository is detected to be a Cloud-managed repository. We want to:
Testing instructions
cluster.metadata.managed_repositorysetting via Console:found-snapshots)Note: Neither step is necessary when this goes live on Cloud, as both the repository and the setting will already exist, we are just mocking the environment locally here 🙂
Copy feedback
I would love some help from @zanbel / @yaronp68 / @gchaps on refining the messaging of these two strings. You can see them in action in the screenshots below.
Short version:
Verbose version:
Screenshots
In the table, a Managed badge appears next to the name, and deletion is disabled (user is not able to select the row and trash can icon is disabled):
In repository details, Remove button is disabled, and a warning callout appears:
When editing the managed repository, another warning callout appears, and the Save button is treated differently: