Hide "All changes saved" when not yet saved, after 5 sec
What does this MR do and why?
Hide "All changes saved" when blank, after 5 sec
When creating a category, show "All changes saved" only after save
And hide it when no longer relevant, after five seconds like a toast
References
Screenshots or screen recordings
Before | After |
---|---|
Screen_Recording_2025-10-20_at_20.08.53 All changes saved shows any time there are 0 changes |
Screen_Recording_2025-10-20_at_20.06.53 All changes saved shows only when not blank and recently saved (within the last five seconds, like a toast) |
How to set up and validate locally
git checkout mfluharty-hide-changes-saved-after-timeout
echo "Feature.enable(:security_categories_and_attributes)" | gdk rails c
echo "Feature.enable(:security_context_labels)" | gdk rails c
- navigate to a top-level group that you're a maintainer for =>
Secure
=>Security configuration
- create a new category - with the form in its blank state,
All changes saved
should not be shown
note: if this is the first category for the group, and you can't do so via the UI (Error when adding the first security attribute ... (#577206)):
expand for GraphQL mutation
in http://gdk.test:3000/-/graphql-explorer:
- run this to get the namespace id of your top-level group (like
"gid://gitlab/Group/24"
):
{
group(fullPath: "gitlab-org") { # replace this with the full path of your top-level group
id
}
}
- run this to create a category for that group:
mutation {
securityCategoryCreate(input: {
namespaceId: "gid://gitlab/Group/24", # replace this with the id from step 1
name: "category name",
description: "category description",
multipleSelection: true,
}) {
securityCategory {
name
}
errors
}
}
now you should be able to create more categories in this group via the UI
- edit a category - you should see
N unsaved changes
next to theSave changes
button at the bottom - save the category - you should see
All changes saved
next to theSave changes
button for the next five seconds, then it should disappear
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Miranda Fluharty