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

Add support for non-selectable tree items #2123

Closed
pcdavid opened this issue Jun 29, 2023 · 0 comments · Fixed by #2131
Closed

Add support for non-selectable tree items #2123

pcdavid opened this issue Jun 29, 2023 · 0 comments · Fixed by #2131

Comments

@pcdavid
Copy link
Member

pcdavid commented Jun 29, 2023

For the various modals we will need for the reference widget (see #2116, #2117, #2118) we will need tree representations which display all the elements in the project but only all the selection of the elements which are type-compatible with the reference being edited.

The frontend can not compute this type compatibility by itself, and we do not want to query it each time the user selects an element.

Instead we will add a new flag to TreeItem, named selectable.
It will be true by default so that the current behavior does not change.
When rendering a Tree, the backend will be able to set the flag individually for each item.

On the frontend, the non-selectable items will have a different style.
They will still be focusable/expandable/collapsable and have a context menu (if relevant for them).
The only behavioral difference is that they will not participate in the selection.
In other words, they will never invoke the provided setSelection callback.

@pcdavid pcdavid self-assigned this Jun 29, 2023
@pcdavid pcdavid added this to the 2023.8.0 milestone Jun 29, 2023
pcdavid added a commit that referenced this issue Jun 29, 2023
Bug: #2123
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
@pcdavid pcdavid linked a pull request Jun 29, 2023 that will close this issue
pcdavid added a commit that referenced this issue Jun 29, 2023
Bug: #2123
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
pcdavid added a commit that referenced this issue Jun 29, 2023
Bug: #2123
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
pcdavid added a commit that referenced this issue Jul 3, 2023
Bug: #2123
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
pcdavid added a commit that referenced this issue Jul 3, 2023
Bug: #2123
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
pcdavid added a commit that referenced this issue Jul 5, 2023
Bug: #2123
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
pcdavid added a commit that referenced this issue Jul 5, 2023
Bug: #2123
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
pcdavid added a commit that referenced this issue Jul 5, 2023
Bug: #2123
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
pcdavid added a commit that referenced this issue Jul 7, 2023
Bug: #2123
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
pcdavid added a commit that referenced this issue Jul 7, 2023
Bug: #2123
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
AxelRICHARD pushed a commit that referenced this issue Jul 10, 2023
Bug: #2123
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
pcdavid added a commit that referenced this issue Jul 11, 2023
Bug: #2123
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
AxelRICHARD pushed a commit that referenced this issue Jul 11, 2023
Bug: #2123
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant