Skip to content

New component TextFieldEditorWithPopup - #6023

Open
bubblobill wants to merge 5 commits into
RPTools:developfrom
bubblobill:textFieldEditorWithPopup
Open

bubblobill wants to merge 5 commits into
RPTools:developfrom
bubblobill:textFieldEditorWithPopup

Conversation

@bubblobill

@bubblobill bubblobill commented Aug 3, 2026 •

Copy link
Copy Markdown
Collaborator

Identify the Bug or Feature request

resolves #6022

Description of the Change

Needed some better icons, so;

  • Added Icons.ACTION_EDIT_IN_EDITOR
  • Plus generic directional triangle icons.

and

  • Some blank SVG icons containing FlatIconColors.
  • Added missing Icons.WARNING

Usual i18n keys added/changed

Removed TextFieldEditorWithPopupTableCellEditor

Added TextFieldEditorWithPopup

TextFieldEditorWithPopup is a container for:

  1. a label
  2. a toggle button that shows/hides the text field
  3. a text field
  4. a button to open external text editor (MacroEditorDialog)

Label and Toggle button are both optional and not normally shown, e.g.
image

Enabling them allows use in other situations such as a toolbar;
image

image

Has method to get text field with button as a CellEditor.
Has method to open the component in an input dialogue.

Should work as an Accessibile Component

Possible Drawbacks

none

Documentation Notes

n/a

Release Notes

n/a


This change is Reviewable

FlatIconColors.
Added missing Icons.WARNING
Added Icons.ACTION_EDIT_IN_EDITOR
Plus generic directional triangle icons.
New class TextFieldEditorWithPopup.java
Implemented in TokenPropertiesManagementPanel
Usual i18n keys added/changed
@github-actions github-actions Bot added the code-maintenance Adding/editing javadocs, unit tests, formatting. label Aug 3, 2026

@kwvanderlinde kwvanderlinde left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I like the new component! I just have a couple requests after doing some tests.

Previously, in Campaign Properties > Token Properties, the cells in the Default columns would automatically switch to a text field on the first click. Now, it either requires a double-click, or to start typing while the cell has focus. Can we restore the single-click behaviour?

I also noticed that after opening and closing the text editor, the popout button gains a yellow background. It also happens if I click and drag the button, and possibly in other circumstances. It doesn't seem to mean anything, though, so would be nice to remove that.
Image

@github-project-automation github-project-automation Bot moved this from Awaiting-Review to In-Progress in MapTool 1.19 Sep 22, 2026
@bubblobill

bubblobill commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator Author

I like the new component! I just have a couple requests after doing some tests.

Previously, in Campaign Properties > Token Properties, the cells in the Default columns would automatically switch to a text field on the first click. Now, it either requires a double-click, or to start typing while the cell has focus. Can we restore the single-click behaviour?

Should be doable.

The colour thing is something in my focus handling. Will fix.

Removed some spurious code.
@bubblobill

Copy link
Copy Markdown
Collaborator Author

@kwvanderlinde Sorted. Fixed the colour hanging around when not wanted and single click to edit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-maintenance Adding/editing javadocs, unit tests, formatting.

Projects

Status: In-Progress

Development

Successfully merging this pull request may close these issues.

[Maintenance]: TextFieldEditorButtonTableCellEditor to TextFieldEditorWithPopup

2 participants