Skip to content

User can't exit JSPluginGen prompt #3

Description

@TonyGravagno

The do/while around this prompt() effectively disables the Cancel button and locks the user into a loop if they just want to get out. It's a bad UX.
Screenshot_20230321-073720

For anyone stuck in this, I recommend replacing:

do
   conf.name = prompt(
       "How would you like your plugin to be called?",
   "");
while (!conf.name || !conf.name.trim());

with

conf.name = prompt(
    "How would you like your plugin to be called?",
"");
if(conf.name === null) return;

In the bigger picture though, this needs more explanation and a bit of refactoring.

  1. Don't put the prompt() on top of the initial alert().
  2. Open with a clear explanation of how this tool is to be used and what it does.
  3. The Readme text is unclear about what needs to be copied and then what the app does. The prompt() gets a name and then substitutes that name into the. js and html files. It is ALSO a tool to generate and test plugins from that code.
  4. I believe this would be more intuitive with a button to open the prompt, get the name, and do the substitutions.
    Screenshot_20230321-084149

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions