-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add missing multi tag view #41351
Merged
+536
−218
Merged
Add missing multi tag view #41351
Changes from 16 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
2a4ba06
copy changes from 41337
s77rt 7477b7c
copy changes from 41337
s77rt 04b4088
add remaining changes
s77rt df022b8
remove required switch
s77rt 5b4a282
Use ListItemRightCaretWithLabel
s77rt c09c9c0
address some review comments
s77rt 5b5b3ad
Remove checkbox for multi-level tag
s77rt 700306d
Remove right arrow for multi-level tag
s77rt afed798
Fix alignment
s77rt cc3fff3
fix types
s77rt 4ce218a
Merge branch 'main' into add-multi-tag-view
s77rt 1b8ca5d
types
s77rt e48e289
Simplify getHeaderButtons
s77rt 7a82dc2
Memorize tagListKeyedByName
s77rt 0286c85
lint
s77rt c4bbded
Merge branch 'main' into add-multi-tag-view
s77rt 534fdf4
Merge branch 'main' into add-multi-tag-view
s77rt 1ed2c43
Prevent tag deletion if we have an accounting connection
s77rt 0803519
Prevent tag addition if we have an accounting connection
s77rt 3115665
Add missing policy (useOnyx)
s77rt eb2ba6f
lint
s77rt eafa904
Merge branch 'main' into add-multi-tag-view
s77rt 8e8a063
Simplify tags logic
s77rt dfbd051
remove unnecessary variable
s77rt b70ce49
better types
s77rt d72c619
Merge branch 'main' into add-multi-tag-view
s77rt 8935e0a
use correct state variable names
s77rt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/components/SelectionList/ListItemRightCaretWithLabel.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react'; | ||
import {View} from 'react-native'; | ||
import Icon from '@components/Icon'; | ||
import * as Expensicons from '@components/Icon/Expensicons'; | ||
import Text from '@components/Text'; | ||
import useTheme from '@hooks/useTheme'; | ||
import useThemeStyles from '@hooks/useThemeStyles'; | ||
|
||
type ListItemRightCaretWithLabelProps = { | ||
labelText?: string; | ||
shouldShowCaret?: boolean; | ||
}; | ||
|
||
function ListItemRightCaretWithLabel({labelText, shouldShowCaret = true}: ListItemRightCaretWithLabelProps) { | ||
const styles = useThemeStyles(); | ||
const theme = useTheme(); | ||
|
||
return ( | ||
<View style={styles.flexRow}> | ||
{!!labelText && <Text style={[styles.alignSelfCenter, styles.textSupporting, styles.pl2, styles.label]}>{labelText}</Text>} | ||
{shouldShowCaret && ( | ||
<View style={[styles.pl2]}> | ||
<Icon | ||
src={Expensicons.ArrowRight} | ||
fill={theme.icon} | ||
/> | ||
</View> | ||
)} | ||
</View> | ||
); | ||
} | ||
|
||
ListItemRightCaretWithLabel.displayName = 'ListItemRightCaretWithLabel'; | ||
|
||
export default ListItemRightCaretWithLabel; |
36 changes: 0 additions & 36 deletions
36
src/components/SelectionList/RightElementEnabledStatus.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this change needed? TS does not report that these optional chaining operators are necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah - problem here - that we have crash on this line - seem like TS types for data and country is not expecting to be undefined, but from API side it could :-)

just fyi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the context! Let's update the TS types for data and country to be optional then? to make sure that we're safely accessing them everywhere, not just here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated the type for
data
to be optional. We need to do the same for theConnection
object: bothquickbooksOnline
andxero
are optional. Tried to make that change here but caused ts errors onupdatePolicyConnectionConfig
. Let's create a separate issue to handle that