Giter Site home page Giter Site logo

pixiebrix / playground Goto Github PK

View Code? Open in Web Editor NEW
0.0 5.0 0.0 19.2 MB

Playground for testing web extensions and web customization

Home Page: https://pbx.vercel.app

License: GNU Affero General Public License v3.0

HTML 80.98% CSS 3.16% JavaScript 14.17% Shell 1.69%
extensions browsers

playground's Introduction

playground

Playground for testing extensions and web customization.

https://pbx.vercel.app/

Contribute

Each folder is its own standalone project so we never have dependency conflicts.

Some projects might be used for testing, it's often better to create a new project.

Adding a static project

  1. Create a folder in static/
  2. Add at least an index.html file (like static/my-demo/index.html)
  3. Access it at https://pbx.vercel.app/my-demo/

Adding a project with a build

  1. Create a folder in source/ with the source files, like source/my-demo/

    • Treat this folder as a self-contained project with its own package.json file
  2. Add the install and build steps in its own build.sh file (like source/my-demo/build.sh)

    • it should include the exact header as other build.sh scripts
    • it should output files in public/
  3. Run build.sh on your computer, like bash source/my-demo/build.sh

  4. Commit both source and public folders

  5. If your project is a single-page APP (i.e. all paths point to index.html), you'll have to edit vercel.json too

  6. Access it at https://pbx.vercel.app/my-demo/

    • If you send a PR, you can access a temporary deployment at a custom URL like pbx-temp-pr.vercel.app/my-demo/

playground's People

Contributors

fregante avatar twschiller avatar emmanuelobua avatar

Watchers

 avatar Eduardo Fungairino avatar jcforest avatar Graham Langford avatar  avatar

playground's Issues

Add vue admin example

Context

  • https://github.com/PanJiaChen/vue-element-admin is a project that's an admin panel showcase that doesn't require a backend
  • It looks like out of the box we don't need a backend for it since all of its network requests are mocked
  • Instead of copying the code to our repository, let's clone a release from their repository?

Implementation Sketch

Considerations

  • When cloning the repository during the build, do a shallow clone so the clone is fast

Add infinite scroll example

Context

  • Infinite scroll requires an extension point to continuous look for new elements to attach elements (e.g., menu items to)

Implementation Sketch

Rethink deployment strategy

We're only 6 projects in and the build is already taking 20 minutes 😰 https://vercel.com/pixiebrix/playground/G3rW9PbY9Y3ihbBrcGBgxAt2VjYJ

We should probably fix this before Vercel just stops building (and because 20 minutes is already a long time to find out whether something worked).

I don't know how to fix this yet, but I think it should only build a project if it was changed.

Possible solutions:

  • https://turborepo.org/docs/getting-started (Vercel just bought this)
  • Build on GitHub Actions (easier to skip parts of a build, needs some work to get PR preview builds)
  • Ensure that Vercel’s build cache is working

Thoughts? We could also just use a regular host/S3/EC2, but preview builds and lack of server maintenance are a big plus for Vercel.

I sent a message to Vercel hoping for suggestions.

Platform limits:

Add turbolinks example

Context

  • In Turbolinks (e.g., Github), navigation event occurs before page content changes
  • This can be modeled with multiple static pages. We don't need to have a backend
  • We might need/want to add a delay to the page load in order to make reproducing the effect more consistent

Implementation Sketch

Other Notes

  • For local development you might need to serve the side via a HTTP server (for example with Python: python3 -m http.server 8001) for Turbolinks loading to work correctly. (JS/Node also probably has support for serving files in a directory)

Add index.html for project root

Now that we've switched over to a Github actions based CI/CD the README.md file isn't picked up as the index for the https://pixiebrix.github.io/playground/ directory

Options:

  • Write an index html file
  • In the Github action, pass the README.md file through a markdown converter to generate an index.html (preferred for now)

Disable dependabot upgrade PRs

This repository will have out of date dependencies in some places so that we can test PixieBrix against them (e.g,. against old versions of React)

Add site with Hotkeys via document listener

Context

  • Sites with hotkeys often attach a document listener that capture key events on the bubble
  • They perform event filtering to determine whether or not to trigger the hotkey (e.g., they won't trigger a hotkey if the user is editing something).
  • Currently we can't do anything about this b/c we run our content script on idle. The approach we've taken instead is to embed out content in iframes so the host page doesn't get an event

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.