Closed kbecciv closed 1 year ago
Triggered auto assignment to @Christinadobrzyn (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are β
)There are no tooltips in SplitBillDetailsPage
We have not enabled tooltips there, moreover instead of getting a list of reports, OptionsSelector
is getting user details so it will not be able to generate tooltips.
We should make the following changes:
Set showTitleTooltip
prop to true
in OptionsSelector
in MoneyRequestConformationList.js
https://github.com/Expensify/App/blob/8acc63040d8257859f988ff7b9804fea3acffc15/src/components/MoneyRequestConfirmationList.js#L321-L335
Remove isDisabled
prop altogether (delete line 329) so that we can actually hover and tooltip can show.
Remove isDisabled
from the getSections
method as well (delete line 209) for the same reason as (2).
https://github.com/Expensify/App/blob/8acc63040d8257859f988ff7b9804fea3acffc15/src/components/MoneyRequestConfirmationList.js#L209
Modify the displayNamesWithTooltips
variable in OptionRow.js
to take this.props.option
if this.props.option.participantList
is undefined
https://github.com/Expensify/App/blob/8acc63040d8257859f988ff7b9804fea3acffc15/src/components/OptionRow.js#L134-L136
Change line 134 to the following:
const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips((this.props.option.participantsList || this.props.option.login ? [this.props.option] : []).slice(0, 10), isMultipleParticipant);
This change will make sure that the tooltips are rendered even when the option passed is not a report and is PersonalUserDetail
.
(Optional Change) We can modify the onSelectRow
prop on line 324 in MoneyRequestConformationList
to the following code, which will make us able to navigate to the details page of any user that is clicked
onSelectRow={canModifyParticipants ? this.toggleOption : option => Navigation.navigate(ROUTES.getDetailsRoute(option.login))}
After Applying these changes + optional change
https://github.com/Expensify/App/assets/77237602/724471be-da39-440c-b33c-f257140a02ae
Alternatively, we can refactor the entire SplitBillDetailsPage
not to use MoneyRequestConformationList
and render the details like we do on DetailsPage
Looks like something related to react-navigation
may have been mentioned in this issue discussion.
As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js
files should not be accepted.
Feel free to drop a note in #expensify-open-source with any questions.
I think this is the same as - https://github.com/Expensify/App/issues/20086 - asking
@Christinadobrzyn I think these are different.. This one relates to tooltip not being present and the other one is a modification for tooltip format
@esh-g you're right - these are different! Thanks for clarifying!
I can reproduce - adding external label
Job added to Upwork: https://www.upwork.com/jobs/~017795e0b76d1faee5
Current assignee @Christinadobrzyn is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External
)
Triggered auto assignment to @cristipaval (External
), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
waiting on proposals
https://github.com/Expensify/App/issues/20052#issuecomment-1573716590
@eVoloshchak @Christinadobrzyn bump on proposal review π
There are no tooltips in SplitBillDetailsPage
@expensify.sms
at the end. Solution:
showTitleTooltip
prop to OptionsSelector
in MoneyRequestConformationList.js
.OptionsListUtils.js
.
import * as PersonalDetails from './actions/PersonalDetails'; // + Added
... rest code
/**
* Get the participant options for a report.
* @param {Object} report
* @param {Array<Object>} personalDetails
* @returns {Array}
*/
function getParticipantsOptions(report, personalDetails) {
const participants = lodashGet(report, 'participants', []);
return _.map(getPersonalDetailsForLogins(participants, personalDetails), (details) => ({
keyForList: details.login,
login: details.login,
text: details.displayName,
firstName: lodashGet(details, 'firstName', ''),
lastName: lodashGet(details, 'lastName', ''),
alternateText: Str.isSMSLogin(details.login || '') ? LocalePhoneNumber.formatPhoneNumber(details.login) : details.login,
icons: [UserUtils.getUserAvatarIconObject(details.avatar, details.login)], // + Changed to a common function getUserAvatarIconObject
payPalMeAddress: lodashGet(details, 'payPalMeAddress', ''),
phoneNumber: lodashGet(details, 'phoneNumber', ''),
}));
}
...rest code
// + Added Function
/**
* @param {Object} personalDetail - personalDetail of the user
* @return {Object} commonParams - amount of the IOU
*/
function getCommonPersonalDetails(personalDetail) {
const displayName = PersonalDetails.getDisplayName(personalDetail.login, personalDetail);
return {
text: displayName,
login: personalDetail.login,
displayName,
participantsList: [{login: personalDetail.login, displayName}],
icons: [UserUtils.getUserAvatarIconObject(personalDetail.avatar, personalDetail.login)], // Used a common function getUserAvatarIconObject
}
}
/**
* Build the IOUConfirmation options for showing the payee personalDetail
*
* @param {Object} personalDetail
* @param {String} amountText
* @returns {Object}
*/
function getIOUConfirmationOptionsFromPayeePersonalDetail(personalDetail, amountText) {
return {
alternateText: personalDetail.login,
descriptiveText: amountText,
...getCommonPersonalDetails(personalDetail)
};
}
/**
* Build the IOUConfirmationOptions for showing participants
*
* @param {Array} participants
* @param {String} amountText
* @returns {Array}
*/
function getIOUConfirmationOptionsFromParticipants(participants, amountText) {
return _.map(participants, (participant) => ({
...participant,
...getCommonPersonalDetails(participant),
descriptiveText: amountText,
}));
}
...rest code
UserUtils.js
to make sure that we have a common function to get the avatar icon object.import * as LocalePhoneNumber from './LocalePhoneNumber'; // + Added
...rest code
/**
* Provided a source URL, if source is a default avatar, return the associated SVG.
* Otherwise, return the URL pointing to a user-uploaded avatar.
*
* @param {String} avatarURL - the avatar source from user's personalDetails
* @param {String} login - the email of the user
* @returns {String|Function}
*/
function getUserAvatarIconObject(avatarURL, login) {
return {
source: getAvatar(avatarURL, login),
name: LocalePhoneNumber.formatPhoneNumber(login),
type: CONST.ICON_TYPE_AVATAR,
};
}
...rest code
export {
...rest code
getUserAvatarIconObject, // + Added
};
ReportParticipantsPage.js
to fix the @expensify.sms
displaying for numbers.// import CONST from '../CONST'; - Removed as not used
... rest code
/**
* Returns all the participants in the active report
*
* @param {Object} report The active report object
* @param {Object} personalDetails The personal details of the users
* @return {Array}
*/
const getAllParticipants = (report, personalDetails) => {
const {participants} = report;
return _.chain(participants)
.map((login) => {
const userLogin = Str.removeSMSDomain(login);
const userPersonalDetail = lodashGet(personalDetails, login, {displayName: userLogin, avatar: ''});
return {
alternateText: userLogin,
displayName: userPersonalDetail.displayName,
accountID: userPersonalDetail.accountID,
icons: [UserUtils.getUserAvatarIconObject(userPersonalDetail.avatar, login)], // + Used a common function getUserAvatarIconObject
keyForList: userLogin,
login,
text: userPersonalDetail.displayName,
tooltipText: userLogin,
participantsList: [{login, displayName: userPersonalDetail.displayName}],
};
})
.sortBy((participant) => participant.displayName.toLowerCase())
.value();
};
...rest code
https://github.com/Expensify/App/assets/78416198/4ed9c46f-445b-496e-8a3c-a6f02e95d38b
https://github.com/Expensify/App/assets/78416198/4785ae10-0d69-4341-9d51-785ee74421b9
N/A
@eVoloshchak has to review the proposals
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
@eVoloshchak let us know if you'd like to see more proposals! Thanks!
@esh-g's proposal looks good to me!
MoneyRequestConfirmationList.js
was recently refactored, so exact prop names in proposal are outdated, but I agree with the general approach
πππ C+ reviewed! cc: @cristipaval
@eVoloshchak Please atleast look at my review even if you don't accept it π .
π£ @esh-g You have been assigned to this job by @cristipaval! 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 π
@cristipaval @eVoloshchak PR is here: https://github.com/Expensify/App/pull/20746
@eVoloshchak https://github.com/Expensify/App/issues/20052#issuecomment-1585568107 - Please review and comment on my proposal as where the code is going wrong or right. So that i know how to give my proposals better next time.
π― β‘οΈ Woah @eVoloshchak / @esh-g, great job pushing this forwards! β‘οΈ
The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus π
On to the next one π
@jeet-dhandha, your proposal is quite similar to @esh-g's proposal, with the exception of different changes to OptionsListUtils. Generally, the first proposal to correctly identify a root cause and to propose a fix for it - is a winning proposal. In this case time was the deciding factor, since both proposals are similar and both do resolve the issue
Nonetheless, thank you for the proposal, and excited to work with you on other issues in the future!
moving to weekly while PR is reviewed
PR was merged yesterday, will be deployed to staging soon
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.29-11 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-06-28. :confetti_ball:
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
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:
I don't think the BZ checklist is applicable here, this was a feature request, not a bug
@Christinadobrzyn I have sent a proposal on upwork. Here is my profile link: https://www.upwork.com/freelancers/~0186b1d7cc69656f22
Bumping to remind about payment @Christinadobrzyn
So sorry for the delay on this, i don't know how I missed this payment.
Paid @esh-g for contributor + 50% speed bonus Paid @Nathan-Mulugeta $250 as reporter
Pending hire for @eVoloshchak - you'll also have the speed bonus.
Internal job posting - https://www.upwork.com/ab/applicants/1665798844286881792/job-details External job posting - https://www.upwork.com/ab/applicants/1665798844286881792/job-details
@eVoloshchak feel free to accept the offer when you can and I'll pay this out! Sorry again for the delay
@Christinadobrzyn, no worries, thanks! I'll request the payment via NewDot instead, in a day or two
hey @eVoloshchak I don't think I have the ability to pay you with a company card via NewDot... is that a new thing?
Ah, found this - https://expensify.slack.com/archives/C02NK2DQWUX/p1686871517189609 - let me know when you reach out for payment @eVoloshchak
Requested the payment via NewDot
Awesome @eVoloshchak! I think this GH can be closed because I think the payment happens outside my control and through our accounting team. Do you want to confirm when you get paid and I'll keep tracking this?
Or I can close you can DM me if you don't get payment?
I think this GH can be closed because I think the payment happens outside my control and through our accounting team
Yeah, this can be closed, payment has been released, we can always open if there's a problem
Paid @eVoloshchak
If you havenβt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Tooltip should show up with their emails
Actual Result:
Tooltip not present on split bill details side panel
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.22.0
Reproducible in staging?: yes
Reproducible in production?: yes
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
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/93399543/896c10f0-52e0-49b5-9cb5-3e5fd401cf9e
https://github.com/Expensify/App/assets/93399543/b20c580c-b334-4d28-8dd0-487f95ad4d10
Expensify/Expensify Issue URL:
Issue reported by: @Nathan-Mulugeta
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1685513538554379
View all open jobs on GitHub
Upwork Automation - Do Not Edit