Skip to content

Improved UX for editing labels in GUI#966

Merged
tturocy merged 20 commits into
masterfrom
issue_945
Jul 10, 2026
Merged

Improved UX for editing labels in GUI#966
tturocy merged 20 commits into
masterfrom
issue_945

Conversation

@tturocy

@tturocy tturocy commented Jul 1, 2026

Copy link
Copy Markdown
Member

This adds some improved UX in the GUI for inputting labels:

  • Leading whitespace and multiple whitespace are normalised on the fly while editing
  • Trailing whitespace is normalised transparently on commit
  • For now, non-ASCII input is filtered on the fly; this has been written to make it easy to switch to Unicode for 17.0 as planned but aligns with the current rules.

Closes #945.

@tturocy tturocy linked an issue Jul 1, 2026 that may be closed by this pull request
@tturocy
tturocy requested review from d-kad and rahulsavani July 1, 2026 09:42
@tturocy

tturocy commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

@rahulsavani @d-kad If you can try out the various places we set/edit labels that would be helpful.

@tturocy tturocy added this to the gambit-16.7.0 milestone Jul 1, 2026
@d-kad

d-kad commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Tested on macOS

Action labels work fine (you can see that action label turned "Éxït" into "xt" and removed trailing spaces from the second label automatically)

Node labels through on invalid input
Screenshot 2026-07-01 at 15 48 49
Screenshot 2026-07-01 at 15 48 54

@tturocy

tturocy commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

I wasn't able to reproduce this with the node labels; I did change that editor and on mine I'm not able to input invalid labels. Did you build yourself from the branch? If so are you sure you've got the latest version of it?

@d-kad

d-kad commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

You're right — I was three commits behind on issue_945, everything works as expected now.

Screenshot 2026-07-01 at 20 29 42

Sorry for raising a false alarm!

@d-kad

d-kad commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Label editing test pass

Move dialog (infoset + action labels)

  • Typed Go Left in an action label → becames Go Left
  • Typed and pasted é / emoji → filtered silently
  • Two actions in same infoset given same label → error, dialog stays open
  • Action 2 = Left (trailing space) when action 1 = Left → still rejected
  • Empty action label → blocked
  • Same infoset label on both of P1's infosets → error; same label on P2's infoset → allowed
  • Empty infoset label → allowed
  • In the chance infoset probabilities are editable

Node dialog

  • Duplicate an existing node label → error
  • Typed Node1 then hit Enter (not the OK button)
  • é filters

Player names (EFG and NFG)

  • Rename P2 to P1's name → error
  • Empty name → blocked; Esc mid-edit → reverts
  • P 1 → normalizes

Strategy names (NFG)

  • Duplicate strategy label within one player → error
  • Same strategy label as the other player's strategy → allowed
  • Empty strategy label → blocked

@tturocy
tturocy merged commit a79e549 into master Jul 10, 2026
26 checks passed
@tturocy
tturocy deleted the issue_945 branch July 10, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH]: Improve UX in graphical interface for valid labels

2 participants