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

Cheyu/save to favorites toggle #32

Open
wants to merge 11 commits into
base: f24
Choose a base branch
from
Open

Conversation

tu2463
Copy link

@tu2463 tu2463 commented Sep 30, 2024

Added backend code to switch the button between "Save to Favorites" and "Remove from Favorites" when clicking on it.
This fully resolves #1

The code currently only enables the button to switch, and this can be tested manually on the web page. See more details for testing at CMU-313/nodebb-frontend-f24-sweethearts#4 (commits)

However, the code doesn't actually save and remove the corresponding posts to the database. The test files are written to test if it can save the posts. Therefore, the tests can't be passed yet.

@tu2463 tu2463 force-pushed the cheyu/save-to-favorites-toggle branch 4 times, most recently from 598f2b3 to a30980f Compare September 30, 2024 15:56
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11241928557

Details

  • 23 of 32 (71.88%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 82.689%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/topics/favorite.js 10 19 52.63%
Totals Coverage Status
Change from base Build 11025903872: -0.02%
Covered Lines: 22362
Relevant Lines: 25625

💛 - Coveralls

@tu2463 tu2463 self-assigned this Oct 8, 2024
@tu2463 tu2463 requested a review from alicekang1 October 8, 2024 19:25
@tu2463 tu2463 force-pushed the cheyu/save-to-favorites-toggle branch from 0a54684 to b1b38bf Compare October 11, 2024 00:06
Copy link

@alicekang1 alicekang1 left a comment

Choose a reason for hiding this comment

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

The main error I see are with your test (test/topics/favorite.js). Some of the errors include:

  • unexpected function expression
  • missing trailing comma
  • expected indentation of _ tabs but found _ spaces

Other than this, everything looks good!

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.

(Frontend) Create a "Save to Favorites" button in the topic page
3 participants