Closed kbecciv closed 1 year ago
Triggered auto assignment to @jliexpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are ✅)iconRight
so that makes text to overflow without any padding to right paddingLeft: 8
to paddingRight: 8
on IsEnabledPage.js
we are using Section
component inside that we have props of wrapperStyle
we can pass paddingRight: 8
We can also apply solution as globally on MenuItem.js
if we don’t have shouldShowRightIcon
we are not rendering anything which makes the right padding issue we can also apply same padding or width to match with the left padding
We can apply padding:8
or width: variables.componentSizeNormal
that will match the left icon set
@kbecciv I can't access the Slack thread since it's in a different workspace (the Applause one). Was this posted in the general Expensify-Bugs channel?
Also, running the sentence through Google translate, the Spanish is a bit longer:
@dhairyasenjaliya - I'm curious about your proposal: is there any chance that you're able to share a mockup of what it might look like? I ask because I'd imagine we would want to keep everything visually consistent so I'm wondering if your proposal makes the spacing/alignment off (or the words smaller) vs if it's just that the Spanish translation is longer than the English one.
Basically, I'm trying to work out if this is an actual bug/issue or if it's just unfortunately due to the length of the Spanish translation.
Web - 2FA - "Disable two factor authentication" button text in Spanish is truncated at the end
The text in Spanish of menuItems is too long
, so it's truncated at the end.
https://github.com/Expensify/App/blob/23ca9a7907738e0bd0e0ad53957946097b090b94/src/pages/settings/Security/TwoFactorAuth/IsEnabledPage.js#L29-L38
Because the close icon take a lot of space and I think we're doing a danger action about app's security, I think we can change the menuItems
to Button
with danger style. So we should remove the menuItems
and add the Button inside Section, below the Text.
<Section
title={props.translate('twoFactorAuth.twoFactorAuthEnabled')}
icon={Illustrations.ShieldYellow}
containerStyles={[styles.twoFactorAuthSection]}
>
<View style={styles.mv3}>
<Text style={styles.textLabel}>{props.translate('twoFactorAuth.whatIsTwoFactorAuth')}</Text>
<Button
style={styles.mt5}
success
pressOnEnter
text={props.translate('twoFactorAuth.disableTwoFactorAuth')}
onPress={() => setIsConfirmModalVisible(true)}
danger
/>
</View>
</Section>
Here's how it looks:
If we still want to keep the menuItems
we can just remove the icon and add the styles danger to menuItems
.
The simple way, since we already explain the meaning of 2FA at the start of the page:
Two-factor authentication (2FA) helps keep your account safe. When logging in, you’ll need to enter a code generated by your preferred authenticator app.
We can use that word here
hey @jliexpensify basically once we have the long text and we do not have any right icon at that time we are not adding any padding to the right which makes the text display without padding this is inconsistency with the left padding below I have attached the screenshot of current code in which we have 0px padding from the right and on fix we are adding 8px padding which is consistency with left padding
Hmm ok, I'm still not convinced that this is an actual issue - I think it's to do with the length of the translation. I've asked internally what we should do and will keep this GH posted, thanks!
@jliexpensify as per your above query, it was posted in #expensify-bugs . Find it here . https://expensify.slack.com/archives/C049HHMV9SM/p1686216231940599.
Also, we have a lot of places in App, where exact Spanish translation isn't used. I think we have a native Spanish speakers' team doing that. And might not be the issue. However, for me, truncation should be padded well.
Found a similar bug related to turncation here https://github.com/Expensify/App/issues/16524?fbclid=IwAR03AI94y-WcZp9VKGmIon3Jn_3LOJVhFmRJ05cDuGUN4t6wGFuUrOa7mMo
Thanks for sharing the link @ashimsharma10 , I've updated the GH.
Funnily enough, I was assigned that issue you linked. That one was due to an actual regression and was missing the ...
when the text was truncated.
Let me check internally what we want to do - I could very likely be wrong here. I appreciate everyone's input in the meantime!
Hi everyone, just circling back to this issue: I have raised it and shared the proposals internally, and the decision was made to do nothing for now. internally, one of our Spanish-speaking engineers said that the message is still understandable even if it's truncated so there isn't a need to do anything here.
Thanks for everyone's proposals!
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:
Since its an important text it should not be truncated at the end. OR There should be right padding to maintain consistency with the left padding.
Actual Result:
Disable two factor authentication" button text in Spanish is truncated at the end
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.27.6
Reproducible in staging?: yes
Reproducible in production?: n/a
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/e3d37323-9a0f-4b57-a270-da417b78c9ff
https://github.com/Expensify/App/assets/93399543/95882ff6-1af7-4973-8147-0716903a93c6
Expensify/Expensify Issue URL:
Issue reported by: @ashimsharma10
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686216231940599
View all open jobs on GitHub