-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[Config] Giving the possibility to have a config dependency based on empty config value #25774
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
[Config] Giving the possibility to have a config dependency based on empty config value #25774
Conversation
Hi @eduard13. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
Based on the Backward Compatibility Policy, we shouldn't change classes marked as @api, but what do you @paliarush think about having a such feature? |
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.
Hi @eduard13,
great job, thank you!
Based on the Backward Compatibility Policy, we shouldn't change classes marked as @api
No, it's not relevant unless we change the signature of public/protected methods or introduce new properties or methods, etc.
The only thing, I guess, the behavior you mentioned in description should apear in case the negative="1"
attribute is set.
e.g. with the following configuration:
<depends>
<field id="*/*/first_input" negative="1"/>
</depends>
the second field should be shown if the first one is empty, and vice versa.
Feel free to contact me for further discussion if necessary, or correct me if I'm wrong.
Could you please also implement the recommendations from the static test report?
Thank you!
Hi @dmytro-ch, thank you for your review. Actually not sure what Thank you. |
After taking a closer look at the issue and having an additional discussion, we decided to proceed with the current behaviour to keep the logic of |
Hi @dmytro-ch, thank you for the review. |
…ncy based on empty config value #25774
Hi @eduard13, thank you for your contribution! |
Description (*)
This PR provides a way to set a dependency to a field based on the empty value.
For example:
You have 2 input config fields, and you want to hide the 2nd one if the 1st one won't be empty.
Our
system.xml
will look like:Fixed Issues (if relevant)
N/A
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)