-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 2024-04-25] [$125] No spacing between explanatory text and toggle button in "settings" #38370
Comments
Triggered auto assignment to @joekaufmanexpensify ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.No enough spacing What is the root cause of that problem?We don't have margin/ padding for text or switch button App/src/pages/workspace/categories/CategorySettingsPage.tsx Lines 70 to 75 in f1f22c7
we also don't have any logic to break new line for long text What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)NA Result |
Reproduced. |
Job added to Upwork: https://www.upwork.com/jobs/~014169e1c9001cba30 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
This is a super minor change/spacing issue. Feels like this might be a $125 issue, but we should fix it. |
Upwork job price has been updated to $125 |
ProposalPlease re-state the problem that we are trying to solve in this issue.The problem is that in multiple places throughout the codebase, the text next to a switch component is not properly formatted or aligned, causing inconsistent styling and layout issues. What is the root cause of that problem?The main issue here, is there is no margin. You normally don't see this because we are doing text wrapping. However, if the viewport width lines up just right it will be way to close to the switch. See example screens below. Case reported in original post root can be found here
What changes do you think we should make in order to solve the problem?To address this issue, I propose we audit the codebase and update all instances where we have text next to a switch that is not properly formatted. Specifically, we should:
<Text style={[styles.mr2]}> Cases I've found
Example Screens With Viewport Adjusted To Show IssueWhat alternative solutions did you explore? (Optional)An alternative could be to build the margin into |
ProposalPlease re-state the problem that we are trying to solve in this issue.No spacing between explanatory text and toggle button in Categories Settings page What is the root cause of that problem?Gap between both element is not mentioned. If explanatory text is long then it can push switch button out of view. If text grows it should automatically wrap to next link without disturbing position of switch. I'm using flex gap so that it can be screen responsive. What changes do you think we should make in order to solve the problem?
Code Preview<View style={[styles.mt2, styles.mh4]}>
<View style={[styles.flexRow, styles.mb5, styles.mr2, styles.alignItemsCenter, styles.justifyContentBetween, stylesUtils.spacing.gap5]}>
<Text style={[styles.textNormal, styles.colorMuted, styles.flexShrink1]}>{translate('workspace.categories.requiresCategory')}</Text>
<Switch
isOn={policy?.requiresCategory ?? false}
accessibilityLabel={translate('workspace.categories.requiresCategory')}
onToggle={updateWorkspaceRequiresCategory}
/>
</View> What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
@brandonhenry Are you saying that same problem exists on all of these pages? |
@parasharrajat yes, can provide screens shortly |
ProposalPlease re-state the problem that we are trying to solve in this issue.No spacing between text and toggle button in "settings". What is the root cause of that problem?The
However, when the text gets too long, the text expands its container until it touches the toggle button's container leaving no space between them.
I'm noticing this issue also on web when viewing the setting on the RHP. What changes do you think we should make in order to solve the problem?Since the text is the one that grows and shrinks based on the amount of words, I propose giving the // This is just for demo. We can create a class if needed or use an existing one if it exists for 'maxWidth'.
<Text style={[styles.textNormal, styles.colorMuted, {maxWidth: '85%'}]}>{translate('workspace.categories.requiresCategory')}</Text> This will ensure the text container's width only grows to a certain portion of its parent such that These percentages/numbers can be adjusted according to what's agreed upon by the design team. I've noticed there are a couple of other places such as In addition, some of the What alternative solutions did you explore? (Optional)None so far. |
@brandonhenry Yes please, present some visuals to confirm. |
@parasharrajat done. updated proposal. Also, since this took some deep dive and also affects multiple parts of the app - I think the bounty should be raised (at least to $250). Thoughts? @joekaufmanexpensify |
I like the idea of auditing the app and fixing this issue everywhere in the App in one go. Thus @brandonhenry's proposal sounds good to me. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @tylerkaraszewski, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Any feedback on my proposal or why using |
I think flexbox should be more flexible. There might be still be a case where percentage unit will take more than the necessary space. It usually happens when screen dimensions changes. |
@brandonhenry mind sharing the various places we're going to be updating this? |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.62-17 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 2024-04-25. 🎊 For reference, here are some details about the assignees on this 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:
|
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:
Regression Test Steps
Do you agree 👍 or 👎 ? |
Great. TY! I'll complete my portion of the checklist. |
IMO this is a very niche bug and does not require a regression test. |
Checklist is all set. |
We need to issue the following payments:
|
opened new job since other one is closed: https://www.upwork.com/jobs/~011f3cc2ed89c19798 |
@brandonhenry offer sent for $125! |
@parasharrajat could you please request $125 via NewDot and confirm here once complete? |
@joekaufmanexpensify I will request it later. Feel free to close it. |
@brandonhenry $125 sent and contract ended! |
Payment summary is here for when @parasharrajat later requests payment. All set! |
Based on the thread https://expensify.slack.com/archives/C02NK2DQWUX/p1715710167738659?thread_ts=1715190852.677769&cid=C02NK2DQWUX, I think the price set on the issue is incorrect. It should be the base price at that time which was 500 at that time. Given that we think it is a small issue, 250 sounds better. @joekaufmanexpensify thoughts? |
Brought to slack to discuss |
Discussed and landed on keeping the price as $125 here since I intentionally adjusted the price here because this was a very minor fix. |
Payment summary is here. |
Payment requested as per #38370 (comment) |
$125 approved for @parasharrajat |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.52-6
Reproducible in staging?: y
Reproducible in production?: 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
Expensify/Expensify Issue URL:
Issue reported by: @JmillsExpensify
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1710461880379559
Action Performed:
categories
>settings
Expected Result:
There should be spacing between the explanatory text and toggle switch
Actual Result:
No enough spacing
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: