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

Add "playground" sub-project for directly testing components #152

Open
fkleuver opened this issue Mar 3, 2018 · 3 comments
Open

Add "playground" sub-project for directly testing components #152

fkleuver opened this issue Mar 3, 2018 · 3 comments

Comments

@fkleuver
Copy link
Member

fkleuver commented Mar 3, 2018

I'm offering to implement this as a follow-up to #151. I already got the concept to work here. Before I submit a large PR, I'd like to know the team's thoughts on this as there is an important choice to be made.

The basic idea:

  • Add a "playground" folder to the project root, containing a project similar to app-ux-showcase.
  • Add a webpack-dev-server script (with HMR) that runs the project in-memory, directly referencing the aurelia-ux source through its imports rather than through the npm package

I found the current steps involved with testing components to be a large bottleneck and time-consumer when I attempted ux-select a year ago, eventually having me run out of time to spend on it before I could finish - and making it hard to pick up again at a later time.

With my proposed changes, the ease and efficiency of working with both the core and components should be greatly improved as things can directly be tested in the browser with full freedom over fidgeting with the core source during development.

I need an opinion:

Like I did with the plugin I linked earlier, this "playground" could be the home for the showcase (rather than being in its own repository). It can have its own build step that automatically generates the outputs to a separate branch for github pages (like I do with the plugin) or some variation of that.

This could further simplify the overall workflow of keeping everything up-to-date and in sync, and indirectly improves the test coverage of in-development branch of ux since the playground uses the source directly (rather than the package)

I was able to completely automate this from testing and building to pushing and publishing, with fairly simple scripts (see package-scripts.js).

Would you be interested in something like this, or is something else perhaps already being worked on?

@EisenbergEffect
Copy link
Contributor

@ZHollingshead Can you look into this?

@serifine
Copy link
Contributor

serifine commented Mar 4, 2018

With the current structure being moved to a monorepo, we could probably merge app-ux-showcase into this to be perfectly honest. However the testing becomes slightly more complicated. Each component should contain their tests separately from each other. The test folder at the root of the project would only apply to the app-ux-showcase or demo app, if either was added.

I do like the idea of having them together in a single repository, it would make developing components with UX much quicker.

@fkleuver
Copy link
Member Author

fkleuver commented Mar 4, 2018

Yep, I figured as much. I was deliberately being reserved with adding/modifying too much as I wasn't sure. So I left out the individual components. Now that you've confirmed that's the direction it should be going, I made an initial draft. Please see the latest commit in this pr #151

@serifine serifine removed their assignment Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants