twitter-together / action

:bird: A GitHub action to tweet from a repository

Home Page:https://github.com/marketplace/actions/twitter-together

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom UI for creating tweets

gr2m opened this issue · comments

This is a follow up to #92 /cc @matchai

What’s missing?

The goal of twitter-together is to encourage and enable editorial contributions to projects build around GitHub repositories. The first step was to use github.com's UI to make that possible, by creating *.tweet files in a dedicated repository.

What's missing is a custom UI tailored to the workflow of submitting a tweet to a project's shared twitter account.

Why?

The challenge of depending on GitHub's UI is that editorial contributors might not be familiar with GitHub and it's pull request workflows. The high learning curve only to submit a tweet might prevent people from contributing which goes against the point why I created twitter-together in the first place.

Alternatives you tried

Educate interested contributors in how to use github.com and provide a lot of documentation.

A Custom UI could eventually be used by both: contributors and reviewers.

For the first version, I would focus on contributors only, it's the more important part anyway.

I'd suggest we focus on the bare functionality, and maybe later think a landing page with some more information.

I think I'll take the opportunity and move twitter-together into its own organization, so that we can add a separate repository for the static UI app.

I'll also register an OAuth App and deploy a server that we can use for the OAuth login flow.

v1 user stories

  • As a user, I want to be able to sign in using my GitHub Account
  • As a user, I want a to enter the text for my tweet into a form
  • As a user, I want to be able to submit my tweet through the form
  • As a user, I want to see if my submitted tweet is valid

v2 user stories

  • As a user, I want to attach a poll to my tweet
  • As a user, I want to upload 1-4 images to my tweet
  • As a user, I want to upload a gif
  • As a user, I want to submit a thread of multiple tweets

Bonus user stories

  • As a user, I want to search for a gif directly from the form
  • As a user, I want my tweet(s) to be live validated as I work on them
  • As a user, I want to see my pending tweets

@gr2m I'm interested in doing this one

All yours! That'd be huge! Let me know if you have any questions.

I'll also register an OAuth App and deploy a server that we can use for the OAuth login flow.

I can setup the OAuth app

All yours! That'd be huge! Let me know if you have any questions.

@gr2m thanks 👍 This will be a great challenge 😄

I can setup the OAuth app

@gr2m yes please let me know the details.

I created a GitHub app, which also has the OAuth features, but it needs to be installed in order to get repository access. It will suite our needs better.

The app is https://github.com/apps/twitter-together

The server is hosted on Glitch: https://glitch.com/edit/#!/twitter-together

In order to login, you have to add a link to https://twitter-together.glitch.me/api/github/oauth/login. Right now it redirects to https://twitter-together.glitch.me/api/github/oauth/callback after you granted access, but we can configure any URL.

I'd suggest you create a separate repository for now and use GitHub pages or your deployment target of preference for static websites. Then let me know the URL and I'll update configure the server to redirect to your web app instead.

The redirect will include a ?code=... parameter that you will have to exchange for an OAuth User Access token, which will then allow you to create files in a repository etc, depending on the access your user account has and the permission of the GitHub App.

We did start to work on code to help with common OAuth tasks in the browser, but the work is not finished: https://github.com/octokit/auth-oauth-user-client.js. I think it should have most of the code ready though.

Our App Server on Glitch exposes the following routes, they are CORS enabled:
https://github.com/octokit/oauth-app.js/#middlewares

Let me know if you have any questions

I'd suggest you create a separate repository for now and use GitHub pages or your deployment target of preference for static websites. Then let me know the URL and I'll update configure the server to redirect to your web app instead.

@gr2m you mean by this one like using sandbox or development environment? like https://github.com/tenshiAMD/twitter-together-ui (private repo for now) or using an org repo instead?

yes like this. No reason not to make it public right away, you can state clearly in the README that this repository is work in progress. It will simplify collaboration if your repository is public.

Eventually we can create a twitter-together/app repository and combine your work with the app code at https://glitch.com/edit/#!/twitter-together and deploy it together continuously to Vercel or something similar

yes like this. No reason not to make it public right away, you can state clearly in the README that this repository is work in progress. It will simplify collaboration if your repository is public.

Eventually we can create a twitter-together/app repository and combine your work with the app code at glitch.com/edit/#!/twitter-together and deploy it together continuously to Vercel or something similar

@gr2m Ok got it. Thanks.

use GitHub pages or your deployment target of preference for static websites. Then let me know the URL and I'll update configure the server to redirect to your web app instead.

@gr2m I just started and setup using Vercel, here's the link. This is still WIP.

Starting these below:

v1 user stories

  • As a user, I want to be able to sign in using my GitHub Account
  • As a user, I want a to enter the text for my tweet into a form
  • As a user, I want to be able to submit my tweet through the form
  • As a user, I want to see if my submitted tweet is valid

Great! Let me know the URL you want the OAuth redirect to go to, which will include the ?code=... query parameter