Comments (5)
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.
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.
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.
Added the single page route as a subgoal #41 that I will tackle first
from compass.
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)
- JS error on account creation HOT 4
- Cannot retrieve any full review HOT 1
- Non user-friendly error when review comment is too large HOT 2
- Add sanitization and validation on inputs
- Add pagination on review pages
- Stores sessions in database
- Feature request: "Report" button next to reviews
- Feature request: "Add a review for this course" button on course page
- Highlight if data is not found
- Problems with Displayed Text HOT 2
- Add TLS support HOT 1
- Break routes into separate files
- Bug: if supplied session doesn't exist in database then server crashes instead of asking user to login again
- Redundant steer to "visit review" when duplicate module review is entered HOT 1
- Reduce size of headings in generated HTML of markdown reviews HOT 2
- Add Markdown Editor
- After a 500: internal server error, going back loses the module and session and unable to select original without selecting another first HOT 1
- Improve UI of review cards
- Add personalized dashboard for tracking modules
- Escape all values in HTML HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compass.