-
Notifications
You must be signed in to change notification settings - Fork 23
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
fix(quickprofile): Disable onblur for msg and hide profile on enter #1427
Conversation
|
So during testing I had some weird behavior In a group chat I opened up Windows quickprofile and tried to send a message. When I sent the message instead of it sending just to the Windows profile in a DM it would try to send in the group And it seems like the message would never fully send it would appear with 50% opacity and no other users would receive Screen.Recording.2023-10-27.at.12.22.37.PM.mov |
UI Automated Tests execution is complete! You can find the test results report here |
Noticed this crash on Linux and MacOS flow was: Screen.Recording.2023-10-31.at.2.38.52.PM.mov |
@phillsatellite can you attach the crash report? |
|
WalkthroughWalkthroughThe changes primarily focus on refactoring the Changes
Assessment against linked issues (Beta)
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (2)
- common/src/state/mod.rs (1 hunks)
- ui/src/layouts/chats/presentation/quick_profile/mod.rs (1 hunks)
Additional comments: 3
common/src/state/mod.rs (2)
1173-1176: The check for the active chat ID has been removed. This change could potentially affect other parts of the code that rely on this function. Ensure that all calls to this function throughout the codebase have been updated to match the new behavior.
1185-1187: The function now directly uses the provided
id
parameter to retrieve the chat and increment the outgoing messages for the specified chat. This change streamlines the process of appending the provided message and attachments to the outgoing messages for a specific chat.ui/src/layouts/chats/presentation/quick_profile/mod.rs (1)
- 400-413: The
onreturn
event handler has been updated to hide the context menu after a message is sent. This is done by adding a class "hidden" to the context menu element. This is a good practice as it improves the user experience by automatically closing the context menu after the user has finished interacting with it. However, it's important to ensure that the class "hidden" is properly defined in your CSS and actually hides the element. Also, thedisable_onblur
attribute has been added to theInput
component and set totrue
. This prevents the quickprofile from disappearing when the user clicks outside the input box, which can be a useful feature in some cases. However, it's important to consider the potential impact on the user experience. If the quickprofile is not expected to disappear when the user clicks outside of it, this could lead to confusion or frustration. Therefore, it's recommended to clearly communicate this behavior to the user, for example through a tooltip or other form of user guidance.
did you have the extension up to date? |
I should've and on MacOS14 but I can re test to verify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yaml
Files selected for processing (1)
- common/src/state/mod.rs (1 hunks)
Additional comments: 3
common/src/state/mod.rs (3)
1197-1200: The
send_message
function has been refactored to delegate the message appending process to theincrement_outgoing_messages_for
function. This is a good practice as it improves the modularity and readability of the code.1203-1213: The new function
increment_outgoing_messages_for
is introduced. It takesmsg
,attachments
, andid
as input parameters and handles the logic previously present in thesend_message
function. The retrieval of thedid
variable is now done within this function. This is a good practice as it improves the separation of concerns in the code.1211-1211: Ensure that the
append_pending_msg
function handles the case where theid
does not exist inself.chats.all
. If it doesn't, it could lead to a runtime error.
What this PR does 📖
Which issue(s) this PR fixes 🔨