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

Features request #47

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Features request #47

wants to merge 8 commits into from

Conversation

zhandao
Copy link
Contributor

@zhandao zhandao commented Mar 12, 2024

Hi @mattbrictson

I'm enjoying using nextgen and have some ideas want to share with you, so I open this. 😄

The changes:

  1. Make select more easier (by tty-prompt's options cycle, enum, filter)
  2. Underline the keywords in the questions for clearer display
  3. Group generators into: basic, job_backend, workflows, checkers, code_snippets, gems, and they only appear after yes -> More detailed configuration

The adding:

  1. Job backend selection solid_queue
  2. "Second level question" -- to customize some generators after selecting
    • tailwind: whether to add puma plugin
    • solid_queue: whether to add puma plugin
  3. Code snippets selection Current.user

Refactoring:
I extracted the helper methods from Commands::Create into Commands::Helpers to reduce the length of file.
But this caused a big git changes, may take some of your time, so sorry.

@zhandao zhandao changed the title Underline the keywords in the questions Features request Mar 12, 2024
@mattbrictson
Copy link
Owner

Thanks for the suggestions! It may take some time for me to review this.

In the meantime, I want to say up front that some of these enhancements, like soild_queue, I probably will not accept at this time. I have not used solid_queue (yet) and I would like to keep nextgen limited to libraries where I have first-hand experience.

That said, I see how there is value to extending nextgen to support more styles of Rails apps beyond my own preferences.

Do you have any ideas for how nextgen could accommodate plugins/extensions, or otherwise be customizable so that interested developers can add their own custom generators?

@zhandao
Copy link
Contributor Author

zhandao commented Mar 13, 2024

To customize enhancement selections, actually it's about customizing config/*.yml(and its generator templates).

I think we can add "style" argument for nextgen create. (or interactively ask "Which style?")

  1. "styles" presets here: nextgen create myapp --style=style1 -- It will apply the YML files (e.g. job.yml) under config/styles/style1.
  2. nextgen create myapp --style=LOCAL_PATH/my_style

@zhandao
Copy link
Contributor Author

zhandao commented Mar 15, 2024

To customize enhancement selections, actually it's about customizing config/*.yml(and its generator templates).

I think we can add "style" argument for nextgen create. (or interactively ask "Which style?")

  1. "styles" presets here: nextgen create myapp --style=style1 -- It will apply the YML files (e.g. job.yml) under config/styles/style1.
  2. nextgen create myapp --style=LOCAL_PATH/my_style

Implemented.

@mattbrictson
Copy link
Owner

@zhandao thanks again for your suggestions.

I'm still deciding which of your proposals to merge into nextgen.

For now, I would like to incorporate your idea to turn on the :cycle option for the select menus, as well as the improved color helpers. I opened PR #61 based on one of your commits. I plan on merging it if you have no objections.

I also like the idea of organizing the generators into groups. The number of generators is really long, and I think organizing them will make for a better experience. I'll look into incorporating your ideas on that.

@zhandao
Copy link
Contributor Author

zhandao commented Apr 12, 2024

@mattbrictson I have no objections 😄

Additionally, I've just found out that solid_queue will be the default job backend for Rails 8 (rails/rails#50442), so the idea should perhaps be reconsidered after Rails 8 release.

@jon-sully
Copy link

jon-sully commented Sep 17, 2024

EDIT: Moved to new issue at #110

@mattbrictson
Copy link
Owner

mattbrictson commented Sep 17, 2024

EDIT: Moved to #110

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