F lazy edit mode dropdowns
Summary
For #363 (closed) (https://gitlab.com/linkahead/linkahead-webui/-/issues/262). Changes the default behavior of reference properties in the edit mode such that the dropdown menus are only initialized upon manual request. The old behavior can be restored by setting the new build variable to DISABLED
.
Focus
By default, the initialization of property value inputs is interrupted for reference properties. Instead, a button is added that triggers the old function on click. The button also adds a class to the property HTML element and dispatches an event, so that the value generation upon update and the file upload can work as expected.
Test Environment
- Run the webui with
BUILD_EDIT_MODE_LAZY_DROPDOWN_LOADING=DISABLED
and make sure that nothing changed. Edit an entity by adding/changing/removing reference properties and lists of references and make sure everything works as before. - Now run the webui with
BUILD_EDIT_MODE_LAZY_DROPDOWN_LOADING=ENABLED
(new default). Again edit an entity with references by
- changing an unrelated property and make sure that the value of the reference properties doesn't change or vanish
- changing the value of a reference prop
- changing a reference prop to a list
- changing a list of reference to a scalar
- adding reference properties
- removing (list of) reference properties
- ... and whatever else you can come up with.
- Also check by looking into the network communication or the server logs that the queries to fill the dropdown menu are indeed only executed after clicking on the new button.
Check List for the Author
Please, prepare your MR for a review. Be sure to write a summary and a focus and create gitlab comments for the reviewer. They should guide the reviewer through the changes, explain your changes and also point out open questions. For further good practices have a look at our review guidelines
-
All automated tests pass -
Reference related issues -
Up-to-date CHANGELOG.md (or not necessary) -
Up-to-date JSON schema (or not necessary) -
Appropriate user and developer documentation (or not necessary) - How do I use the software? Assume "stupid" users.
- How do I develop or debug the software? Assume novice developers.
-
Annotations in code (Gitlab comments) - Intent of new code
- Problems with old code
- Why this implementation?
Check List for the Reviewer
-
I understand the intent of this MR -
All automated tests pass -
Up-to-date CHANGELOG.md (or not necessary) -
Appropriate user and developer documentation (or not necessary) -
The test environment setup works and the intended behavior is reproducible in the test environment -
In-code documentation and comments are up-to-date. -
Check: Are there specifications? Are they satisfied?
For further good practices have a look at our review guidelines.