Skip to content

Conversation

zas
Copy link
Collaborator

@zas zas commented Apr 15, 2025

Summary

  • This is a…
    • Bug fix
    • Feature addition
    • Refactoring
    • Minor / simple change (like a typo)
    • Other
  • Describe this change in 1-2 sentences:

Problem

  • JIRA ticket (optional): PICARD-XXX

Solution

Action

Additional actions required:

  • Update Picard documentation (please include a reference to this PR)
  • Other (please specify below)

@zas
Copy link
Collaborator Author

zas commented Apr 15, 2025

Note: 4eb1e2f changes the completer behavior, was there a good reason to use Unfiltered mode?

@phw @rdswift Please test and tell me what you think

@zas zas requested review from phw and rdswift April 15, 2025 11:01
rdswift
rdswift previously approved these changes Apr 15, 2025
Copy link
Collaborator

@rdswift rdswift left a comment

Choose a reason for hiding this comment

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

Looks good to me. Everything seems to work as expected in my testing. Is this something that we would also consider porting to the 2.x branch?

@rdswift
Copy link
Collaborator

rdswift commented Apr 15, 2025

Maybe a dumb question, but is there a reason that we don't support tooltips in the script editor for EXTRA_VARIABLES and PRESERVED_TAGS like we do for TAG_NAMES? Would we be open to a change to support these lists as well?

@zas
Copy link
Collaborator Author

zas commented Apr 15, 2025

Maybe a dumb question, but is there a reason that we don't support tooltips in the script editor for EXTRA_VARIABLES and PRESERVED_TAGS like we do for TAG_NAMES? Would we be open to a change to support these lists as well?

I see no good reason, it may help users, feel free to open a PR

@zas
Copy link
Collaborator Author

zas commented Apr 15, 2025

Looks good to me. Everything seems to work as expected in my testing. Is this something that we would also consider porting to the 2.x branch?

Did you compare the behavior between Unfiltered mode (current master) and normal mode (this PR) for the the popup? I wonder if there are cases where previous behavior is better, and why unfiltered mode was chosen to start with.

@rdswift
Copy link
Collaborator

rdswift commented Apr 15, 2025

Did you compare the behavior between Unfiltered mode (current master) and normal mode (this PR) for the the popup?

I'll check again, but when I originally tested I didn't see any difference.

@rdswift
Copy link
Collaborator

rdswift commented Apr 15, 2025

Did you compare the behavior between Unfiltered mode (current master) and normal mode (this PR) for the the popup?

I'll check again, but when I originally tested I didn't see any difference.

Oops. I just checked again and I see that the selection list in the original version showed everything all the time but only moved the selected item highlight as you typed, and your version actually reduces the selection list. I'm not sure why it was set up initially as unfiltered, but I prefer the way that you have it set up as filtered.

@phw
Copy link
Member

phw commented Apr 15, 2025

Note: 4eb1e2f changes the completer behavior, was there a good reason to use Unfiltered mode?

The behavior is different. In unfiltered mode it jumps to the suggestion, but shows all the possible completions. As the list is sorted alphabetically and matching looks at the start I found this more convenient to be able to look through all possible functions. But that's probably just my personal preference.

Maybe a dumb question, but is there a reason that we don't support tooltips in the script editor for EXTRA_VARIABLES and PRESERVED_TAGS like we do for TAG_NAMES? Would we be open to a change to support these lists as well?

The tooltips work on all variables. Actually the code to show the tooltip just searches for the percentage sign and valid characters afterwards. So it even works for any user defined variable. Only that for variables we don't have much to show, so it only shows the name. This is different for functions, where we show the function documentation.

@rdswift
Copy link
Collaborator

rdswift commented Apr 15, 2025

I found this more convenient to be able to look through all possible functions. But that's probably just my personal preference.

I can live with it either way.

phw
phw previously approved these changes Apr 17, 2025
@phw
Copy link
Member

phw commented Apr 17, 2025

@zas I think we need a ticket and put the change of auto complete behavior into the changelog.

@zas
Copy link
Collaborator Author

zas commented Apr 17, 2025

@zas I think we need a ticket and put the change of auto complete behavior into the changelog.

I'll do, and introduce the change in another PR, I removed this change from this one as it was intended to get feedback on it anyway.

@zas zas requested a review from phw April 17, 2025 09:36
phw
phw previously approved these changes Apr 22, 2025
@zas zas force-pushed the script_completer branch 2 times, most recently from d576d16 to 6eca60a Compare April 23, 2025 09:11
@zas zas requested a review from phw April 23, 2025 09:16
Copy link
Member

@phw phw left a comment

Choose a reason for hiding this comment

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

LGTM

@zas zas merged commit cfc44ef into metabrainz:master Apr 23, 2025
51 checks passed
@zas zas deleted the script_completer branch April 23, 2025 12:02
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.

3 participants