You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$1000] Web - Not Allowed sign when hovering through the reaction list #21354
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
onPress is not a required property, but it was treated like it was. If a PressableWithFeedback instance was pressed (clicked) but onPressed was undefined, an exception was thrown. Consequently, the logic to re-enable the component (meant for the case when props.onPressed returns a promise) wasn't fired and it was left in the disabled state.
A disabled pressable has the not-allowed cursor.
ReportActionItem isn't providing onPress to PressableWithSecondaryInteraction (which forwards it to PressableWithFeedback). ReportActionItem's PressableWithSecondaryInteraction is an ancestor to the reaction picker, so the space between the reaction entries inherits the cursor style.
What changes do you think we should make in order to solve the problem?
Removing deploy blocker label since I don't think we need to block deploy on such a minor issue. It seems you can still react to comments so it doesn't actual break any existing behavior.
changed the title [-]Web - Not Allowed sign when hovering through the reaction list[/-][+][$1000] Web - Not Allowed sign when hovering through the reaction list[/+]on Jun 23, 2023
📣 @cubuspl42 You have been assigned to this job by @jasperhuangg!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
I would argue that the bug I described in my root cause analysis is still there in some form. If props.onPress throws, the component would again lock itself in the disabled state. The implementation is also unnecessarily complex and bug-prone, firing runAfterInteractions for simple cases when onPress is not async.
Hmmm after retesting I agree that it was fixed in that other PR. This is a pretty minor flow that doesn't affect behavior so I'm gonna close it out. Thanks for your understanding @cubuspl42
Activity
OSBotify commentedon Jun 22, 2023
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
StagingDeployCashdeploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:melvin-bot commentedon Jun 22, 2023
Triggered auto assignment to @jasperhuangg (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.jakub-trzebiatowski commentedon Jun 22, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a message in the chat is clicked, its reaction modal starts triggering the "not allowed" cursor when the space between reactions is hovered.
What is the root cause of that problem?
A recent change uncovered a bug in
PressableWithFeedback.onPressis not a required property, but it was treated like it was. If aPressableWithFeedbackinstance was pressed (clicked) butonPressedwasundefined, an exception was thrown. Consequently, the logic to re-enable the component (meant for the case whenprops.onPressedreturns a promise) wasn't fired and it was left in the disabled state.A disabled pressable has the
not-allowedcursor.ReportActionItemisn't providingonPresstoPressableWithSecondaryInteraction(which forwards it toPressableWithFeedback).ReportActionItem'sPressableWithSecondaryInteractionis an ancestor to the reaction picker, so the space between the reaction entries inherits the cursor style.What changes do you think we should make in order to solve the problem?
We should refactor the
onPresscallback passed toGenericPressableinPressableWithFeedbackso it works correctly in all cases:props.onPressis not provided (it'sundefined)props.onPressis provided and it's async (it returns aPromise)props.onPressis provided and it's not async (it returns something else, presumablyundefined)A simple implementation that satisfies these requirements could look like this:
jasperhuangg commentedon Jun 23, 2023
Removing deploy blocker label since I don't think we need to block deploy on such a minor issue. It seems you can still react to comments so it doesn't actual break any existing behavior.
[-]Web - Not Allowed sign when hovering through the reaction list[/-][+][$1000] Web - Not Allowed sign when hovering through the reaction list[/+]melvin-bot commentedon Jun 23, 2023
Job added to Upwork: https://www.upwork.com/jobs/~018e36cd61ebc57ae7
melvin-bot commentedon Jun 23, 2023
Triggered auto assignment to @trjExpensify (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.melvin-bot commentedon Jun 23, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)melvin-bot commentedon Jun 23, 2023
📣 @cubuspl42 You have been assigned to this job by @jasperhuangg!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
situchan commentedon Jun 23, 2023
I think this was already fixed in #21341
jakub-trzebiatowski commentedon Jun 23, 2023
@situchan
Oh, thanks for spotting that
I would argue that the bug I described in my root cause analysis is still there in some form. If
props.onPressthrows, the component would again lock itself in the disabled state. The implementation is also unnecessarily complex and bug-prone, firingrunAfterInteractionsfor simple cases whenonPressis not async.jasperhuangg commentedon Jun 23, 2023
Hmmm after retesting I agree that it was fixed in that other PR. This is a pretty minor flow that doesn't affect behavior so I'm gonna close it out. Thanks for your understanding @cubuspl42