-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Support new emojiReaction data format #17996
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
Merged
Merged
Changes from all commits
Commits
Show all changes
83 commits
Select commit
Hold shift + click to select a range
46f1cca
Create a separate collection for reactions
tgolen f5de44f
Call the new toggle method
tgolen a7945e9
Display reactions in new format
tgolen 1b9f15f
Make sure toggling reactions works locally in onyx
tgolen af0fed2
Fix a few references to user account IDs and clean up code
tgolen b805586
Protect against report actions that don't have any reactions yet
tgolen 4d70bbd
Turn on API requests
tgolen 7698ad0
Merge branch 'main' into tgolen-migrate-reactions
tgolen 8aacb9f
Simplify the reaction data
tgolen cf4a396
Use the updated data structure
tgolen 5d0808b
Merge branch 'main' into tgolen-migrate-reactions
tgolen f88e62c
style
tgolen ea49f29
style
tgolen 36568e2
Get new emoji reactions displaying properly
tgolen 62f83fe
Add timestamp to requests when adding reactions
tgolen 8c31f4f
Add API parameter to use new data format
tgolen f93266e
Rename methods
tgolen 44d426a
Rename old toggle method
tgolen 5b99716
Provide a second toggle method for emojiReactions
tgolen b2781c9
Update for checking to see if someone already reacted
tgolen 9adef35
Merge branch 'main' into tgolen-migrate-reactions
tgolen c8369e5
style
tgolen d7221f6
Remove code that still uses old format
tgolen 34797c7
Remove more code referencing old reactions
tgolen 11c5380
Remove unused component
tgolen 2970f79
Get tests working for toggling reactions
tgolen c17e2ec
Update tests for adding reactions
tgolen b8add23
Get emojis removing properly
tgolen a51ede1
Merge branch 'main' into tgolen-migrate-reactions
tgolen cb9c262
Fix optimistic removal of emoji
tgolen f35e7bc
WIP on preserving order of reactions
tgolen 3de5adf
Merge branch 'main' into tgolen-migrate-reactions
tgolen 62464bd
Apply changes from main
tgolen 7d5eca7
Remove unused method
tgolen 28b31c9
Sort the reactions by timestamp so that they are always in the same o…
tgolen 02d333b
Merge branch 'main' into tgolen-migrate-reactions
tgolen 2394a42
Update from recent code changes
tgolen 2855cc0
Merge branch 'main' into tgolen-migrate-reactions
tgolen 729f2aa
Remove debug
tgolen 5ae68d6
Use negative values instead of strings
tgolen f26dacc
Remove unused parameter
tgolen 270e166
Share proptypes
tgolen 5f9dc09
Share more propTypes
tgolen 9f26e87
Remove unused method
tgolen 2994e00
Fix lint errors
tgolen b90fed1
Correct the tests when removing emoji
tgolen c24edaa
Disable eslint error
tgolen 5bf57b3
Merge branch 'main' into tgolen-migrate-reactions
tgolen 93012d7
Move ESLint disable to a better line
tgolen b518fcd
Add more data to the sorting key so that things will stay in order
tgolen 53c3b98
Merge branch 'main' into tgolen-migrate-reactions
tgolen e422147
Simplify onyx key for collection
tgolen 3d6f5a2
Add comment about cleanup task
tgolen 5227282
Rename method and fix proptypes
tgolen 6d60bee
Make the sorting work a little more reliably
tgolen 5cf209f
Replace prop that was mistakingly removed
tgolen 07ef367
Fix lint problem with propTypes
tgolen 149cb37
Fix prop reference and jsdocs
tgolen 69a05a5
Fix other JSDocs
tgolen da7d9fc
Merge branch 'main' of github.com:Expensify/App into tgolen-migrate-r…
stitesExpensify f2cf706
Fix emojiReaction prop name
stitesExpensify d11717b
Fix memo check
stitesExpensify 0c7396e
Merge branch 'main' of github.com:Expensify/App into tgolen-migrate-r…
stitesExpensify bf7f6f7
Fix test
stitesExpensify ccf50b0
Lint
stitesExpensify 979066a
Actually fix tests
stitesExpensify 0ed88fd
Fix counting of skintones
stitesExpensify f5fb5a1
Remove unnecessary lodash get
stitesExpensify 9d6e4e0
Fix quick reactions not properly removing emojis
stitesExpensify 86d836a
Only get users who have reacted to display tooltip, and pass as number
stitesExpensify f6593a4
Simplify counting and update variable name
stitesExpensify aa0c587
Fix bad check that would fail for skintone==0
stitesExpensify 47e6505
Fix bad merge
stitesExpensify 88e6d1a
Fix param documentation
stitesExpensify ae31431
Update name to follow conventions
stitesExpensify 066ad58
Check for undefined to account for 0
stitesExpensify f77421e
Start fixing merge conflicts
stitesExpensify 846d059
Finish merge
stitesExpensify a9e26e5
Style
stitesExpensify c46bd4b
Merge branch 'main' of github.com:Expensify/App into tgolen-migrate-r…
stitesExpensify 6d89fa9
Merge branch 'main' of github.com:Expensify/App into tgolen-migrate-r…
stitesExpensify b4d7e6e
Merge branch 'main' of github.com:Expensify/App into tgolen-migrate-r…
stitesExpensify 73ca137
Remove unused prop
stitesExpensify 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,31 @@ | ||
| import PropTypes from 'prop-types'; | ||
|
|
||
| /** All the emoji reactions for the report action. An object that looks like this: | ||
| "emojiReactions": { | ||
| "+1": { // The emoji added to the action | ||
| "createdAt": "2021-01-01 00:00:00", | ||
| "users": { | ||
| 2352342: { // The accountID of the user who added this emoji | ||
| "skinTones": { | ||
| "1": "2021-01-01 00:00:00", | ||
| "2": "2021-01-01 00:00:00", | ||
| }, | ||
| }, | ||
| }, | ||
| }, | ||
| }, | ||
| */ | ||
| export default PropTypes.objectOf( | ||
| PropTypes.shape({ | ||
| /** The time the emoji was added */ | ||
| createdAt: PropTypes.string, | ||
|
|
||
| /** All the users who have added this emoji */ | ||
| users: PropTypes.objectOf( | ||
| PropTypes.shape({ | ||
| /** The skin tone which was used and also the timestamp of when it was added */ | ||
| skinTones: PropTypes.objectOf(PropTypes.string), | ||
| }), | ||
| ), | ||
| }), | ||
| ); | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.