mitodl / open-discussions Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
In the current screen designs, this is implemented as a left-hand sidebar that collapses to a menu in mobile.
Mobile:
The most minimal form to create a channel.
We should call everything channels in the source code for consistency, including the Django app
We currently have some of this information in this README, some information in reddit-config
and some in reddit
itself (for example setting up reddit.local
in /etc/hosts
). We should put all of this in a Getting Started
section at the top of this README
This should be the wrapper around the subreddit APIs that exposes the limited scope of features we want exposed.
These are the minimum features:
prettier is an automated code-formatting tool for JS that looks pretty nice, basically it parses the JavaScript to an AST and then re-writes it all, allowing it to do more complicated types of automated transformations that ESLint, for instance, can't do in an automatic way. It seems like there's support to run it alongside ESLint, since prettier doesn't catch certain kinds of semantic errors in the code (which ESLint does).
anyway, I think it looks interesting and would like to try it out! @noisecapella @rhysyngsun thoughts?
Currently we have our line-width set to 120 characters. Prettier (the JavaScript code formatter) uses this line width to figure out how much to fit on one line. I kinda think that 120 characters is too wide, it results in things like this:
<aside className="mdc-temporary-drawer mdc-typography" ref={div => (this.drawerRoot = div)}>
// or
const shouldLoadData = R.complement(R.allPass([R.eqProps("postID"), R.eqProps("channelName")]))
I'd like to propose we change the setting to the standard 80 characters instead, which would result in the more-manageable:
<aside
className="mdc-temporary-drawer mdc-typography"
ref={div => (this.drawerRoot = div)}
>
// or
const shouldLoadData = R.complement(
R.allPass([R.eqProps("postID"), R.eqProps("channelName")])
)
and also make it easier to look at two files side-by-side without having to scroll horizontally. thoughts? @rhysyngsun @noisecapella
Local environments use the snakeoil SSL cert which don't validate, so we need an option to turn this off locally.
Seen in our meeting Wednesday afternoon
There's a possibility the profile doesn't exist, we should get_or_create
it to be safe.
Simple listing of posts in the front page
PostDisplay
component should have slightly different layout on PostPage
vs on a channel or the frontpageCreate apis for submissions:
Be sure to look at prior art, like the reddit react components.
The authentication code in channels/api.py
is mostly uncovered because we mock this out for most tests. We should add a unit test or two for it, specifically _get_user_credentials
and _get_requester_kwargs
The MicroMasters app will need a privileged API to create channel in open_discussions.
We will use a shared secret for authentication and authorization of the MicroMasters app.
This might be solved in mitodl/refresh_token, but I'm logging it here first.
Based on the designs in Invision:
Requires #45. We need a way for MicroMasters or other apps to register users on reddit and to populate information needed in the UI for these users.
As a new user, when I create an account, I want to be able to see the basic discussion content. I will need to be automatically subscribed to the basic set of channels.
This is a configuration option in reddit. For now, we'll just configure this as a deployment task.
We should change the code to generate unique reddit usernames and to map this username to the User
model and a Profile
model to store extra data which we need for the UI
We should do something similar to what we did in MM, so that a default profile image is used if the user profile hasn't had profile image data synced. This will be useful for development especially.
In order to make it easier to develop against Reddit the developers want to have a local instance running on their laptops and the provided Vagrantfile has some bugs. To that end we would like to have a docker based setup for running the full Reddit stack.
create API for comments
George and I had a brief conversation today about this. I think we should store all the data we need to worry about (Channels
, Posts
, etc) in a normalized form, something like:
type store = {
posts: Map<postID, Post>,
channels: Map<channelID, channel>
};
where Post
and Channel
are types holding all the information unique to each. We don't have to use a Map
(although I like them), we could just as easily use an Object
, but the idea is that all Posts
would live in one spot, and handling the result of a GET
request about a post or a GET
request for the posts on a channel would be handled the same way - just insert the new posts into the record, and update the store.
To associate Post
records with a Channel
we could just store an array of Post
ids on the Channel
object which relevant to it - same for comments on a Post
, etc.
I think designing the store like this will keep our lives simpler, and allow us to write code (e.g. for displaying posts, displaying comments, etc) that can be more agnostic about where the data came from, i.e. did we fetch these comments from a subreddit or from expanding a comment tree?
There's some documentation in the redux
documentation arguining for this sort of design pattern here.
We should add an endpoint /api/v0/frontpage/
which has the same content as a subreddit listing but which uses the frontpage listing algorithm (I think this is 'hot' by default) to create a listing of posts for all subreddits the user is subscribed to.
A privileged application like MicroMasters needs a basic user API to create open-discussions users (among other things), so that they can be automatically subscribed to channels.
Should allow storing of name and profile image
On:
We should figure out what REST APIs are needed to enable communication with MicroMasters or other servers. We need to support at least:
in the most bare-bones sense possible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.