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
FELIX-6614 WebConsole configMgr saves an empty value in list properites #212
Conversation
spanCounter++; | ||
var newId = prop + spanCounter; | ||
|
||
var addButton = createElement("input", null, |
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.
maybe one could reuse the same code here and in createSpan(...) to reduce duplication.
I think the best UX would be
The "+" per item is very uncommon and is IMHO not needed if there is a possibility to reorder. |
Let's not put too many changes into this single issue. The most important part is to avoid saving the empty value. So I suggest, we keep the add/delete buttons after each field. And if there is no value yet, only display the add button |
@cziegeler Thank you for reviewing, I made this decision based on our current implementation, which includes a '+' button next to each field. This button enables users to add a new empty field below it, granting them the ability to add values at any index, excluding the first one. By keeping the '+' button "at top" visible at all times, we provide users with the option to add new values at the first index as well. However, if you strongly recommend against displaying the top '+' button at all times, I am open to making changes accordingly. |
I think this comment referred only to the topmost add icon (not bound to an item, compare with the screenshot). |
@kwin I am also referring to the topmost add icon. Here is the comparison:
|
@sagarmiglani Thanks for the clarification, makes sense to me. But as I am not a committer you would need @cziegeler's approval and merge. |
@sagarmiglani Thanks for the comparison. I think the item where we have different opinions is row 4 - while I agree that it would be consistent to allow to add a value to the first row, I think this is a limited use case - in many cases the ordering of the values does not matter. But with the button always there, it takes more screen space than today. |
…es (#212) * FELIX-6614 WebConsole configMgr saves an empty value in list properites * FELIX-6614 WebConsole configMgr saves an empty value in list properites --------- Co-authored-by: Sagar Miglani <saga@adobe.com>
This pull request addresses the issue of an empty value being saved when a list property has no value (FELIX-6614). The proposed solution is to filter out the request query parameters that have empty values.