-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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-03-16] [$2000] Web - Emoji - There is no tooltip for the category picker #15108
Comments
Triggered auto assignment to @trjExpensify ( |
Bug0 Triage Checklist (Main S/O)
|
This is a recent feature we released here, asking in this thread on the expected behaviour. |
Great catch, I agree with Applause that we just overlooked this and should close the gap. |
Alrighty, moving it on. CC: @stitesExpensify for vis |
Job added to Upwork: https://www.upwork.com/jobs/~010a0b351e969622b9 |
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 - @aimane-chnaif ( |
Triggered auto assignment to @robertjchen ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.There is no tooltip present for category shortcut icons What is the root cause of that problem?This is happening because we were not using Tooltip initially for these icons. (This is more like a feature request or improvement) What changes do you think we should make in order to solve the problem?To fix this we need to first pass the translation key for all the category headers here. // Example Code for EmojiUtils.js
function getHeaderCodes(emojis, headerIndices = []) {
return _.map(!_.isEmpty(headerIndices) ? headerIndices : getHeaderIndices(emojis), headerIndex => emojis[headerIndex].code);
} We'll be using the above function inside // Example code
this.headerIndices = EmojiUtils.getHeaderIndices(allEmojis);
this.headerCodes = EmojiUtils.getHeaderCodes(allEmojis, this.headerIndices); After that we need to use Resultdemo-emoji-tooltip.mp4 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Within web we have to show tooltip when mouse over on emoji picker category icon. What is the root cause of that problem?Tooltip not used within What changes do you think we should make in order to solve the problem?I think solution is pretty simple and clean as explained below: Within App/src/components/EmojiPicker/CategoryShortcutBar.js Lines 26 to 31 in 1180571
So within const CategoryShortcutBar = (props) => {
const icons = [Smiley, AnimalsAndNature, FoodAndDrink, TravelAndPlaces, Activities, Objects, Symbols, Flags];
// *** Add this code ***
// Prepare array of translation keys to show as tooltip for each category icon
const tooltipTextKeys = _.map([
'smileysAndEmotion',
'animalsAndNature',
'foodAndDrink',
'travelAndPlaces',
'activities',
'objects',
'symbols',
'flags',
], item => `emojiPicker.headers.${item}`);
// If the user has frequently used emojis, there will be 9 headers, otherwise there will be 8
if (props.headerIndices.length === 9) {
icons.unshift(FrequentlyUsed);
tooltipTextKeys.unshift('emojiPicker.headers.frequentlyUsed'); // *** Add this code ***
}
return (
<View style={[styles.pt2, styles.ph4, styles.flexRow]}>
{_.map(props.headerIndices, (headerIndex, i) => (
<CategoryShortcutButton
icon={icons[i]}
onPress={() => props.onPress(headerIndex)}
key={`categoryShortcut${i}`}
tooltipText={props.translate(tooltipTextKeys[i])}. // *** Add this code ***
/>
))}
</View>
);
} Within App/src/components/EmojiPicker/CategoryShortcutButton.js Lines 39 to 46 in 1180571
So within const propTypes = {
/** Tooltip text to show when mouse over (Add this code) */
tooltipText: PropTypes.string.isRequired,
};
<Tooltip
text={this.props.tooltipText}
shiftVertical={-7}
>
<View style={styles.alignSelfCenter}>
<Icon
fill={themeColors.icon}
src={this.props.icon}
height={variables.iconSizeNormal}
width={variables.iconSizeNormal}
/>
</View>
</Tooltip> So this solution is efficient and requires minimum code changes. It will also take care to show tooltip in corresponding language when language changed as shown in result video below. Also it will keep button size consistent in all platform as other platform does not show tooltip. What alternative solutions did you explore? (Optional)None Result video:WebWeb.mp4iOSiOS.movAndroidAndroid.mov |
@aimane-chnaif what do you think of this proposal? |
Assigning myself as well so I can keep track of this one as part of the tracking issue. |
@shawnborton which one is preferred? |
@aimane-chnaif Based on this comment and this response, should we go ahead with 2px? And complete the checklist ? Or do you recommend waiting more? |
Let's wait a bit more until design confirmation. |
@aimane-chnaif I've update the change to have 2px. Because it was somewhat agreed earlier and you're also okay with it. Just to ensure that if I am offline later (and we get confirmation), it shouldn't block you from testing. If changes are requested, for 0px or 4px, I'll try to do them asap. Meanwhile, is there any other change/feedback that needs to be worked upon? I am online for a few hours, so I can close them. Thank you very much for your time. |
I've already done reviewing and testing and after design confirmation, ready to fill checklist and approve on my side immediately. |
@aimane-chnaif Can you add @stitesExpensify as a reviewer? When I requested your review again I don't know how it removed them. I can't seem to be able to add anybody. |
I also don't have permission. It's not your mistake. It often happens so seems github automation bug. |
I think I like 4px since that is a standard spacing unit for us. |
@shawnborton Okay I've updated the spacing to 4px. cc - @aimane-chnaif if you want to test again. |
For clarity for the bugZero assignee (@trjExpensify) we had this on hold, and then I was OOO and delayed the merging of this. This issue should be eligible for the speed bonus |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.80-2 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-03-16. 🎊 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:
|
Looks like something related to 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 Feel free to drop a note in #expensify-open-source with any questions. |
@trjExpensify @aimane-chnaif While this is ready for payout today, is there anything that you want me to do? I am not sure if we would treat this as a bug. This was like a feature request, and we added the category picker in this PR #14532 |
I agree this is a feature request, not a bug |
Yep, makes sense. Okay, so can I confirm these are the amounts due?
|
Yes @trjExpensify I think so :) |
Cool, thanks. I've sent you both offers! |
Accepted @trjExpensify thank you. |
Excellent, settled up! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Issue found when executing PR #14532
Action Performed:
Expected Result:
When hovering over one of the category pickers, a tooltip containing the name of the category should appear.
Actual Result:
There is no tooltip for the category picker
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.71.0
Reproducible in staging?: Yes
Reproducible in production?: No - New feature
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
Recording.2152.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: