Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added heart icons in settings and synced heart icon state with star rating changes #785

Merged
merged 19 commits into from
Feb 20, 2023

Conversation

Sooyoung98
Copy link
Contributor

Does not fully fulfill requirements stated in #763

Hello Boris!

Thank you for your support so far.
This pull request contains the following:

  • added 'show favorites' setting into the view settings page
  • heart icon lits up properly upon changing the star ratings, and vice versa Only on details view
  • On other views like thumbnail or filmstrip, the interactive change between star and heart does not work

If you have insights on why it is not working for other views, we would like to know!

Thank you!

Copy link
Owner

@whyboris whyboris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work 🤝 - thank you all for the excellent contribution!

Code is great, though I left some comments for improvement.

I'll do another review later too (sorry was away the last 2 days).

@@ -82,7 +82,7 @@
"@typescript-eslint/eslint-plugin": "5.45.0",
"@typescript-eslint/parser": "5.45.0",
"electron": "22.0.0",
"electron-builder": "23.6.0",
"electron-builder": "^22.10.3",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did it turn out 23.6.0 version was giving errors, or is this accidental?

If easy enough, would you be willing to reset the package.json and package-lock.json files to their state in the main branch?


//Check if the video is "favorited" or not at the start of the hub

function isFavorite(stars): boolean {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function code works as desired, but consider this shorter one-line version:

return stars === 5.5;

ps - consider using the JSDoc formatting for the function description / comment: JSDoc

height: 50%;
position: absolute;
width: 50%;
height: 50%;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not too important, but could we go back to the 2-space indentation we had before? 😊

@@ -71,4 +77,24 @@ export class FullViewComponent implements OnInit {
this.rowOffsets.push(i * Math.floor(this._metaWidth / imgWidth));
}
}

toggleHeart(): void {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the toggleHeart method is repeated across several components 🤔

I think we could put this code into a service and just call the service from each of the components where the functionality is needed 🤔

You could create a dedicated new service, but the imageElementService seems like a great place for this code to live in 😁

This way we can keep it DRY 😉

@whyboris
Copy link
Owner

Sorry for the delay -- I'll try to find some time this week (before 2022 is over) to merge in your code ❤️
Have an excellent winter break ❄️

@whyboris
Copy link
Owner

Thank you again for the code addition 🙇
I'm aiming to have a release at the end of February, so I'll merge this in and fix anything that's left over 🤝
Cheers 😊

@whyboris whyboris changed the base branch from main to heart-favorite February 20, 2023 16:48
@whyboris whyboris merged commit 7be44ca into whyboris:heart-favorite Feb 20, 2023
@whyboris
Copy link
Owner

🙇 thank you for the code contribution -- I've merged it into heart-favorite branch so as to resolve merge conflicts (and update a few minor things before merging into main) 🤝

Your code should appear in the 5th anniversary release happening later today 🙌 Cheers!

@whyboris whyboris mentioned this pull request Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants