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

Custom script builder #18

Open
manhtai opened this issue Jul 29, 2021 · 5 comments
Open

Custom script builder #18

manhtai opened this issue Jul 29, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@manhtai
Copy link
Member

manhtai commented Jul 29, 2021

No description provided.

@manhtai manhtai added the enhancement New feature or request label Jul 29, 2021
@dmtri
Copy link
Contributor

dmtri commented Sep 6, 2021

@manhtai Below are the main functionalities I could think of for this feature. Please confirm and add more if anything is missing:

  • an input field
  • a custom script field (CodeMirror input) for the user to apply transformation on the input
  • an output field (to display transformed input)
  • a Save Script button (clicking this will add an item to the left menu, with customized menu name & routing & icon defined by the user). When user closes the app, this new menu item should persist

@manhtai
Copy link
Member Author

manhtai commented Sep 6, 2021

@dmtri I thought about 2 modes here:

  • Edit mode:

    • Title: For left menu display
    • Default value: For input placeholder
    • Forward function field: CodeMirror field, which will receive one param input and return one output
    • Inverse function field: Should we support this now?
    • Save button: To save the script (maybe autosave for the sake of simplicity)
  • Render mode: It looks like our one-to-one form as of now with:

    • Left menu with title & path
    • Input field: Render with a default value
    • Output field: Result of applying the function to input field
    • Should we support inverse function now?

What do you think?

@dmtri
Copy link
Contributor

dmtri commented Sep 7, 2021

@manhtai the Edit Mode idea sounds good. I'm suggesting 2 more buttons so user could manage their customs scripts (see screenshots)
image

@manhtai
Copy link
Member Author

manhtai commented Sep 7, 2021

@dmtri How about this idea: A new custom script menu item, just like a normal item, but when you choose to save the script, it will create a new menu item instead.

The delete button is a must, but we can move it up as a normal button (just like the Copy).

@manhtai
Copy link
Member Author

manhtai commented Sep 7, 2021

The Create button may be ok but I don't know where to put it so as to feel good 🤔

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

No branches or pull requests

2 participants