pixiebrix / pixiebrix-extension

PixieBrix browser extension
https://www.pixiebrix.com
GNU Affero General Public License v3.0
83 stars 22 forks source link

RFC: sandbox/playground for QA/training/sales #1721

Closed twschiller closed 3 years ago

twschiller commented 3 years ago

Goals/Purpose

An environment replicating different situations that occur in websites in the wild

Requirements

Examples of Cases to Cover

Business Apps to Mimic

Open questions / considerations

Prior Art

fregante commented 3 years ago

I think it's easier to handle each page completely independently, especially if multiple frameworks and versions are involved, we don't want to have to mess with a global bundler/system for that.

Possible solution:

  1. One folder per "case" or similar cases
  2. Publish the whole repo to GitHub Pages or similar
  3. If necessary, allow each "case" to handle its own bundling/publishing to a separate URL/host

Advantages:

Examples:


Side note: For very simple situations, I also have this testing ground customizable via URL: https://fregante.github.io/pixiebrix-testing-ground/Parent?iframe=./Child&iframe=./Other

I'm using it on the Messenger for the automated testing: https://github.com/pixiebrix/webext-messenger/commit/1827186a854b3febe3d44bb031f674019860c7cc

fregante commented 3 years ago
  • Is it worth having a backend? We'd need it for Turbolinks? Static admin interfaces, e.g., Django admin? We probably need affordances for multiple backends (Ruby vs. Django)

This could be one of the "cases" in a subfolder. This specific case would handle its own deployment via GitHub Actions

  • Are JS modules at a point where we don't even need to bundle them? We could just reference the CDN directly from the page (e.g., using unpkg.com)

Sort of! unpkg serves raw files as they appear on npm; They only work if they're pre-packaged as UMD. I think Skypack is the "smart" CDN for this use case.

fregante commented 3 years ago

Example set up here: https://github.com/pixiebrix/playground

Default page available at: https://pixiebrix.github.io/playground/example/

More subfolders can be added by anyone who wants to create custom cases for their tests.