Coder Social home page Coder Social logo

Allow users to edit reviews about compass HOT 5 CLOSED

world-class avatar world-class commented on September 27, 2024
Allow users to edit reviews

from compass.

Comments (5)

ankush avatar ankush commented on September 27, 2024 1

I'd suggest leaving /reviews page as is and adding a "singular" route /review/:id that links to individual review.

You'll get the id by using req.params.id in your function for that route.

from compass.

BlairCurrey avatar BlairCurrey commented on September 27, 2024

We talked about a related issue that I think can be a subcomponent of this issue.

Each card needs a permalink (and an easy way to copy this link for sharing). We can change the reviews.html template to assign the review id to the card's html id. One of @amenat's proposed solutions for editing involved giving each review it's own page. If we do that, we can make the card a link to the review's page and then sharing that page will be straightfoward.

Alternatively, we can make a separate button or link that captures the card's position on the page via it's element id.

from compass.

BlairCurrey avatar BlairCurrey commented on September 27, 2024

If we go the unique page per review route, should we utilize the same app.get("/reviews" ... route that we use for the full review page and review filtered by course page? We could use the same strategy that we use for filtering by course (check if the review id is specified and if so, use a WHERE clause to just get that one)

What's best practice? utilize the same route and make it flexible (I think this is the answer) or make more unique, single purpose routes?

from compass.

BlairCurrey avatar BlairCurrey commented on September 27, 2024

Added the single page route as a subgoal #41 that I will tackle first

from compass.

BlairCurrey avatar BlairCurrey commented on September 27, 2024

A couple of broad ideas on this matter:

  • User shouldn't see an option to edit anywhere if they don't own the review
  • Check also needs to be performed on/before update query to ensure user owns review

What will the user experience be like? A user might have the review up in front of them when they want to edit. In that case, it would be nice to have a button right there. However, if a user is not currently at the review, there isn't a very direct way to reach it. You currently have to filter by the class or go through all the reviews. So I think a list of all reviews in the user profile is vital. Editing both places is ideal, but I think having it in the profile is the bare minimum.

Here is a rough outline of my plan.

  • Add list of user-owned reviews with 'edit' button in user profile
    • Add an edit button on the review itself (if the user owns it). Should make a new issue for this if not accomplished in this one.
  • make review update form with message flashing on top
  • make review update route

from compass.

Related Issues (20)

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.