-
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 2023-10-05] [$1000] Add support for accountIDs in mentions on the client #26306
Comments
Current assignee @puneetlath is eligible for the NewFeature assigner, not assigning anyone new. |
Job added to Upwork: https://www.upwork.com/jobs/~01544767e1c8edfd0d |
Current assignee @puneetlath is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia ( |
Can contributors work on this feature? I would love to work on this |
Yes, feel free to submit a proposal for how you'll do it. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Add support for accountIDs in mentions What is the root cause of that problem?Functionality is not implemented. What changes do you think we should make in order to solve the problem?The mention tag is processed in the 1. Connect with Onyx (instead of using withOnyx({
personalDetails: {
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
},
}); 2. Get the data we want to display: const htmlAttribAccountID = lodashGet(props.tnode.attributes, 'accountID');
if (!_.isEmpty(htmlAttribAccountID)) {
const user = lodashGet(props.personalDetails, htmlAttribAccountID);
displayName = lodashGet(user, 'login', '') || lodashGet(user, 'displayName', '') || Localize.translateLocal('common.hidden');
...
} else {
// Existing logic
... We could use the existing util function 3. Replace
+ const navigationRoute = _.isEmpty(htmlAttribAccountID) ? ROUTES.getDetailsRoute(displayName) : ROUTES.getProfileRoute(htmlAttribAccountID);
...
return (
...
<TextLink
- href={ROUTES.getDetailsRoute(loginWithoutLeadingAt)}
- onPress={() => showUserDetails(loginWithoutLeadingAt)}
+ href={navigationRoute}
+ onPress={() => Navigation.navigate(navigationRoute)} What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.Add support for accountIDs in mentions What is the root cause of that problem?No RC - Feature Request What changes do you think we should make in order to solve the problem?We need to do multiple changes here.
Based on the above two changes we need to figure out which have to follow the things.
props.tnode.set("hi@text.com") This needs to be tested (98%) confirm this should work hi@text.com is example user found by personaldetaillist
After all some proper logic changes needed to figure out which should render when. All these changes are being done inside What alternative solutions did you explore? (Optional)NA |
Hi. So you want to show differenct Page by accountID right? |
Then Where can we fetch the accountID info from? API, Local Vairable or Cookie. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Implement support for accountIDs in mentions. What is the root cause of that problem?Mentions currently do not support accountIDs What changes do you think we should make in order to solve the problem?To implement this behavior, we first need to check if there is an accountID present in props.tnode. If not, we should leave the email that was included in the mention. If there is an accountID, we should check if there is a login for that account in the personalDetailsList. If there is, we show the email of that login, if there is not, we show the display name. If that accoundID is not in the personalDetailsList at all, we show the mention as @hidden. We also need to update the link - if there is an accountID present, we should replace App/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js Lines 49 to 57 in 03d13f7
What alternative solutions did you explore? (Optional)N/A |
📣 @Benjamin0427! 📣
|
Demo for the my proposal. Kapture.2023-08-31.at.00.02.17.mp4PS: That delay is because of the API request and response override delay. Maybe I forgot to do something but altogether the main objective is completed. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Add support for accountIDs in mentions What is the root cause of that problem?New Feature. What changes do you think we should make in order to solve the problem?To accomplish this we would:
What alternative solutions did you explore? (Optional)xx |
@thesahindia any thoughts on the proposals so far? |
Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
@puneetlath @thesahindia I wanted to verify the expected behavior for @hidden mentions: should they also have a tooltip and link to /a/(account id)? Or would it be more fitting if the tooltip was removed and the cursor is changed to default (rather than a pointer)? Thanks. |
It makes sense to me! |
@puneetlath I'm sorry, doesn't we have the rule first proposal (good proposal) gets assigned the bug? Just like did in this issue? #26706 |
Hey @b4s36t4. I think in this case, it's too tough to see a clear history around whose proposal said what at which time. Given that this is a feature request and the requirements were mostly laid out in the original issue, I'm comfortable going forward with @samh-nl. @samh-nl in the future, as a best practice, it's best to post a new comment indicating that you've updated your proposal whenever updating it. That will help reduce this type of conflict on the issue. |
I can understand but It's being happened in multiple issues and I have seen people selecting the issues which are posted first without checking the version history nor asking for any detailing if the proposals are same. Maybe some rules with C+ would solve this. I have been a victim of these type of situations 4 times now and it's so hurting not to get equal opportunity. Anyways thanks for responding, hoping you'd make some rules to overcome this issues. |
@thesahindia Thanks for confirming. |
@b4s36t4 I'll raise a discussion internally about comment editing and whether we should update our process in some way to account for it. |
📣 @situchan 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Re-assigning @situchan as C+ |
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one 🚀 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.74-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-10-05. 🎊 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.
For reference, here are some details about the assignees on this issue: As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
All paid. Thanks y'all! |
Currently, mentions are purely login based. They take the form of
<mention-user>@blah@test.com</mention-user>
. Let's update mentions to support accountIDs. That means:<mention-user accountID=1234>@blah@test.com</mention-user>
or<mention-user accountID=1234 />
) then we should use the accountID to render the mention. We should look at the personalDetailsList in Onyx and render the mention using the information for that accountID.@hi@test.com
instead of@blah@test.com
.@Bob Smith
@Hidden
/a/1234
<mention-user>@blah@test.com</mention-user>
) then we should continue to render the mention just as we do today.Currently the API does not send the accountID as part of the mention, so you will need to use mock data to test and build this functionality.
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: