Skip to content

feat(combobox): keyboard support for editable and configurable signal and selected index change behavior - #80

Merged
abart27 merged 14 commits into
mainfrom
fix/editable-combobox
Jun 28, 2026
Merged

feat(combobox): keyboard support for editable and configurable signal and selected index change behavior#80
abart27 merged 14 commits into
mainfrom
fix/editable-combobox

Conversation

@FramePerfection

Copy link
Copy Markdown
Collaborator

This changes the signal_change behavior of comboboxes as follows:

  • While the listbox is open, the value is ongoing if the selected original index is different from control.selected_index, or none otherwise.
  • When the listbox was just closed and the selected original index is different from control.selected_index, the value is ended
  • The value is virtually never started. Should maybe be changed.

This enables users of the ugui.combobox API to react to the ended signal_change, fixing usability issues that would arise from prematurely updating the value fed into control.selected_index.

Additionally, the up and down arrow keys may be used to move the selected index, and enter may be used to confirm the selection (i.e. close the listbox).

@FramePerfection
FramePerfection requested a review from abart27 May 4, 2026 17:38
@FramePerfection FramePerfection added bug Something isn't working help wanted Extra attention is needed labels May 4, 2026
@FramePerfection

Copy link
Copy Markdown
Collaborator Author

@Aurumaker72 I can say that the behavior is now pretty much exactly what I'd want it to be, but the implementation is quite hacky.
Can you perhaps pick this up and clean it up properly? My head's a bit screwy right now 🥴

@abart27

abart27 commented May 4, 2026

Copy link
Copy Markdown
Member

Yo, thanks a lot for this! Makes so much more sense semantically.

I can pick it up sure 👍

@abart27

abart27 commented May 5, 2026

Copy link
Copy Markdown
Member

The scope for this is too broad: the key navigation stuff is nice but should definitely be a separate PR.

@abart27

abart27 commented May 5, 2026

Copy link
Copy Markdown
Member

Can you make a separate PR with just that? I can move the changes over to it if you want, but you should make the PR so you get the squash commit authorship

@FramePerfection FramePerfection self-assigned this Jun 25, 2026
@FramePerfection
FramePerfection marked this pull request as ready for review June 25, 2026 18:00
@abart27
abart27 force-pushed the fix/editable-combobox branch from 365224b to ed70fe5 Compare June 25, 2026 18:53
@abart27 abart27 changed the title fix: signal change and keyboard input of comboboxes feat(combobox): keyboard support for editable and configurable signal and selected index change behavior Jun 28, 2026

@abart27 abart27 left a comment

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.

Awesome :D

@abart27
abart27 merged commit 8daab81 into main Jun 28, 2026
1 check passed
@abart27
abart27 deleted the fix/editable-combobox branch June 28, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants