You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Awaiting payment][$250] [Track Tax] Selected tax rate is not marked with green check mark #39709
Version Number: 1.4.60-8 Reproducible in staging?: y Reproducible in production?: y Issue reported by: Applause - Internal Team
Action Performed:
Precondition:
User is an employee of Collect workspace.
The Collect workspace has at least 9 tax rates.
Go to staging.new.expensify.com
Go to workspace chat.
Go to FAB > Request money > Manual.
Enter amount > Next.
On confirmation page, click Show more > Tax.
Select a tax rate.
Open Tax list again.
Enter any term in search field and clear it.
Expected Result:
The selected tax rate should be marked with a green check mark because it will confuse the users when there is no highlight and check mark on the selected tax rate in a long list of rates.
Actual Result:
The selected tax rate is not marked with a green check mark. After clearing the search field, the selected item is not highlighted which will confuse the users.
Workaround:
n/a
Platforms:
Which of our officially supported platforms is this issue occurring on?
@anmurali I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
and we compare it with the same sections passed to SelectionList inside CategoryPicker.tsx
We will notice that isSelected is missing from the data related to the selected item. SelectionList needs this attribute isSelected to display the green check mark.
As we can see here CategoryPicker add isSelected: true to the data with the received value selectedCategory
changed the title [-]Taxes - Selected tax rate is not marked with green check mark[/-][+][$250] Taxes - Selected tax rate is not marked with green check mark[/+]on Apr 9, 2024
@MonilBhavsar@anmurali I think we should process payment here for both contributor and C+ because the proposal has been accepted and PR was in progress.
changed the title [-][$250] [Track Tax] Selected tax rate is not marked with green check mark[/-][+][Awaiting payment][$250] [Track Tax] Selected tax rate is not marked with green check mark[/+]on Jun 6, 2024
Activity
melvin-bot commentedon Apr 5, 2024
Triggered auto assignment to @anmurali (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.kbecciv commentedon Apr 5, 2024
We think that this bug might be related to #wave-collect - Release 1
kbecciv commentedon Apr 5, 2024
@anmurali I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
FitseTLT commentedon Apr 5, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Taxes - Selected tax rate is not marked with green check mark
What is the root cause of that problem?
We are not setting
isSelectedas true for selected option for the sections we are passing hereApp/src/components/TaxPicker.tsx
Lines 63 to 64 in 823e9c9
What changes do you think we should make in order to solve the problem?
We should set
isSelectedas true in these two placesApp/src/libs/OptionsListUtils.ts
Lines 1284 to 1287 in 823e9c9
App/src/libs/OptionsListUtils.ts
Lines 1332 to 1333 in 823e9c9
and change
App/src/libs/OptionsListUtils.ts
Line 1279 in 823e9c9
and then add here
App/src/libs/OptionsListUtils.ts
Lines 1266 to 1267 in 823e9c9
What alternative solutions did you explore? (Optional)
dragnoir commentedon Apr 5, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Taxes - Selected tax rate is not marked with green check mark
What is the root cause of that problem?
The issue is happening with Tax rate and not categories (I picked categories as a working example)
If we console.log the
sectionspassed toSelectionListinsideTaxPicker.tsxApp/src/components/TaxPicker.tsx
Lines 70 to 71 in 7dcb3e0
and we compare it with the same
sectionspassed toSelectionListinsideCategoryPicker.tsxWe will notice that
isSelectedis missing from the data related to the selected item.SelectionListneeds this attributeisSelectedto display the green check mark.As we can see here
CategoryPickeraddisSelected: trueto the data with the received valueselectedCategoryApp/src/components/CategoryPicker.tsx
Lines 37 to 43 in 5ba54d1
Same with
TaxPicker, we have theselectedTaxRatebut we are missingisSelected: truehereApp/src/components/TaxPicker.tsx
Lines 54 to 59 in 7dcb3e0
What changes do you think we should make in order to solve the problem?
1- add
isSelected: truehereconst selectedOptions = useMemo(() => { if (!selectedTaxRate) { return []; } return [ { name: selectedTaxRate, enabled: true, accountID: null, + isSelected: true, }, ]; }, [selectedTaxRate]);2- The new data will be passed to
getTaxRatesSectionto create thesectionsApp/src/components/TaxPicker.tsx
Line 63 in 7dcb3e0
we shouls add
isSelected: option.isSelectedherereturn { modifiedName: option.name, isDisabled: !!taxRateObject?.isDisabled, + isSelected: option.isSelected, };3- the new data from
getTaxRatesSectionwill be passed togetTaxRatesOptionsApp/src/libs/OptionsListUtils.ts
Line 1337 in 4b59e6a
We need to add
isSelected: taxRate.isSelectedherereturn taxRates.map((taxRate) => ({ text: taxRate.modifiedName, keyForList: taxRate.modifiedName, searchText: taxRate.modifiedName, tooltipText: taxRate.modifiedName, isDisabled: taxRate.isDisabled, data: taxRate, + isSelected: taxRate.isSelected, }));POC:
20240405_160556.mp4
Link for a test branch: https://github.com/dragnoir/App/tree/39709-mos-test
melvin-bot commentedon Apr 8, 2024
@anmurali Whoops! This issue is 2 days overdue. Let's get this updated quick!
anmurali commentedon Apr 9, 2024
Makes sense to fix this as it would be consistent with the design for other fields

[-]Taxes - Selected tax rate is not marked with green check mark[/-][+][$250] Taxes - Selected tax rate is not marked with green check mark[/+]33 remaining items
hoangzinh commentedon May 14, 2024
@MonilBhavsar @anmurali I think we should process payment here for both contributor and C+ because the proposal has been accepted and PR was in progress.
FitseTLT commentedon May 17, 2024
bump @anmurali for the payment. The PR was on the final review stage so Payment is due. Thx.
FitseTLT commentedon Jun 6, 2024
@anmurali Can u pls process the payment here, it is super ooooverdue?
[-][$250] [Track Tax] Selected tax rate is not marked with green check mark[/-][+][Awaiting payment][$250] [Track Tax] Selected tax rate is not marked with green check mark[/+]anmurali commentedon Jun 21, 2024
everyone's been paid.