GithubHelp home page GithubHelp logo

step's People

Contributors

andreahu12 avatar apicardgoog avatar gwynethsc avatar kevinworkman avatar kevwhite1 avatar lazau-g avatar nanselmo avatar nmhall avatar suyashlakhotia avatar

Watchers

 avatar  avatar  avatar

step's Issues

Convert to Datastore Transactions

Possible fix for intermittent incomplete "Delete All" action; sometimes, the displayed comments immediately after pressing "Delete All" include some comments that should have been deleted; they disappear upon refresh. Comments are additionally confirmed to have been deleted in Datastore.

Suspected to be a race condition issue; transactions may prevent UI change until all comments are deleted. Then again, maybe not desirable to have to wait? Perhaps a better strategy to have a continuous update, or at least a "processing" signal in the UI

error/failure check HTTP requests

Not something you need to handle now, just more of a learning point for the future. When making calls to the server, you should also check for errors/failures. That way you can show a nice toast/popup message if for some reason the delete fails.

Another learning point, you do not need to reload your all your comments on delete. You could potential just verify the response was successful and use javascript to remove that one comment or all comments. This makes your website snappier and prevents excess calls to your server/database.

Again, you don't need to make these changes, I just wanted to give you some advice on what to research if you wanted. to improve your current implementation.

Originally posted by @Google-JM in #14

Enhance user profiles

enable (unique?) username selection and editing
enable profile image upload
enable user default settings, such as number of comments displayed

refactor code for more granular functions, including hideElement

I would also recommend refactoring the code into separate functions for readability. Typically, you'll want your function / method implementations as granular as possible for ease of understanding and maintenance.

So, for example, in this case, you might consider having a function like hideElement like Justin recommended, but another one that is a level higher, like showLogIn(boolean) to toggle visibility of the log in UI. This function could make use of your hideElement function.

Originally posted by @sperzion in #21

Prevent partial batch deletion when deleting all comments

Datastore has a limit (500? 1000?) on the maximum possible number of entries that can be simultaneously deleted; requires additional logic to loop through for thorough deletion.

Low-priority - high traffic not anticipated on this site

Create separate User class to pass around user information

I missed this is previous reviews, but something to think about if you have time to come back to this code:

Create a User object to hold userId, userEmail. That way you can do LoginStatus(User user, boolean loggedIn, String redirectUrl)

Loose rule of thumb if you are passing 2 or more params that are similar, think about creating an object to hold the values.

Originally posted by @Google-JM in #35

check Promise reject types to adjust handling behavior

This is good for this PR, but a slightly more sophisticated approach would be to check what type of error you're getting. If you know it's the intermittent kind, you could do the backoff, whereas if you know it's something that's never going to work no matter how many times you try, you could just stop.

Originally posted by @sperzion in #44

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.