Fix UX for inherited boolean properties #479
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses a UX issue with asset/document properties of boolean type.
Problem description
Affected version
Steps to reproduce
Expected behavior
Actual behavior
Discussion
Impact on UX
It is confusing to the user because one can change the value, the value appears to have changed, however, saving the changed value does not do anything - in fact, it can only be seen once the tab is reloaded and one navigates to the properties again to see that the value resets to the previous value.
We found that this very behavior only appears for properties of boolean type - which indicates that the behavior is not intended as is.
How it came to be this way
Checkbox not displayed
We did some digging in the code history and found that in July 2018, the change which prevented displaying a checkbox was introduced during a massive directory structure refactoring 2fb5fa7. It seems that code has been consolidated from various sources back then (pimcore/static/js/pimcore/settings/metadata/predefined.js, pimcore/static5/js/pimcore/settings/website.js, pimcore/static6/js/pimcore/asset/metadata.js, ...). these sources have been created in 2014 and 2015. Unfortunately, we could not find any hint on why the change was necessary.
Toggle change for inherited boolean properties
Changing a boolean property, even if inherited, has been moved in 2015 and thus has been created even before. 41b0c81