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

BUG: Hidden Favorited Content Disappears Without Notice in Favorites Sidebar #672

Open
chrissantillan opened this issue Jan 17, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@chrissantillan
Copy link
Collaborator

chrissantillan commented Jan 17, 2025

Describe the bug

When content (e.g., a library) that has been favorited by a resident is hidden by an administrator, it disappears from the Resident Favorites sidebar and the Favorites tab on the Trending Content page without providing any notice to the Resident.

To Reproduce

  1. Log in to UnlockEd as a Resident and favorite a piece of content (e.g., a library such as Lua.org).
  2. Log in as a SuperAdmin and hide the favorited content (e.g., hide Lua.org).
  3. Log back in as the Resident and navigate to:
    • The Favorites sidebar on the Trending Content page.
    • The Favorites tab on the Knowledge Center page.
  4. Observe that the hidden content has disappeared without any notification.

Expected behavior

  • Hidden favorited content should not disappear silently.
  • Instead:
    • The Favorites sidebar and Favorites tab should display the hidden content in a disabled/non-clickable state.
    • Provide a visual indicator (e.g., grayed-out item with "This content is no longer accessible" label tooltip hover) to inform the Resident that the content has been removed or blocked.

Proposed Solution

  • Disable the button for hidden favorited content in both the Favorites sidebar and the Favorites tab.
  • Clearly label hidden content that was blocked.

Additional context

  • This issue can confuse Residents by silently removing their favorited content, leading to frustration and uncertainty.
  • Ensure consistency across both the Favorites sidebar and Favorites tab in handling hidden content.
  • Hidden content should remain visible but disabled, preserving the user's favorites while providing clear feedback on why the content is no longer accessible.
@chrissantillan chrissantillan added the bug Something isn't working label Jan 17, 2025
@chrissantillan chrissantillan changed the title BUG: Hidden Favorited Content Disappears Without Notice BUG: Hidden Favorited Content Disappears Without Notice in Favorites Sidebar Jan 17, 2025
@jtucholski
Copy link
Contributor

I anticipate that this is a bug with the backend made when open content favorites were refactored.

There's code in FavoriteCard.tsx intended to handle this situation:

        <div
            className={`card  p-4 space-y-2 ${
                favorite.visibility_status
                    ? 'bg-inner-background cursor-pointer'
                    : 'bg-grey-2 cursor-not-allowed'
            } tooltip `}
            {...(!favorite.visibility_status && {
                'data-tip': 'Unavailable Content'
            })}
            onClick={favorite.visibility_status ? handleCardClick : undefined}
        >

Similar code doesn't exist in OpenContentItemAccordion.tsx which I believe is used to render the favorites in the Favorites Sidebar on the Trending Content page.

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

No branches or pull requests

2 participants