Skip to content
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

UI Misalignment on Array Item Removal and Lack of Min/Max Item Validation #310

Closed
SindriTh opened this issue Dec 2, 2023 · 1 comment · Fixed by #311
Closed

UI Misalignment on Array Item Removal and Lack of Min/Max Item Validation #310

SindriTh opened this issue Dec 2, 2023 · 1 comment · Fixed by #311

Comments

@SindriTh
Copy link
Contributor

SindriTh commented Dec 2, 2023

Description:

I have identified two significant issues in the application related to the handling of arrays in the UI.

  1. Incorrect UI Rendering on Array Item Removal:

    • Problem: When an item is removed from an array, the UI incorrectly displays this change as if the last item in the array was removed, regardless of which item was actually deleted. This discrepancy between the actual data and its representation in the UI can lead to confusion and errors in data handling.
    • Expected Behavior: The UI should accurately reflect the removal of the specific item from the array, maintaining a true representation of the array's state.
  2. Non-Compliance with Min/Max Item Constraints:

    • Problem: The application currently does not enforce the minItems and maxItems constraints defined for arrays. As a result, users can add or remove items from an array without any warnings or errors, even when the number of items falls outside the specified bounds.
    • Expected Behavior: The application should validate the number of items in an array against the minItems and maxItems constraints. If the array does not comply with these constraints, the application should alert the user with appropriate error messages.

Impact:

  • User Experience: The current issues can lead to a misleading user experience, as the visual representation in the UI does not accurately reflect the underlying data, especially after array modifications.
  • Data Validation: The lack of enforcement of minItems and maxItems constraints undermines the application's adherence to its data schema, potentially leading to data integrity issues.

Steps to Reproduce:

  1. For Incorrect UI Rendering:

    • Add multiple items to an array.
    • Remove an item that is not the last one.
    • Observe the UI representation of the array.
  2. For Min/Max Item Constraints:

    • Create an array with specified minItems and maxItems constraints.
    • Add or remove items to breach these constraints.
    • Note the absence of error messages or warnings.

Suggested Fix:

A custom component for array handling logic in the UI is required.

image

Originally posted by @SindriTh in #305 (comment)

@SindriTh SindriTh linked a pull request Dec 4, 2023 that will close this issue
@SindriTh
Copy link
Contributor Author

SindriTh commented Dec 5, 2023

Includes issue raised in #303

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant