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

Rapid UI component scaffolding #88

Open
1 task done
willhowat opened this issue Mar 3, 2022 · 2 comments · May be fixed by #89
Open
1 task done

Rapid UI component scaffolding #88

willhowat opened this issue Mar 3, 2022 · 2 comments · May be fixed by #89
Assignees
Labels
enhancement New feature or request

Comments

@willhowat
Copy link
Contributor

willhowat commented Mar 3, 2022

Is your enhancement related to a problem? Please describe.

One of the common repeatable tasks we face during theme development is the setup of UI components and the creation of supporting assets... partials, CSS, JS etc. Often this takes the form of copy/paste a previous similar example, strip it down and re-factor to our needs.

I believe it would be helpful to include a method to rapidly scaffold out these common assets in order to:

  • Shave off the time this takes, whether from scratch or copy/paste/re-factor
  • Avoid incremental deviations from intended patterns and copy/paste errors
  • Provide a source of truth for intended patterns in the context of the longer term project lifecycle

In addition there is currently a drive to embrace the use of style guides as part of the engineering workflow. One common barrier to adoption seems to simply be time necessary to put these examples in-place, often seen as overhead. I believe we can extend an approach to rapid UI scaffolding to incorporate setup of the necessary style guide assets and examples.

On a recent project I've had success with this using PlopJS.
@brentvr and @joesnellpdx have expressed an interest in seeing how this could be integrated in the scaffold.
@rdimascio and @ian-pvd have also I believe been looking at similar approaches and expressed an interest.
To that end I've setup a PR (currently draft) #89 for review and further discussion.

This is not currently intended to include rapid scaffolding of blocks however, I would be keen to see how we could extend this perhaps as a subsequent issue.

Note: #79 could potentially benefit from the availability of this enhancement.

Designs

N/A

Describe alternatives you've considered

I have looked at alternatives to PlopJS however, I've not as yet found one that is as simple and easy to adopt at all experience levels.

One strong contender was Hygen however, Plop does provide a super useful menu to select a generator allowing for a single npm script and contextual menu, whereas Hygen relies on directly running individual generators.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@willhowat willhowat added the enhancement New feature or request label Mar 3, 2022
@willhowat willhowat self-assigned this Mar 3, 2022
@fabiankaegy
Copy link
Member

@dinhtungdu I know you've also recently looked at code generation tools for your work on the cypress test utils library. Curious whether you have anything to share here also :)

@willhowat willhowat linked a pull request Mar 3, 2022 that will close this issue
6 tasks
@willhowat
Copy link
Contributor Author

willhowat commented Mar 3, 2022

Thanks @fabiankaegy ...

@dinhtungdu I'd be really interested to hear your thoughts.

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

Successfully merging a pull request may close this issue.

2 participants