GithubHelp home page GithubHelp logo

reddigest-scalafied's People

Watchers

 avatar  avatar  avatar

reddigest-scalafied's Issues

Implement last link seen tracking

Need a way to filter reddit json api requests so that we only receive links that are newer than a certain time, otherwise we are constantly fetching a bunch of links that we've already seen each time we try and get new links.

Fix active button selection during color change on login/register page.

Note that if the username & password fields are non-empty for login and login button is green, then register will also be green, despite its respective username & password fields being empty.. The same occurs if the fields for register are filled: login will be green. We want them to only become active when their specific fields have been filled.

SEE: #15

Link validation response parsing (Client)

We currently respond to client link validation request with an array of booleans of equal size. A boolean in a given index is true if the link with the same index in the request is indeed new link. If the link exists in the database, the boolean is false. We do not have a method of parsing these responses from json before we can act on them.

Add key listening to button color change on login page

We want the login and register buttons become green immediately when their respective username and password fields are non-empty. However, it currently only works if we mouse-over the button after their fields are non-empty. We want the buttons to listen for keyup on these fields.

Note that we are doing all DOM styling and effects (such as this) in pure javascript/jquery, NOT in Scala.js. For things such as this we are doing lightweight scripting and as such we need a lightweight scripting language such as javascript. For this, scala.js requires too much setup and is not well enough supported/documented/implemented to guarantee ease of use, and would only serve to create a layer of obfuscation. Therefore, all functions for these effects should go into server/public/javascripts/scripts.js. Note that all native (i.e. non scala.js) javascript functions must be named with js_ prepended to their name like js_foo(). This is to prevent any possibility of conflict with the separate body of scala.js code.

Test links page layout

The html for the links page has not been tested yet. This is being blocked by the lack of a db, and lack of link fetching. Once those are implemented, we can test how the links look and fiddle with the html being produced by TableRow

Implement refreshing of a link in the clients feed (Client)

Need to make a method by which the client can remove a link from their table and the link is then replaced. This involves tying the functionality of removing and getting a link to an href/button in each row. This button should call a method in the TableRow companion object which somehow maps to the individual row corresponding to the refresh button that was clicked. The companion object should call getLink() from the LinkSource and then refreshLink in the corresponding TableRow with the new link as an argument. The TableRow should then modify the corresponding DOM content to reflect this link. We will have to determine whether it is more efficient to modify all of the associate DOM content, or just the changed DOM content.

Add in-dom rendering of account action errors

If we're doing ajax calls, we can easily render a nice box in the dom above the login/account deletion fields if the actions fail. Let's not do popups because they are obnoxious.

Link validation response handling (Client)

We need to write the client code to act upon replies from client-side link validation requests to server. By response, I mean things like determining whether or not to fetch more links from reddit or returning a link(s). This response should be indifferent for single link validation and multiple link validation.

Add arg to all view templates to show current logged in users name in title/account page.

Need some way of passing a username down to the user_toolbar template from nested templates that allows it to display the current users account name either in the page title or in the account actions page. This arg does not get passed down past the user_toolbar template, and only appears on authenticated user pages, so we don't need to make this an option[string] as I initially thought.

Multiple link validation request (Client)

We currently have a method on the server by which we can validate multiple links sent to the server, but we have not yet implemented the client side ajax calls to send multiple links at once to the server. This method of link fetching is ideal, as we can then grab a batch of links from reddit each time we need more links, and then simply grab a link out of this set of validated links each time we need a new one. This can continue until we run out of fresh links. Otherwise, the client has to validate every single time they close a link and try to fetch a new one, which could seriously slow down the ui responsiveness.

Encapsulate all link validation requests inside LinkSource (Client)

We should encapsulate all link functions requiring communication with the server or reddit. We should put them inside a LinkSource object on the client side, with an interface of getLink() and removeLink(link). The first, getLink() should return a fresh link every time. The other, removeLink(link) tells LinkSource that link has been seen, and to tell the server to add it to the database.

Furthermore, we need to determine the logic with which to act upon replies from client-side link validation requests to server. By response, I mean things like determining whether or not to fetch more links from reddit or returning a link(s). This response should be indifferent for single link validation and multiple link validation.

Determine last link seen timeout period for fetching links from reddit.

Reddit's JSON api will only allow us to fetch 100 links at a time (https://www.reddit.com/dev/api). This presents a problem, as if all 100 of those links have been seen before, we need to use a link id for after to find posts after the last of these 100 posts. After that, each iteration of 100 posts should do the same thing. However, this is rather time sensitive, as after is not chronological, but instead correlated to ranking. We will likely need to store it in the cache of the user, and then timestamp their last access to reddigest in the database. With this, we can see if the users after post is too old or not. On the other hand, if the after post is still new, it's not too much of a problem, as the user can then just fetch and change after until they find new posts.

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.