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

BUG: Select Box show as empty when current value doesnt match anymore the values #3520

Closed
mhsdesign opened this issue Jun 6, 2023 · 1 comment
Labels
7.3 8.3 9.0 Bug Label to mark the change as bugfix UI & UX

Comments

@mhsdesign
Copy link
Member

mhsdesign commented Jun 6, 2023

Currently a mismatch from datasource to current value will be displayed falsely as being empty. We should make it obvious that the value didnt match.

Simple reproduction

have a selectbox option with defined values:

tagName:
  type: string
  defaultValue: 'h2'
  ui:
    label: i18n
    reloadIfChanged: true
    inspector:
      group: settings
      position: 10
      editor: Neos.Neos/Inspector/Editors/SelectBoxEditor
      editorOptions:
        values:
          h1:
            label: h1
          h2:
            label: h2
          h3:
            label: h3
          h4:
            label: h4
          h5:
            label: h5

set it to for example to h5 in the ui and then change the node type to remove the option.
Reload the ui and see this:

image

it seems the property is not set at all, but you are mistaken it is just shown as empty. Additionally a not empty validator wouldnt complain as the property is actually not empty.

This behaviour should be improved.

A similar buggy behaviour also exists for selectboxes with allowEmpty: true
after the above steps a mismatch is also being shown as empty but one still has the X delete button, which gives a hint that its not really empty after all.

image

And the same for multiple: true

image

when adding a new element in multiple: true it behaves buggy when deleting one item as its stays after the first click (one deletes the empty value or something)

@mhsdesign mhsdesign changed the title BUG: WIP: Investigate Select Box where values dont match current value. BUG: Select Box show as empty when current value doesnt match anymore the values Jun 12, 2023
@mhsdesign mhsdesign linked a pull request Jun 12, 2023 that will close this issue
6 tasks
@grebaldi grebaldi added Bug Label to mark the change as bugfix UI & UX 7.3 9.0 8.3 labels Jan 8, 2024
@mhsdesign mhsdesign moved this to Todo Contributors in Neos Sprint Hamburg - 2024-03 Mar 11, 2024
@Alvadda Alvadda moved this from Todo Contributors to In Progress in Neos Sprint Hamburg - 2024-03 Mar 13, 2024
73nici pushed a commit to 73nici/neos-ui that referenced this issue Mar 13, 2024
@mhsdesign
Copy link
Member Author

mhsdesign commented Jun 24, 2024

For the case of multi select-boxes, the ordering feature doesnt work anymore if there are outdated values in between.

By generating a label beforehand, this will not be a problem but still for the standalone case.

Broken (the option h3 was removed from the schema):

Bildschirmaufnahme.2024-06-27.um.10.42.09.mov

Expected:

Bildschirmaufnahme.2024-06-27.um.10.40.16.mov

The reason for this is the bool filter here is broken. we must keep the real index see daggableValues[dragIndex];:

).filter(Boolean);
return draggableOptions.map(this.renderOption);
}
renderOption = (option, index) => {

mhsdesign added a commit to 73nici/neos-ui that referenced this issue Jun 27, 2024
The bool filter here is broken. we must keep the real index see daggableValues[dragIndex];:

neos#3520 (comment)
@Sebobo Sebobo closed this as completed Jul 2, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Neos Sprint Hamburg - 2024-03 Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7.3 8.3 9.0 Bug Label to mark the change as bugfix UI & UX
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants