Refactor the pre-enforcement storage banner logic to `ViewComponent`
What does this MR do and why?
Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/367382
This refactors the pre-enforcement storage banner logic to ViewComponent
, a better approach instead of relying on helpers
Screenshots or screen recordings
There are no UI changes, so putting just the banner for reference
User accessing their own namespace | ![]() |
---|---|
User as a project maintainer on other user's namespace | ![]() |
Subgroup | ![]() |
Project | ![]() |
Root Group | ![]() |
How to set up and validate locally
- Make sure to enable these:
::Gitlab::CurrentSettings.update(enforce_namespace_storage_limit: true)
::Gitlab::CurrentSettings.update(automatic_purchased_storage_allocation: true)
::Gitlab::CurrentSettings.update(check_namespace_plan: true)
::Feature.enable(:namespace_storage_limit_show_preenforcement_banner)
- Make sure you're simulating SaaS
- Go to any free group, project, subgroup, or personal namespace
- The banner should be showing as before
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Sheldon Led