NoteHeader - Unpinning a Message Fails and Causes Additional Issues #743
Labels
No Label
1000k
100k
10k
200k
20k
500k
50k
5k
75k
backend
blocked:design
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
P1
P2
P3
question
scope:intl
scope:nip
scope:query_tracing
scope:ux
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Kieran/snort#743
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Title: Issues with Unpinning Messages in
ProfileNotesTab
ComponentBody:
I've identified several issues related to the unpinning functionality within the unpin functionality that are affecting user experience:
Issues
State Management Inconsistency: The
ProfileNotesTab
component retrieves pinned messages viausePinList
instead ofuseLogin
.usePinList
does not automatically update when a message is unpinned, leading to outdated information being displayed.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.
Unpin Commit Behavior: The unpin action does not auto-commit changes.
Proposed Solutions
Synchronize State with
usePin
Hook: Implement ausePin
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.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.Enable Auto-Commit on Unpin: Set the
autoCommit
property totrue
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
I cannot push my new branch, can you grant me access?
You need to create a fork and push your code there, then you can make a PR.
It works exactly the same on GitHub