App icon indicating copy to clipboard operation
App copied to clipboard

Add Tooltips to all non-text actions/buttons in New Expensify

Open mananjadhav opened this issue 5 years ago • 71 comments

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:

  1. Click on '+' icon on Chat
  2. Click on Add attachment and select an image
  3. AttachmentModal opens and has an action for download but no text

This has to be handled at multiple places such as Workspace Image Picker, Profile Picture Image Picker, etc.

Expected Result:

This is how Whatsapp shows image

Actual Result:

Shows no tooltip/text right now. Only icons.

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation Upwork job link: https://www.upwork.com/ab/applicants/1426188061929398272/job-details

View all open jobs on Upwork

mananjadhav avatar Aug 07 '21 16:08 mananjadhav

Triggered auto assignment to @zanyrenney (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

MelvinBot avatar Aug 07 '21 16:08 MelvinBot

Proposal

Enclose all the action items with <Tooltip text={text}> component, which will be picked from translation.

For example, download button would require changes

In HeaderWithCloseButton, downloadButton block would look like:


props.shouldShowDownloadButton && (
	<Tooltip text={props.translate('common.download')}>
	    <TouchableOpacity
	        onPress={props.onDownloadButtonPress}
	        style={[styles.touchableButtonImage]}
	    >
	        <Icon src={Download} />
	    </TouchableOpacity>
    </Tooltip>
)

and translations would be as followed:

In en: {
	common: {
		download: 'Download'
	}
}

and es: {
	common: {
		download: 'Descargar'
	}
} 

mananjadhav avatar Aug 07 '21 16:08 mananjadhav

Triggered auto assignment to @ctkochan22 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Aug 09 '21 09:08 MelvinBot

sorry @ctkochan22 accidentally unassigned you so reassigned

zanyrenney avatar Aug 09 '21 09:08 zanyrenney

Triggered auto assignment to @michaelhaxhiu (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Aug 10 '21 18:08 MelvinBot

Triggered auto assignment to @michelle-thompson (Design), see these Stack Overflow questions for more details.

MelvinBot avatar Aug 13 '21 14:08 MelvinBot

Sorry on the delay! Let's get quick input from Design, since this will be a UI theme that's widespread in New Expensify.

michaelhaxhiu avatar Aug 13 '21 14:08 michaelhaxhiu

Makes sense to me.

shawnborton avatar Aug 13 '21 14:08 shawnborton

Do we want to use the same UI theme as WhatsApp? Or do we want a specific spacing, font, and tooltip box?

michaelhaxhiu avatar Aug 13 '21 14:08 michaelhaxhiu

We already have a tooltip component in our codebase (@mananjadhav referenced it above) that looks like this: image

shawnborton avatar Aug 13 '21 14:08 shawnborton

I totally missed that Manan referenced to re-use that existing UI theme 🤦 . Sorry!

That makes perfect sense. Posting this to upwork and removing Design label if we are ready to go here.

michaelhaxhiu avatar Aug 13 '21 14:08 michaelhaxhiu

Upwork job added to GH body, and also accessible here.

@mananjadhav please propose to take the job on Upwork and we'll hire you as soon as an engineer has reviewed your proposal (above).

michaelhaxhiu avatar Aug 13 '21 14:08 michaelhaxhiu

Triggered auto assignment to @iwiznia (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

MelvinBot avatar Aug 13 '21 14:08 MelvinBot

@mananjadhav proposal looks good. @michaelhaxhiu go ahead and hire in upwork

iwiznia avatar Aug 13 '21 14:08 iwiznia

I’ll post as soon as my current PR is merged. Thanks.

mananjadhav avatar Aug 13 '21 15:08 mananjadhav

Hired.

michaelhaxhiu avatar Aug 13 '21 19:08 michaelhaxhiu

@iwiznia When I add a tooltip to the FAB, it doesn't follow correct positioning. I guess It doesn't support absolute items.

image

Do you have an idea if we're using Tooltip on any other absolute positioned element? Otherwise, adding a tooltip to the FAB will require changes in the Tooltip code.

mananjadhav avatar Aug 16 '21 22:08 mananjadhav

Ah, no idea, probably not used in absolute positioned elements. Let's skip adding the tooltip to it then.

iwiznia avatar Aug 17 '21 10:08 iwiznia

One interesting idea I saw from another product (Linear) was that once one tooltip was open, as soon as you hover to the next icon, the tooltip would instantly fire instead of using a delay. Certainly not a requirement for this issue but just wanted to share the idea here.

shawnborton avatar Aug 17 '21 15:08 shawnborton

That’s a nice UX to have.

mananjadhav avatar Aug 17 '21 15:08 mananjadhav