GithubHelp home page GithubHelp logo

ampbin / ampbin Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 2.37 MB

AMPbin - Create, edit, save, share, and validate your AMP HTML

Home Page: https://ampb.in

License: MIT License

HTML 11.32% CSS 6.32% JavaScript 3.33% TypeScript 79.03%
amp-html editor bin amp share validator

ampbin's People

Contributors

dependabot[bot] avatar levidurfee avatar waffle-iron avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

ampbin's Issues

Load bins faster

There is a slight delay between the time the page loads and when the bin loads.

  1. The site loads
  2. It loads the starter bin
  3. It waits until the user authenticates
  4. It grabs the bin ID from the URL
  5. It grabs that bin from the database
  6. It replaces the starter bin with the bin from the database

There might be another way to make this happen. Might need to change the order.

Currently users authenticate anonymously

Notify user when they have unsaved changes

A user may think it automatically saves after they make edits since a lot of editors do these days. So we should add a message somewhere after they make changes, it should come up and tell them they need to save.

Validation

  • Show validation error messages
  • Highlight line numbers with errors

Save

Save includes line numbers.

Support AMPHTML ad

Is your feature request related to a problem? Please describe.
This tool is so helpful to quickly demonstrate an idea or reproduce a bug etc. It will be great if it also support AMPHTML ads? This can be a cool place to craft and share AMPHTML ad creatives.

Describe the solution you'd like
AMPHTML ads is AMP with a different validator setup.
Other good to have feature: adjustable viewport size of the preview.

/cc @jasti

Sidebar

Add a hidden sidebar for a place to put more stuff

Cloud Functions

Updated database rules broke cloud functions on staging site.

Custom bin names

Will continue to use the ID generated by Firebase. Bin name will be saved in the /bins/ location in the database.

  • Add place to input bin name
  • Show bin name in nav

Database Structure

Update user_bins to reflect:

    "user_bins": {
        "user_one": {
            "bins": {
              "one": true,
              "two": true
        },
        "user_two": {
            "bins": {
              "two": true
            }
        }
    }

Toaster - Message

If you click two buttons, the second message gets appended to the first message.

How to run ampbin locally?

Hi there,

First off, thanks so much for the project. I'd love to play with the code and I'm trying to run the app at my end, but some key things are missing.

I see that you're using firebase. Can you put some details on how to integrate my firebase instance to this? (I'd assume changing .firebaserc, but not sure if there are more places that need changing)

Thanks!
Jeff

Add alerts

Add alerts to let user know something has happened. Show 'saved' somewhere when bin is saved.

Bin Views (analytics)

Would like to show how many times a bin has been viewed.

Need a mock-up of where this could go. I'm thinking about using the info icon (shown below). Click it and then more information about the bin would be displayed in a modal.

screen shot 2017-08-02 at 6 14 33 pm

List user bins

db.collection("bins").where("user", "==", "longuserid")
    .get()
    .then(function(querySnapshot) {
        querySnapshot.forEach(function(doc) {
            // doc.data() is never undefined for query doc snapshots
            console.log(doc.id, " => ", doc.data());
        });
    })
    .catch(function(error) {
        console.log("Error getting documents: ", error);
    });

Have Cloud Function write AMP HTML to Cloud Storage

When a new bin is created, have the cloud function write the AMP HTML to cloud storage. It'll also need to write metadata for the content type text/html.

Then people can share their rendered AMP HTML without having the editor load the code.

Ideally, we can use a CNAME record to shorten the storage URLs. If not, then perhaps we can use Fastly.

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.