Skip to content

Expandable node is shown at wrong place, sorting broken after expand #1417

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

Closed
iloveeclipse opened this issue Dec 14, 2023 · 0 comments · Fixed by #1418
Closed

Expandable node is shown at wrong place, sorting broken after expand #1417

iloveeclipse opened this issue Dec 14, 2023 · 0 comments · Fixed by #1418
Assignees
Labels
bug Something isn't working regression
Milestone

Comments

@iloveeclipse
Copy link
Member

If items limit is enabled, clicking on expandable element adds all elements before the node, so the sort order is totally wrong and "expandable node" appears "in the middle" of the siblings.

However, "hidden and now expanded" elements (if exists) should always be appended to the end of the shown children.

This is a regression from 5930a51 / #1331.

image

Since #1331 consists of only two changes (changed tree item creation order on expand and updated javadoc), I would revert the former one.

The problem with the patch is that it inserts all previously hidden elements at the zero index in the tree, but the tree has already some children, so instead of adding new elements below existing, the patch prepends them.

I will push a PR with a fix now.

@iloveeclipse iloveeclipse added bug Something isn't working regression labels Dec 14, 2023
@iloveeclipse iloveeclipse added this to the 4.31 M1 milestone Dec 14, 2023
@iloveeclipse iloveeclipse self-assigned this Dec 14, 2023
iloveeclipse added a commit to iloveeclipse/eclipse.platform.ui that referenced this issue Dec 14, 2023
If items limit is enabled, clicking on expandable element adds all
elements **before** the node, so the sort order is totally wrong and
"expandable node" appears "in the middle" of the siblings.

However, "hidden and now expanded" elements (if exists) should always be
appended **to the end** of the shown children.

This is a regression from 5930a51 /
eclipse-platform#1331.

The problem with the patch above is that it inserts all previously
hidden elements at the zero index in the tree, but the tree **has
already some children**, so instead of adding new elements below
existing, the patch prepends them.

Since eclipse-platform#1331
consists of only two changes (changed tree item creation order on expand
and updated javadoc), this is revert the former one.

Fixes eclipse-platform#1417
iloveeclipse added a commit that referenced this issue Dec 14, 2023
If items limit is enabled, clicking on expandable element adds all
elements **before** the node, so the sort order is totally wrong and
"expandable node" appears "in the middle" of the siblings.

However, "hidden and now expanded" elements (if exists) should always be
appended **to the end** of the shown children.

This is a regression from 5930a51 /
#1331.

The problem with the patch above is that it inserts all previously
hidden elements at the zero index in the tree, but the tree **has
already some children**, so instead of adding new elements below
existing, the patch prepends them.

Since #1331
consists of only two changes (changed tree item creation order on expand
and updated javadoc), this is revert the former one.

Fixes #1417
amartya4256 pushed a commit to amartya4256/eclipse.platform.ui that referenced this issue Feb 8, 2024
If items limit is enabled, clicking on expandable element adds all
elements **before** the node, so the sort order is totally wrong and
"expandable node" appears "in the middle" of the siblings.

However, "hidden and now expanded" elements (if exists) should always be
appended **to the end** of the shown children.

This is a regression from 5930a51 /
eclipse-platform#1331.

The problem with the patch above is that it inserts all previously
hidden elements at the zero index in the tree, but the tree **has
already some children**, so instead of adding new elements below
existing, the patch prepends them.

Since eclipse-platform#1331
consists of only two changes (changed tree item creation order on expand
and updated javadoc), this is revert the former one.

Fixes eclipse-platform#1417
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression
Projects
None yet
1 participant