Replace deprecated view_component slot setter in EE pages
What does this MR do and why?
Updates all¹ deprecated ViewComponent slot setter calls in /ee/app/views
with the new slot setters like c.with_SLOT_NAME
.
The old way (c.SLOT_NAME
) got deprecated in the later 2.x versions of the view_component
gem and now got completely removed in the recent 3.0 release. We have to replace all deprecated calls before we can Upgrade to view_component v3.0 (#408988 - closed).
Because we have 150+ lines in ~50 files to update, I do it in batches to get smaller, more reviewable MRs. This is one of them.
¹: Turns out we also have lots of lines starting with =
(instead of the dash in - c.SLOT_NAME
). These will be handled in !120604 (merged).
Screenshots or screen recordings
No visual changes.
How to set up and validate locally
- I've done a search&replace-all (&
👀 ) in/ee/app/views
, so please double-check that I didn't accidentally do something stupid likewith_with_foo
. Thanks :) - We are currently on the latest 2.x version of the view_component gem. Both ways to set the slot work here, so there shouldn't be any functional changes, but feel free to browse around in the affected areas of the UI. Examples:
- http://gdk.test:3000/admin/users/root (the "Credit card" card at the bottom)
- http://gdk.test:3000/flightjs/Flight/-/settings/ci_cd (the card inside the "Automatic deployment rollbacks" section)
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.