Loading
Add loading state for security attribute admin ui
What does this MR do and why?
Add loading state for security attribute admin ui
Show a loading state in each panel when loading
(category list and category/attributes form)
Also remove dead code: client-side query used for prototyping
Changelog: changed
EE: trueReferences
Screenshots or screen recordings
| Before | After |
|---|---|
| blank form shows while loading |
skeleton loader shows while loading |
expand for recording from before e9634185
How to set up and validate locally
-
git checkout mfluharty-add-security-attributes-admin-ui-loading-state - have a GitLab Ultimate licence
- go to a group you own =>
Secure=>Security configuration=>Security attributes - check that the tab settles into its normal state:
- the left panel should list the group's categories
- the first category should be selected
- the right panel should show that category's form and its attributes
- no skeleton placeholder should still be on screen once the data arrives
a group with no categories yet
- create a brand new group, or pick one that has never had a security category added
- go to that group =>
Secure=>Security configuration=>Security attributes - check that the tab does not get stuck loading:
- both skeleton placeholders should disappear once the query comes back
- the left panel should render as an empty category list rather than a placeholder
- the right panel should render the form rather than a placeholder
seeing the loading state itself
- open devtools =>
Network=> set throttling toSlow 4G - reload the
Security attributestab - check that while the query is in flight:
- the left panel shows a placeholder in place of the category list
- the right panel shows a placeholder in place of the category form
- neither the real category list nor the real form is on screen at the same time as its placeholder
the query error path
- open devtools =>
Network=> block the GraphQL request, or go offline - reload the
Security attributestab - check that:
- both placeholders disappear rather than spinning forever
- the error is reported to Sentry, visible as a
captureExceptioncall in the console when Sentry is not configured locally
to run tests
yarn jest ee/spec/frontend/security_configuration/components/security_attributes/configure_attributes_spec.jsMR 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