Skip to content

bug: Bookmark duplicate bug & Bookmark State update bug #1795

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

Open
HarshK200 opened this issue Mar 27, 2025 · 1 comment · May be fixed by #1804
Open

bug: Bookmark duplicate bug & Bookmark State update bug #1795

HarshK200 opened this issue Mar 27, 2025 · 1 comment · May be fixed by #1804
Labels
bug Something isn't working

Comments

@HarshK200
Copy link

Description
When creating a bookmark using the sidebar it doesn't update that state on the FolderView page and if you add bookmark on Folderview page after adding it on the sidebar it Creates two bookmarks for the same video

To Reproduce
Steps to reproduce the behavior:

  1. Go to any course page and open any folder for e.g. week-1 in webdev
  2. Open the sidebar add a bookmark to any of the video in week-1
  3. ERR: notice how the adding a bookmark didn't reflect on the video card in the week-1 folderview
  4. Now click on the add bookmark on week-1 folderview video card.
  5. ERR: If you navigate to the bookmarks page now you'll find you have two bookmarks for the same video

Expected behavior
On click on add bookmark on either the videoCard component or the sidebar they should both reflect the change and duplicate bookmark problem would be solved.

Screenshots or GIFs

Bookmark.State.error.mp4

Info (please complete the following information):

  • Browser: both firefox and chrome
  • Version: [firefox: 136.0.2 (64-bit), chrome: 134.0.6998.117 (Official Build) (64-bit)]

Additional context
The problem is because one component i.e. the FolderView is a server component whereas the sidebar is a client component, since there is no concept of state in between the both the way it works for when you do the steps to reproduce the other way around is because it re-validates the path on the server side for the folderView videoCard component. But it doesn't do that on the client-side for the sidebar

@divu777
Copy link

divu777 commented Apr 2, 2025

i originally thought of making the recoil state and store bookmarks accordingly and use it , but it still causes issue as the sidebar is client side and even tho the state gets updated doesn't seem to update the state on both ends . Let me know if you fix it or not

@divu777 divu777 linked a pull request Apr 2, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants