-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2024-04-09] [$500] Collect admin - Admin badge is not crossed out when removing admin offline #37776
Comments
Triggered auto assignment to @anmurali ( |
@anmurali FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
We think that this bug might be related to #wave8 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Collect admin - Admin badge is not crossed out when removing admin offline What is the root cause of that problem?We don't have any check for if the pending action for a user is
What changes do you think we should make in order to solve the problem?Check for We will also look up for similar bugs in other components. Resultadmin_badge_line_through.mp4 |
Job added to Upwork: https://www.upwork.com/jobs/~01a65f30dbfbc53bd4 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @c3024 ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Admin badge is not crossed out when removing admin offline What is the root cause of that problem?Each item row is already wrapped with Lines 56 to 61 in ec64dc1
What changes do you think we should make in order to solve the problem?Option1: add
Option2: rename |
ProposalPlease re-state the problem that we are trying to solve in this issue.The admin badge is not crossed out What is the root cause of that problem?In here, we already attempted to apply strikethrough text style for all nested This works well in case of direct children like here, it will have style appended with the strike through style here. That's why the display name and email of the workspace member have strike-through style correctly. However, the And this issue will happen again any time we have a What changes do you think we should make in order to solve the problem?The challenge is: Apply strike-through style to all Text components inside We need to use a more robust approach to do this than recursive search on children, due to the limitation above. Fortunately, we already have a similar app-wide pattern which is the
This pattern is similar to the What alternative solutions did you explore? (Optional)NA |
ProposalPlease re-state the problem that we are trying to solve in this issue.Collect admin - Admin badge is not crossed out when removing admin offline What is the root cause of that problem?The strikethrough style from OfflineWithFeedback is not applied to text in the badge. What changes do you think we should make in order to solve the problem?If we want to give a badge special condition in OfflineWithFeedback, we can change To
What alternative solutions did you explore? (Optional) |
Crossing of the Substituting the
of Can we identify the exact RCA for why using |
ProposalPlease re-state the problem that we are trying to solve in this issue.Collect admin - Admin badge is not crossed out when removing admin offline What is the root cause of that problem?Each item in the members list is wrapped by What changes do you think we should make in order to solve the problem?In the if (child.type.displayName === 'Badge') {
props.textStyles = StyleUtils.combineStyles(child.props.textStyles, styles.offlineFeedback.deleted, styles.userSelectNone);
} This is more flexible and can accommodate adding new components that will need to be styled. What alternative solutions did you explore? (Optional)Use more generic check when applying style in if (child.props.textStyles) {
props.textStyles = StyleUtils.combineStyles(child.props.textStyles, styles.offlineFeedback.deleted, styles.userSelectNone);
} |
ProposalPlease re-state the problem that we are trying to solve in this issue.The admin badge is not being crossed out when removing an admin while offline in the native mobile apps. This badge strikethrough works as expected on web. What is the root cause of that problem?In the This method recursively loops through the child components, and for each valid React element, it combines the existing style prop with the strikethrough styles (styles.offlineFeedback.deleted and styles.userSelectNone) using StyleUtils.combineStyles. It then clones the child element with the updated style prop. If the child component has children of its own, However, the issue with the const props: StrikethroughProps = {
style: StyleUtils.combineStyles(child.props.style, styles.offlineFeedback.deleted, styles.userSelectNone),
}; The strikethrough styles are being applied to the style prop of the child component. But in the On web, styles are applied using CSS, and by default, CSS styles cascade down to child elements. In the web version of the However, React Native styles work differently. In React Native, styles are applied directly to individual components and don't automatically cascade to child components. Each component needs to be explicitly styled. In the native version of OfflineWithFeedback, the applyStrikeThrough method recursively loops through the child elements, finds Text components, and applies the strikethrough style directly to them: This works for the member's display name and login because they are direct Text children of OfflineWithFeedback. However, the Text inside Badge is not a direct child, so it doesn't get the strikethrough style applied to it. To summarize:
What changes do you think we should make in order to solve the problem?Instead of blindly applying the strikethrough style to the
This solution has the following advantages:
With this approach, whenever a new component needs to support the strikethrough style in a different way, we can simply pass the appropriate |
@mkhutornyi will takeover this issue as C+ as they worked on a similar issue and have better context. |
taking this over |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@anmurali Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Cc. @mkhutornyi |
@tienifr does your context solution avoid this kind of issue on native, even if we have custom |
This is existing pattern throughout the app. We fixed case-by-case, not generally solved. So, while @apeyada proposed working solution first, this time I'm looking for general solution to prevent such bugs further on native. |
@mkhutornyi @apeyada if you could continue the checklist. |
@rlinoz, @anmurali, @mkhutornyi, @apeyada Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
friendly bump @mkhutornyi @apeyada |
@rlinoz, @anmurali, @mkhutornyi, @apeyada Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Still waiting on the checklist here. cc @mkhutornyi @apeyada |
@mkhutornyi is OOO |
I am moving to weekly until @mkhutornyi is back. |
I paid @apeyada while we wait for @mkhutornyi to return and complete the checklist. |
Still waiting for @mkhutornyi |
Regression Test Proposal
|
@mkhutornyi has been paid and tests added. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.47-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Expected Result:
The admin badge will be crossed out (web behavior)
Actual Result:
The admin badge is not crossed out
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: