Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Support custom args for actions #15141

Open
3 tasks
yaira2 opened this issue Apr 8, 2024 · 9 comments
Open
3 tasks

Feature: Support custom args for actions #15141

yaira2 opened this issue Apr 8, 2024 · 9 comments
Assignees
Labels
area - actions Features or bug reports relating to actions

Comments

@yaira2
Copy link
Member

yaira2 commented Apr 8, 2024

What feature or improvement do you think would benefit Files?

With the introduction of custom key-bindings in version 3.4, it's a good time to start considering how we want to implement support for custom arguments in actions.

Requirements

  • Adjust actions to support custom args
  • Support adding args via the actions page
  • Support variables (eg {CurrentDirectory})

Use cases for this feature

Files Version

v3.3

Windows Version

Windows 11

Comments

No response

@yaira2 yaira2 moved this to 📋 Planning stage in Files task board Apr 8, 2024
@yaira2
Copy link
Member Author

yaira2 commented Apr 8, 2024

A good use case for this is applying custom tags (see #11352)

@yaira2
Copy link
Member Author

yaira2 commented Apr 8, 2024

One thing to consider is how to handle validation. Should there just be a TextBox for inputting args or should it be more specific (eg. a dropdown with a list of tags)?

@0x5bfa
Copy link
Member

0x5bfa commented Apr 8, 2024

The latter should be more secure but needs to store a collection(it won' be a big deal I assume).

@yaira2
Copy link
Member Author

yaira2 commented Apr 8, 2024

Secure as in making sure it's a valid arg?

@0x5bfa
Copy link
Member

0x5bfa commented Apr 8, 2024

Yes. If it's just a TextBox we don't have a way to notify user of syntax errors and user would be confused why it doesn't work.

@yaira2
Copy link
Member Author

yaira2 commented Apr 8, 2024

This feature would be targeting advanced users but it's still something to consider.

@yaira2
Copy link
Member Author

yaira2 commented Apr 9, 2024

We've discussed this internally and we're leaning towards including validation, we will probably need the following types, but they can be added as needed.

  • path
  • file extension
  • tag name
  • username (for RunAsUser)
  • archive format (for compressing files)

@0x5bfa
Copy link
Member

0x5bfa commented Apr 9, 2024

Great idea. I thought it was nice to have selector box but we cannot list up every file extension. It might be better to use AutoSuggestBox, validate input and show errors if any, like a Branch selector in GitHub(it enables me to select or create it if doesn't exist).

In current implementation of Actions makes us hard to implement error handling like above but we can use hot key editor dialog, put the parameter text box into that, show error text in red like a password box of web auth (like Google Login), after settings tabs done.

For file extensions, doesn't need to validate but for tags or even username we might have to check if it exists and show errors or warnings(maybe don't have to prevent?).

@yaira2
Copy link
Member Author

yaira2 commented Apr 9, 2024

I thought it was nice to have selector box but we cannot list up every file extension

I think for file extensions it would only need to make sure there are no spaces or unsupported characters in the text field.

for tags or even username we might have to check if it exists and show errors or warnings(maybe don't have to prevent?).

I was thinking along the same lines...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area - actions Features or bug reports relating to actions
Projects
Status: 📋 Planning stage
Development

No branches or pull requests

3 participants