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

Feature/bookmarks #3

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Feature/bookmarks #3

wants to merge 10 commits into from

Conversation

OlhaDanylevska
Copy link
Owner

This is a:

  • [+] ✨ New feature - new behaviour has been implemented
  • 🐛 Bug fix - existing behaviour has been made to behave
  • ♻️ Refactor - the behaviour has not changed, just the implementation
  • Test backfill - tests for existing behaviour were added but the behaviour itself hasn't changed
  • ⚙️ Chore - maintenance task, behaviour and implementation haven't changed

Description

Merging this pull request will implement a new bookmark feature for resources. Authorised users will see bookmark icons on resource cards in the resource list. They can bookmark resources to highlight them for quick access. Bookmarked resources will also appear on a dedicated bookmarks page, accessible via a "Bookmarks" button in the navigation menu. Users can toggle bookmarks directly from the home page or the bookmarks page, with changes immediately updating in the database. This feature enhances user experience by enabling personalised resource management.

  • Purpose -
    -The purpose of this pull request is to enhance the user experience by implementing a bookmark feature. It allows authorised users to easily manage and access their preferred resources. This includes highlighting resources for quick reference and consolidating them on a dedicated bookmarks page.

Bookmark Icon Functionality:

  • Navigate to the resource list page as an authorised user.
    -Verify that bookmark icons are displayed on resource cards if user logged in
    -Test toggling the bookmark state (adding and removing bookmarks).
    -Confirm that the changes persist by refreshing the page.
    Bookmarks Page:
    -Navigate to the "Bookmarks" page via the button in the navigation menu.
    -Verify that all bookmarked resources appear on the page.
    -Test toggling bookmarks directly from this page.
    Database Updates:
    -Confirm that the bookmark toggles immediately update the database by checking the database entries for the user.

  • How to check -

Links


Author checklist

  • [+] I have written a title that reflects the relevant ticket
  • [+] I have written a description that says what the PR does and how to validate it
  • [-] I have linked to the project board ticket (and any related PRs/issues) in the Links section
  • [+] I have added a link to this PR to the ticket
  • [+] I have made the PR to main from a branch named <category>/<name>, e.g. feature/edit-spaceships or bugfix/restore-oxygen
  • [+] I have manually tested that the app still works correctly
  • [+] I have requested reviewers here and in my team chat channel
  • [-] I have spoken with my PM or TL about any parts of this task that may have become out-of-scope, or any additional improvements that I now realise may benefit my project
  • [+] I have added tests, or new tests were not required
  • [+] I have updated any documentation (e.g. diagrams, schemas), or documentation updates were not required

to add all the bookmarks in one place, created link and route /bookmarks in Header
Created a Bookmark Context: To manage shared bookmark state across components.
Wrapped Application: Made the context available throughout the application.
Updated Components: Modified BookmarksPage, HomePage, and ResourceList to utilise the context for managing bookmarks.
Made a Commit: Saved and documented your changes.
Added authorisation error handling to display an appropriate message on the screen if the user is not logged in.
@textbook
Copy link

textbook commented Dec 4, 2024

Could you update the base of this PR to target the upstream branch, CodeYourFuture/tech-products-demo:main, rather than your own main branch? Then I can trigger the pipeline build.

@Farnooshmo
Copy link

Farnooshmo commented Dec 18, 2024

Thank you @OlhaDanylevska for your great design for the bookmark. However, I faced an issue on the page, and the bookmark feature is not functioning properly.
**There is no migration file for the bookmark **

  • I received error: relation "bookmarks" does not exist.

  • There is a difference between the Node version in your repo and the main repo.

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.

3 participants