NoteHeader - Unpinning a Message Fails and Causes Additional Issues #743

Open
opened 2024-05-17 12:58:52 +00:00 by kami_gawa · 1 comment

Title: Issues with Unpinning Messages in ProfileNotesTab Component

Body:

I've identified several issues related to the unpinning functionality within the unpin functionality that are affecting user experience:

Issues

  1. State Management Inconsistency: The ProfileNotesTab component retrieves pinned messages via usePinList instead of useLogin. usePinList does not automatically update when a message is unpinned, leading to outdated information being displayed.

  2. Event Propagation on Unpin: Currently, when the unpin confirmation is clicked, the event continues to propagate, causing the post itself to open. This behavior is unintended and disrupts the user experience.

  3. Unpin Commit Behavior: The unpin action does not auto-commit changes.

Proposed Solutions

  1. Synchronize State with usePin Hook: Implement a usePin state hook to keep the pinned messages in sync across the application. This will ensure that any changes to pinning are reflected universally without requiring a refresh.

  2. Stop Event Propagation: Modify the event handler for the unpin action to include e.stopPropagation();. This will prevent the event from bubbling up and triggering additional, unintended actions, such as opening the post.

  3. Enable Auto-Commit on Unpin: Set the autoCommit property to true for the unpin functionality. This will ensure that changes are automatically committed to the backend upon unpinning, streamlining the user interaction.

Additional Information

These changes aim to enhance the functionality and reliability of the unpinning feature, improving the overall user experience within the platform. Your feedback or further suggestions would be greatly appreciated.

This can be also applied to this task: #688

**Title**: Issues with Unpinning Messages in `ProfileNotesTab` Component **Body**: I've identified several issues related to the unpinning functionality within the unpin functionality that are affecting user experience: ### Issues 1. **State Management Inconsistency**: The `ProfileNotesTab` component retrieves pinned messages via `usePinList` instead of `useLogin`. `usePinList` does not automatically update when a message is unpinned, leading to outdated information being displayed. 2. **Event Propagation on Unpin**: Currently, when the unpin confirmation is clicked, the event continues to propagate, causing the post itself to open. This behavior is unintended and disrupts the user experience. 3. **Unpin Commit Behavior**: The unpin action does not auto-commit changes. ### Proposed Solutions 1. **Synchronize State with `usePin` Hook**: Implement a `usePin` state hook to keep the pinned messages in sync across the application. This will ensure that any changes to pinning are reflected universally without requiring a refresh. 2. **Stop Event Propagation**: Modify the event handler for the unpin action to include `e.stopPropagation();`. This will prevent the event from bubbling up and triggering additional, unintended actions, such as opening the post. 3. **Enable Auto-Commit on Unpin**: Set the `autoCommit` property to `true` for the unpin functionality. This will ensure that changes are automatically committed to the backend upon unpinning, streamlining the user interaction. ### Additional Information These changes aim to enhance the functionality and reliability of the unpinning feature, improving the overall user experience within the platform. Your feedback or further suggestions would be greatly appreciated. This can be also applied to this task: https://git.v0l.io/Kieran/snort/issues/688
Author

I cannot push my new branch, can you grant me access?

I cannot push my new branch, can you grant me access?
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Kieran/snort#743
No description provided.