Skip to content

No wait cursor on CSL navigator expand#8274

Merged
lkishalmi merged 1 commit intoapache:masterfrom
lkishalmi:csl-nowait-navigator
Mar 30, 2025
Merged

No wait cursor on CSL navigator expand#8274
lkishalmi merged 1 commit intoapache:masterfrom
lkishalmi:csl-nowait-navigator

Conversation

@lkishalmi
Copy link
Copy Markdown
Contributor

Well, I find it a bit annoying, that almost every time I edit a Yaml, HCL file, there is a flickering on the mouse cursor changing to wait cursor and then back.

It turned out that is because the navigator is expanding it's tree to the current location, so when the structure changes it issues an expand and the TreeView.autoWaitCursor is true by default and put the cursor in wait mode for a brief moment.

That led me to try other parts of the IDE, and expanding nodes could result with a brief mouse cursor change. That made me think to change the TreeView behavior. It would be good to have the default for the wait cursor to be false, though since it is down in the core I think it's being used many places outside of NetBeans.

Probably the best would be delaying the wait cursor change by 500ms or so, and if the tree could expand it in that time we just do not do that. Might try to create a PR for that one, however for the default CSL provided navigator, I do not thing that we need the autoWaitCursor functionality at all.

@lkishalmi lkishalmi added the CSL [ci] enable web job label Feb 23, 2025
elementView.setScrollOnExpand( scrollOnExpand );
}
});
elementView.setAutoWaitCursor(true);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nothing against this but we should try to keep functionality in sync across the codebase.

the java navigator has the same disable/enable trick in the refresh method:

elementView.setAutoWaitCursor(false);
elementView.expandAll();
elementView.setAutoWaitCursor(true);

(there are no other usages looks like)

I think I can see the cursor change for a split second when I toggle collapse/expand in the java navigator.

Disabling the cursor change should be fine UX-wise, since the tree itself has a please-wait placeholder node for situations where it takes longer until the file structure is available.

@lkishalmi lkishalmi force-pushed the csl-nowait-navigator branch from b37b40b to ead04d4 Compare March 29, 2025 23:18
@lkishalmi lkishalmi added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) FormDesigner GUI builder, also known as Matisse labels Mar 29, 2025
@lkishalmi
Copy link
Copy Markdown
Contributor Author

Removed the wait cursor form the Java Navigator, also from the Form Designer (Component Explorer), where everything shall be in memory anyway.

Copy link
Copy Markdown
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

@lkishalmi lkishalmi added this to the NB26 milestone Mar 30, 2025
@lkishalmi lkishalmi merged commit e889e33 into apache:master Mar 30, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CSL [ci] enable web job FormDesigner GUI builder, also known as Matisse Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants