-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reorganise configuration across Rails app and component classes #2210
base: v4
Are you sure you want to change the base?
Conversation
c7cf9a7
to
f6afae9
Compare
Preview namespace additionally added to config object in this commit to test config inheritance. Much more cleanup to be done around making as many things as possible component-local.
From here, we can start moving options to be component-local.
…hortcut to components
We're now at the stage where everything on this object lives on Rails.application.config.view_component.
f6afae9
to
b159d1e
Compare
Gave this a day's work while my internet was down. I've gotten to a point where all config lives on
I think more options need to be component-local, but there are cases like the above where it's not possible without more changes to how ViewComponent is used...
That hopefully gets us to the stage where everything works, but from there I'll need to:
|
This PR aims to rework configuration such that individual component instances can be configured differently, with the end goal of ensuring that applications and engines can define their configuration separately. We're taking a scorched earth approach here, though it will be important to ensure that the migration path from v3 is straightforward.
NOTE: This branch is a WIP – I'll squish things down before it's ready to share.
#1945 sheds some good light on the kinds of problems we're looking to solve here. Big thanks to @Slotos for their really helpful comment on that issue.