Git Product home page Git Product logo

constable's Issues

Set remember me cookie so people don't need to sign in every single time

Similar to how it's done in Rails: http://railscasts.com/episodes/274-remember-me-reset-password

You would likely use Plug's put_resp_cookie with a max_age set 1 year into the future:

@one_year_from_now 365 * 24 * 60 * 60 * 1000`

# When you create a new session
signed_user_id = Phoenix.Token.sign(conn, "user_id", user.id) # Signs the user_id

conn
|> Plug.Conn.put_resp_cookie("user_id", signed_user_id, max_age: @one_year_from_now)

# When fetching the user
case Phoenix.Token.verify(conn, "user_id", conn.cookies["user_id"]) do
  {:ok, user_id} -> # fetch the user
  {:error, _} -> conn # returns he conn unchanged
end

Ping me in #constable on Slack if you need any help with this. The docs for Phoenix.Token and Plug.Conn have more info. Also this article on cookies with Plug will be useful: https://www.amberbit.com/elixir-cocktails/phoenix/reading-and-writing-cookies-in-phoenix-with-plug/

Emails scroll horizontally in Inbox on iPhone 5-sized phone

The new email template is looking great so far, and works much better on the phone!

It's still a bit too wide to fit on my screen, though, and requires some scrolling around. I'd love if everything fit on the screen! I also realize I might be the only person with a screen this size, and recognize it may not be able to accommodate all of us.


img_1344

Need to login to unsubscribe

This one hits home for me. I really dislike when I have to log into a service to unsubscribe from something. Could it use my email and a get param of the thread id to unsubscribe me?

Send welcome email when a new user signs up?

I think this will help with https://github.com/thoughtbot/handbook/pull/248

Let's answer the question of what Constable is by sending a welcome email along these lines

Welcome to Constable!

We use Constable at thoughtbot to post announcements and have discussions. Constable is a tool we've built internally using Phoenix and React. It gives us a place to try out new things in Elixir, Phoenix and React, so feel free to contribute or just take a look around the code.

You can @mention people in an announcement or comment to send to specific people
Subscribe to specific things you are interested in on the interests page

That's just a rough idea, but I think this could help with the user's initial experience

Extract common parts of email templates

There is a lot of code shared between the email templates. This makes working on them a bit of a pain. They should be extracted. Maybe a nice mailer preview controller could be added as well

Make sure API clients work

We will need to update welcome wagon and srs business to point to the new URL and/or make sure API.constable.io points to the right place so that integrations still work

Add new announcement page

This should be just like the existing React front-end, and should still use React for writing and previewing the content.

Rethink the interests picker and welcome page

Right now there are some problems with the interest picker

  • It is not obvious that the picker there. The small triangle is not very prominent. People have asked how they add interests.
  • The list only allows subscribe/unsubscribe, but it does not let you view announcements with that interest. Figuring out how to view all announcements for a given interest is difficult.
  • It's hard to tell what interests to follow. Do people actually post to this interest? How many are subscribed? Maybe we should add a "last discussed" label?

We also talked about adding a welcome page that I imagine would look similar to the redesigned interest page, but has an explanation at the top

Welcome to Constable, follow some topics...etc.

So we need a way to solve those 3 problems above. There are a bunch of ways we could go with this, but here's one I kind of like

Dashboard page

Instead of jumping straight to all announcements or my announcements, we could go to a dashboard type page that shows maybe the newest 2-3 announcements, and then a list of "All announcements, my interests, and then all the other interests. Each interest would also have a check mark to subscribe

Pros

  • Super obvious how to add an interest
  • Can quickly view announcements from other interests
  • Might allow future customization, like showing most talked about announcements, etc.

Cons

  • If all you want to do is see your interests it would require an extra click. I'm not sure this is a big deal since if you are interested, you get the emails by default anyway. I usually go to Constable to see other things, or to check out new comments
  • We could also mitigate this by adding an option to always take you to a certain page instead

I kind of like this idea personally. Thoughts?

cc @kaishin

Add seeds file

And be sure to run it in bin/setup as well

This should add the everyone interest since it is required. Maybe it should add a couple announcements and comments as well

Redirect to the phoenix front end when unsubscribing using the email link

Right now when you hit "unsubscribe" from the email link it takes you to the constable API, unsubscribes the user, and presents a button. The button redirects them to the React front end. This button should be changed to redirect to the phoenix front end instead. This should be done before launch, but not right away so that it continues to work with the React front end until we remove it

Make sure email links in emails point to the phoenix app

We can remove the FRONT_END_URI and BACK_END_URI env vars and just use _url helpers for generating urls. For example announcement_url(Constable.Endpoint, show, @announcement.id) would generate a fully url for viewing an announcement

New announcement page/comment form fails when you navigate away and then back again

The new announcement page works if you go directly to it: https://staging.constable.io/announcements/new, but if you go to it, visit a different page, and then go back it is not properly set up. this also happens with the comment form

I believe the reason is that when you require a module it only requires it once. So it loads it on the first page load, but then when the page is re-rendered it doesn't re-require it (which is what we want). So I think we need to export a function that we call to set up the event handlers, similar to what @BlakeWilliams did at first. Anything that should only happen once should not go in the exported function (stuff like connecting to a websocket for example), but things like setting up event handlers on the page should go in the exported function.

require("/new-announcement-form.js").setupEventHandlers();

Can't deploy to staging without SSL setup

We can't deploy to staging until we have SSL since we have to provide port as 443 to the url option in our production config. This is because of how Phoenix handles url generation.

Setup Clarity

I’m setting the project up for the first time and when I ran bin/setup, I got this error:

bin/setup: line 10: mix: command not found

I assume this is because I don’t have Phoenix installed? If that’s the case, maybe we should make the README more clear?

Fall back to username when name is blank

Sometimes user's don't have their name set up in Gmail so it was blank in the database. This makes it so that the changeset uses the username if the name if not there.

Document the API

Inspired by https://github.com/thoughtbot/handbook/issues/402, I'd like to update https://github.com/thoughtbot/srs-bsns so that it posts on Constable instead of Basecamp, but I'm having trouble figuring out the API.

The README says the best place to look is the app/stores directory in the https://github.com/thoughtbot/constable/ repo, but that directory doesn't exist.

I don't have enough experience with either Elixr or React to quickly piece together what's going on without a bit more documentation.

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.