Giter VIP home page Giter VIP logo

Comments (20)

Fairspy avatar Fairspy commented on June 7, 2024 1

@maneprajakta I actually went through the code and that's when I got the idea for this feature the section will only be visible after user authentication Which is quite easy to implement. As for fetching books rated by the user there are two functions that I thought would help me with the same in helpers.py I could make use of get_rated_bookids function to get the list of book ids of already rated books and I could use this list as input to the function get_book_dict to get the book details which would be used as the context for the rendered template.
As for, when there are no books rated I actually hadn't thought of that but I am thinking that we could put an if else statement and simply redirect the user to the index view if they haven't rated any books with an error message of Please rate or add books it should work.
Please let me know if I have misinterpreted something or there is a better way to do this.

from kitabe.

Fairspy avatar Fairspy commented on June 7, 2024 1

@maneprajakta I do have an understanding on how to write the necessary function in views.py to handle the request as well as to update urls.py accordingly.
As for the condition when there are no books rated your idea seems doable.
So, should I start working on it?

from kitabe.

Fairspy avatar Fairspy commented on June 7, 2024 1

Great!
Thanks a lot.

from kitabe.

maneprajakta avatar maneprajakta commented on June 7, 2024 1

@Praful932 Yes agree with you adding a rating button here will also be great.
@Fairspy also look for font size like make this card look better because it looks like a lot of white space is there.

from kitabe.

Fairspy avatar Fairspy commented on June 7, 2024 1

Great, I'll start working on it.

from kitabe.

maneprajakta avatar maneprajakta commented on June 7, 2024

@Fairspy the feature seems great to me 🚀 .But have you thought about how you will be implementing this
This section will be visible in the navbar only when the user signs in. After that, you need to fetch the books rated by the user from the database and render them on-page also think for when user has not rated any book .
Also, go through our Starter Guide it will help you a lot to get started with this project 😄 .

from kitabe.

maneprajakta avatar maneprajakta commented on June 7, 2024

@Fairspy I hope you are clear that we will need a function in views.py to handle it and url.py will be referenced to it accordingly.
Now coming to the function which will handle everything in views.py it will filter out all the ratings given by the user to different books Sort of Like this from here onwards your approach it's correct 🚀 first get_rated_bookids then get_book_dict and at last rendering.
If user has not rated anything than what I could think is put if condition if length of list is 0 then render on page simple message that rate some book and in else the remaining part 🌟 .
All set then.

from kitabe.

maneprajakta avatar maneprajakta commented on June 7, 2024

@Fairspy Yes go for it 🚀 .

from kitabe.

Praful932 avatar Praful932 commented on June 7, 2024

@Fairspy Nice job for thoroughly thinking about it! 🚀

  • In case of 0 books you can reuse the message which shows when users with 0 rated books trys to enter recommendation section.
  • Make sure to write the corresponding unit tests :)
  • You also need to add a wireframe/mockup for the page that you are designing before the implementation

from kitabe.

maneprajakta avatar maneprajakta commented on June 7, 2024

@Fairspy also everything needs to be responsive.

from kitabe.

Fairspy avatar Fairspy commented on June 7, 2024

@Praful932 @maneprajakta I'll definitely keep all of these points in mind while implementing the page.
As for the wireframe I'll try to make one as soon as possible. I was thinking that I could make it similar to the genres page of the website but without the rate this book button as it's already been rated.

from kitabe.

maneprajakta avatar maneprajakta commented on June 7, 2024

@Fairspy Great
Yep, np. I think it would be nice if you go for horizontal cards for an individual book.

from kitabe.

Fairspy avatar Fairspy commented on June 7, 2024

@maneprajakta
Do you want something like this?
Large screen size:
Desktop.png

Small screen size:
Mobile.png

I was also thinking of adding pagination for users with more than 20 read books let me know what you think about it.

from kitabe.

maneprajakta avatar maneprajakta commented on June 7, 2024

@Fairspy
Yes, seems cool.
Ya, it's nice after 10 books you can go for pagination.

from kitabe.

Praful932 avatar Praful932 commented on June 7, 2024

@Fairspy On large screen it would be nice if you could center the card info

from kitabe.

Fairspy avatar Fairspy commented on June 7, 2024

@maneprajakta Great then I'll start working on pagination.
@Praful932 Did you want it to be something like this?
Screen Shot 2021-03-13 at 17.25.19.png

from kitabe.

Praful932 avatar Praful932 commented on June 7, 2024

@Fairspy yes
@maneprajakta Adding the rating button too here would be better right, incase the user wants to change the rating?

from kitabe.

Fairspy avatar Fairspy commented on June 7, 2024

@maneprajakta @Praful932 Please take a look and let me know if any further changes are required.
Small screen sizes:
Screen Shot 2021-03-13 at 20.48.06.png
Large screen sizes:
Screen Shot 2021-03-13 at 20.49.29.png
I've also added the pagination let me know what you think.

from kitabe.

Praful932 avatar Praful932 commented on June 7, 2024

LGTM @Fairspy

from kitabe.

maneprajakta avatar maneprajakta commented on June 7, 2024

Go ahead @Fairspy

from kitabe.

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.