-
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 01-02-2023] [$1000] Tooltip is not in the center while hovering on a profile pic #13940
Comments
I can repro this reliably, moving |
Job added to Upwork: https://www.upwork.com/jobs/~01e3f915ebae1ec606 |
Current assignee @trjExpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak ( |
Triggered auto assignment to @bondydaa ( |
Proposal Issue is occuring due to the margin applies to the child component of the Tooltip. diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js
index a4958ab1b..4ad15b159 100644
--- a/src/pages/home/report/ReportActionItemSingle.js
+++ b/src/pages/home/report/ReportActionItemSingle.js
@@ -66,7 +66,7 @@ const ReportActionItemSingle = (props) => {
return (
<View style={props.wrapperStyles}>
<Pressable
- style={styles.alignSelfStart}
+ style={[styles.alignSelfStart, styles.mr2]}
onPressIn={ControlSelection.block}
onPressOut={ControlSelection.unblock}
onPress={() => showUserDetails(props.action.actorEmail)}
diff --git a/src/styles/styles.js b/src/styles/styles.js
index b3de12803..f4d161c59 100644
--- a/src/styles/styles.js
+++ b/src/styles/styles.js
@@ -695,7 +695,6 @@ const styles = {
// Actions
actionAvatar: {
borderRadius: 20,
- marginRight: 8,
}, We can replace |
This seems okay though I think it does end up making the profile pictures ever so slightly smaller as well cc @shawnborton thoughts? |
Will wait for the C+ to confirm as well |
@bondydaa Currently that avatar contains the right margin which increases the width of the Tooltip area and due to that center of the area is a bit right and not within the center of the avatar. |
I'm not sure at what point this changed but there should be 12px margin (not 8px) in between the avatar and the name/message. We could fix that here or we could save that for a new issue. |
Actually sorry, let's tackle the extra margin as a separate issue - I think there are other implications here we need to consider beyond the tooltip so I don't want to bloat the original issue at hand. Sorry about that! |
Yes, 12px for particular this case will shift the content more to the right which will be inconsistent with the other messages alignment and requires a fix at other places too. |
ProposalThis issue is present for name tooltip too. to fix it we need to remove the padding from below Lines 1315 to 1316 in 034a6f0
Add the padding styles below
To fix the avatar tooltip issue we need to add styles.mr2 below
and remove margin here Line 698 in 034a6f0
|
@shawnborton just to correct the current margin in the LHN for avatar and name is 16px. To make the same 16px margin for the messages we can apply below changes. diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js
index a4958ab1b..fdb1464be 100644
--- a/src/pages/home/report/ReportActionItemSingle.js
+++ b/src/pages/home/report/ReportActionItemSingle.js
@@ -66,7 +66,7 @@ const ReportActionItemSingle = (props) => {
return (
<View style={props.wrapperStyles}>
<Pressable
- style={styles.alignSelfStart}
+ style={[styles.alignSelfStart, styles.mr4]}
onPressIn={ControlSelection.block}
onPressOut={ControlSelection.unblock}
onPress={() => showUserDetails(props.action.actorEmail)}
diff --git a/src/styles/styles.js b/src/styles/styles.js
index 82e9ca8f2..4005ff276 100644
--- a/src/styles/styles.js
+++ b/src/styles/styles.js
@@ -695,7 +695,6 @@ const styles = {
// Actions
actionAvatar: {
borderRadius: 20,
- marginRight: 8,
},
componentHeightLarge: {
@@ -1289,7 +1288,7 @@ const styles = {
flexShrink: 1,
flexBasis: 0,
position: 'relative',
- marginLeft: 48,
+ marginLeft: 56,
}, |
But to make it consistent we need to apply changes to the display user time line and in the composer input too, which seems to be the reason to me why it is 8px. |
ProposalProblemThis issue is occurring because of the margin added to the App/src/pages/home/report/ReportActionItemSingle.js Lines 75 to 76 in 034a6f0
SolutionWe can remove App/src/pages/home/report/ReportActionItemSingle.js Lines 75 to 76 in 034a6f0
and add it to App/src/pages/home/report/ReportActionItemSingle.js Lines 68 to 69 in 034a6f0
Now, if we add any Lines 696 to 699 in 034a6f0
Tooltip will always remain centered while hovering on a profile pic or nameDemoScreen.Recording.2023-01-04.at.4.32.00.PM.mov |
Proposal :- The same issue is being replicated for name as highlighted by @Puneet-here As there are multiple ways to solve it I find this solution to be best working if we in future we need to change paddings for either item for name and avatar We can pass avatar style to presssable and marginLeft : 5 To ReportActionItemDate diff --git a/src/pages/home/report/ReportActionItemDate.js b/src/pages/home/report/ReportActionItemDate.js
index 0cf570132..02e928cf9 100644
--- a/src/pages/home/report/ReportActionItemDate.js
+++ b/src/pages/home/report/ReportActionItemDate.js
@@ -13,7 +13,7 @@ const propTypes = {
};
const ReportActionItemDate = props => (
- <Text style={[styles.chatItemMessageHeaderTimestamp]}>
+ <Text style={[styles.chatItemMessageHeaderTimestamp, {...props.style}]}>
{props.datetimeToCalendarTime(props.created)}
</Text>
);
diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js
index a4958ab1b..980208df2 100644
--- a/src/pages/home/report/ReportActionItemSingle.js
+++ b/src/pages/home/report/ReportActionItemSingle.js
@@ -66,14 +66,13 @@ const ReportActionItemSingle = (props) => {
return (
<View style={props.wrapperStyles}>
<Pressable
- style={styles.alignSelfStart}
+ style={[styles.alignSelfStart, styles.actionAvatar]}
onPressIn={ControlSelection.block}
onPressOut={ControlSelection.unblock}
onPress={() => showUserDetails(props.action.actorEmail)}
>
<Tooltip text={props.action.actorEmail}>
<Avatar
- containerStyles={[styles.actionAvatar]}
source={avatarUrl}
/>
</Tooltip>
@@ -98,7 +97,7 @@ const ReportActionItemSingle = (props) => {
/>
))}
</Pressable>
- <ReportActionItemDate created={props.action.created} />
+ <ReportActionItemDate created={props.action.created} style={{marginLeft : 5}}/>
</View>
) : null}
{props.children}
diff --git a/src/styles/styles.js b/src/styles/styles.js
index 82e9ca8f2..be7715143 100644
--- a/src/styles/styles.js
+++ b/src/styles/styles.js
@@ -1312,7 +1312,6 @@ const styles = {
fontSize: variables.fontSizeNormal,
fontWeight: fontWeightBold,
lineHeight: variables.lineHeightXLarge,
- paddingRight: 5,
paddingBottom: 4,
...wordBreak.breakWord,
}, After Fix :- Screen.Recording.2023-01-04.at.6.15.07.PM.mov |
coming from here ProposalI found this tooltip not being centered issue throughout the app and compiled a list of changes to fix all of them. There are two main sections where this issue resides:1. for Header buttons
Changes that needs to be done:Adding a App/src/components/HeaderWithCloseButton.js Lines 141 to 155 in 034a6f0
![]() Doing the same for download button here App/src/components/HeaderWithCloseButton.js Lines 161 to 176 in 034a6f0
Although I think the download button doesn't need extra margin of 8px in the right as in all the other places the buttons are right next to each other without extra padding/margin. Will confirm this with @shawnborton at the bottom. Same changes for the IOUModal here Lines 380 to 390 in 034a6f0
Another way to solve these problems (IMO Better):We can just remove line no. 525 from here and make the rest of the changes accordingly because in all the other places where this style is being used we're eventually resetting the margin-right value by using styles.mr0 Lines 521 to 527 in 034a6f0
2. for Avatar and Name tooltipsChangesRemove these lines of code: Lines 1315 to 1316 in 034a6f0
Line 698 in 034a6f0
Create a new object with above styles and pass below:
And add
Places where the buttons are stacked right next to each other without any spacing : The only place where a gap of 8px is observed Just want to confirm if this is intentional or need to be fixed. |
Just to make a point, the items mentioned by the other contributors are suggestions and improvements which is not directly related to the raised issue. I definitely agree that these are the bugs that can be raised in the future and solving them now is a good step but I believe the first valid proposal for the raised issue needs to be considered and should get a chance to incorporate these changes(all tooltip positional) if we are planning for it. |
PR is ready for review. |
Hi, I wanted to confirm if I am eligible for compensation since I mentioned a new instance of this issue and proposed a solution which was used. Like here. |
@bondydaa, @eVoloshchak, @Pujan92, @trjExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Not overdue, PR was deployed to production 3 days ago |
@Pujan92 this issue still exist |
Ohh, seems this PR from @grgia overwritten changes which I did for this fix. The right margin which we applied to the parent element is applied again within the child in that PR which causes the issue. @bondydaa @eVoloshchak needed the below change to apply 12px margin between avatar and name. diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js
index bb1d39e62..c90335a9d 100644
--- a/src/pages/home/report/ReportActionItemSingle.js
+++ b/src/pages/home/report/ReportActionItemSingle.js
@@ -73,7 +73,7 @@ const ReportActionItemSingle = (props) => {
return (
<View style={props.wrapperStyles}>
<Pressable
- style={[styles.alignSelfStart]}
+ style={[styles.alignSelfStart, styles.mr3]}
onPressIn={ControlSelection.block}
onPressOut={ControlSelection.unblock}
diff --git a/src/styles/styles.js b/src/styles/styles.js
index 71fed0201..23697f51d 100644
--- a/src/styles/styles.js
+++ b/src/styles/styles.js
@@ -709,7 +709,6 @@ const styles = {
// Actions
actionAvatar: {
borderRadius: 20,
- marginRight: variables.avatarChatSpacing,
}, |
oh hm dang I do not know what we're supposed to do here, going to ask in slack. |
to recap the slack discussion we're just going to have @Pujan92 re-add the fixes into the PR #14247 to get it re-applied. Georgia has been OOO and since normally we'd get the PR author who "broke" it to fix it let's bypass that this one time to get the fixes back in place and keep moving forward on these tooltip problems. |
slack thread was here for posterity https://expensify.slack.com/archives/C01GTK53T8Q/p1674149953675229 |
@bondydaa just want to confirm do it will consider as regression report ? |
yeah I think so 👍 |
merged #14247 which is taking care of fixing the regression that got added. |
This hit prod 7 days ago (Wednesday, 1st Feb). Title didn't update, but doing that now to track it better. Is this the correct summary of payments due? $250 for @gadhiyamanan for the bug report Let me know and I can ship the offers. Thanks! |
Hi @trjExpensify, I wanted to confirm if I am eligible for compensation since I mentioned a new instance of this issue and proposed a solution which was used. A similar case was here. |
@Puneet-here Just sharing my similar case here where it has counted as a suggestion. 😅 |
Hey @Puneet-here, can you be more specific/direct with what your implying, please? I don't know what you're pointing to there with @JmillsExpensify's summary of payments on another issue? 😕 The way I see it, this issue was created from a bug reported by @gadhiyamanan in #expensify-bugs as per the OP. We don't compensate for suggestions, and the solution we accepted was @Pujan92's. |
Sorry for not being specific earlier. I was sharing a similar case where two contributors were compensated because the code that was use in the final PR was from both contributors (me and allrounderexperts) daraksha-dk mentioned one new instance of this issue and provided a solution, in their case a new issue was created and the issue was assigned to them for solving. I had also added a new instance of this issue and provided the solution to fix that. The solution was used in the final PR. That's why I wanted to confirm if I am eligible for compensation since it is similar to above cases. |
Thanks! @daraksha-dk's issue was for the back/header buttons, which was treated separately because it had a different implementation as per the outcome of this thread. Your proposal on this issue wasn't accepted unfortunately, and the initial report came from @gadhiyamanan, so I don't think we treat it as an additional bug report - like we are the one where @jatinsonijs found a regression from another PR that reverted these changes. |
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
By new "instance" I meant I reported and provided solution for a new place where this bug was present (it was also present in names, here's my comment ) that instance was not part of the original issue but we decided to fix it here and since pujan had proposed the solution first for the original issue their proposal was taken and we included the fix for the new instance in the same PR so I think my case is similar as darkasha-dk 's, but in my case a new issue wasn't created. |
Ahh, I see. Thanks for elaborating on that, so yes, I'll ship you a bug reporting bonus. |
All done here! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
tooltip should be in center of profile pic
Actual Result:
tooltip is not in the center
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.47-0


Reproducible in staging?: y
Reproducible in production?: y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
Expensify/Expensify Issue URL:
Issue reported by: @gadhiyamanan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1672221180234109
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: