Skip to content

Conversation

@tripcoded
Copy link

Problem

This PR addresses issue #654, where adding parameters one-by-one via the GUI was inefficient and time-consuming when multiple related parameters needed to be added.

Solution

A new “Add suggested parameters” button has been added to the Add Parameter dialog.

  • The button is disabled by default
  • It becomes enabled only when ≤ 15 filtered parameter suggestions are visible
  • When clicked, all currently suggested parameters are added at once
  • Existing single-parameter add behavior remains unchanged

This follows the approach suggested in the issue discussion and keeps the UI simple while significantly improving usability.

Notes

  • No backend or data-model changes were required
  • Behavior is limited to the parameter add dialog only
  • Fully backward compatible

Related issue

Closes #654

@tripcoded
Copy link
Author

Thanks for the review!

This PR implements the approach discussed in the issue by enabling bulk addition when ≤15 suggested parameters are shown.

Happy to adjust the implementation or UI behavior if you’d prefer a different approach.

@tripcoded tripcoded changed the title Add bulk parameter addition via suggested parameters (#654>) Add bulk parameter addition via suggested parameters (#654) Jan 5, 2026
@tripcoded tripcoded force-pushed the add-bulk-parameter-add branch from 651d51f to 2aa3691 Compare January 5, 2026 20:56
@amilcarlucas amilcarlucas force-pushed the add-bulk-parameter-add branch from 5c2deff to a790549 Compare January 5, 2026 23:17
@amilcarlucas
Copy link
Collaborator

I did some fixes and force pushed to your repo. Please review and test

@amilcarlucas amilcarlucas force-pushed the add-bulk-parameter-add branch 2 times, most recently from 93f3e29 to 0addc6a Compare January 5, 2026 23:57
Copy link
Collaborator

@amilcarlucas amilcarlucas left a comment

Choose a reason for hiding this comment

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

I did some changes, please test this. The button gets hidden under the parameter suggestions. Please fix that.

@tripcoded
Copy link
Author

Hi @amilcarlucas,

Thanks for the fixes.

I’ve reviewed and tested the latest changes locally. The “Add” dialog now behaves correctly and the button is no longer hidden under the parameter suggestions.

Users can:

  • Search/filter parameters in the add dialog
  • Select one or multiple parameters (Ctrl / Shift)
  • Add all selected parameters at once

Everything is working as expected on my end.
Please let me know if you’d like any further adjustments or refinements.

Thanks!

@tripcoded tripcoded requested a review from amilcarlucas January 6, 2026 14:14
@amilcarlucas amilcarlucas force-pushed the add-bulk-parameter-add branch from a96f9c3 to bf794cf Compare January 7, 2026 17:32
Copy link
Collaborator

@amilcarlucas amilcarlucas left a comment

Choose a reason for hiding this comment

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

This now goes in a completely different direction than what I suggested, but I do like it, thanks.
I rebased it on master and squashed the commits again. Whatever LLM that you are using keeps messing code indentation.

Please learn to use "git rebase -i origin/master" to clean up.

When I press enter no parameter gets added, and I get:

  File "ardupilot_methodic_configurator\frontend_tkinter_parameter_editor_table.py", line 975, in _on_parameter_add
    def add_selected(_event: tk.Event | None = None) -> None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

Please fix that

@amilcarlucas amilcarlucas added the enhancement New feature or request label Jan 7, 2026
@tripcoded
Copy link
Author

Thanks a lot for the review and for rebasing/squashing the commits.
I see the issue now — the tk.Event | None annotation breaks on Python < 3.10. I’ll replace it with Optional[tk.Event] and ensure the Enter key is correctly bound so parameters are added as expected.
I’ll push the fix shortly and re-request review. Also noted on using git rebase -i origin/master — I’ll clean up my history properly next time.
Thanks again for the guidance!

This PR addresses issue ArduPilot#654, where adding parameters one-by-one
via the GUI was inefficient and time-consuming when multiple related
parameters needed to be added.

A new “Add suggested parameters” button has been added to the Add Parameter dialog.

- The button is disabled by default
- It becomes enabled only when ≤ 15 filtered parameter suggestions are visible
- When clicked, all currently suggested parameters are added at once
- Existing single-parameter add behavior remains unchanged

Closes ArduPilot#654

feat(parameter editor): searchable multi-select add dialog for parameters

feat(parameter editor) : allow searching and adding multiple parameters at once
@tripcoded tripcoded force-pushed the add-bulk-parameter-add branch from bf794cf to f57552c Compare January 8, 2026 10:26
@tripcoded tripcoded requested a review from amilcarlucas January 8, 2026 10:37
@tripcoded
Copy link
Author

Thanks for the review and for rebasing/squashing the commits.

I’ve fixed the Enter key issue and removed the tk.Event | None annotation entirely to ensure compatibility with Python < 3.10. The Enter key is now handled via a lambda binding, and parameters are added correctly without raising errors.

I also fixed the dialog closing logic to correctly handle both BaseWindow and tk.Toplevel.

I’ve tested locally:

Searching parameters

Selecting one or multiple parameters (Ctrl / Shift)

Adding via Enter key and via button

Please let me know if you’d prefer the handler to explicitly accept an event argument instead. Thanks again for the guidance.

@tripcoded tripcoded force-pushed the add-bulk-parameter-add branch from 023d874 to 978d3a7 Compare January 15, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add multiple parameters at once

3 participants