-
Notifications
You must be signed in to change notification settings - Fork 356
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
Expose our DDF renderer and constants as an alias for other engines #7005
Conversation
This would still require the provider plugins to depend directly on DDF, which we might want to avoid if we'd like to avoid problems when upgrading DDF to newer versions. However, the only thing we need from DDF are constants, like I am also thinking about renaming the |
Oh, nice, I had started something similar in #4966, but never finished making all the code use it. I'm not sure we should use this in a plugin though. Tying a plugin to the exact structure of files in manageiq-ui-classic sounds brittle, I think plugins should only use the component registry. (I'd still go with something shorter, |
|
815b5db
to
b6822b1
Compare
config/webpack/shared.js
Outdated
@@ -136,6 +136,7 @@ module.exports = { | |||
'bootstrap-select': '@pf3/select', // never use vanilla bootstrap-select | |||
'@patternfly/patternfly': resolveModule('NONEXISTENT'), | |||
'@patternfly/patternfly-next': resolveModule('NONEXISTENT'), | |||
'@@MiQ-DDF': resolve(dirname(__filename), '../../app/javascript/forms/data-driven-form'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about just @@ddf
nobody will ever type MiQ with the right capitalization
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And you may need a similar entry in jest.config.js
- moduleNameMapper
section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
b6822b1
to
2e5ea11
Compare
2e5ea11
to
5d870bf
Compare
Checked commit skateman@5d870bf with ruby 2.5.7, rubocop 0.69.0, haml-lint 0.28.0, and yamllint |
@himdel are you okay with these changes now? |
Sorry, LGTM :) |
We have our own renderer for DDF and it would be nice to expose it for other rails engines. This would allow me to continue in getting rid of final-form components in some provider repos by replacing them with DDF.
The alias is set to
@@ddf
, so we could load a component like this:@miq-bot add_label enhancement, react
@miq-bot assign @himdel