-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open reports at first unread action #51366
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
Open
janicduplessis
wants to merge
244
commits into
Expensify:main
Choose a base branch
from
janicduplessis:@janic/open-at-new
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
244 commits
Select commit
Hold shift + click to select a range
4a9ef9f
Open reports at first unread action
janicduplessis d3458ed
Remove not needed code
janicduplessis c49865c
Merge remote-tracking branch 'upstream/main' into @janic/open-at-new
janicduplessis 866106c
Merge remote-tracking branch 'upstream/main' into @janic/open-at-new
janicduplessis 4442d2d
Fix loading at unread when no cache
janicduplessis 87e1d6e
Merge branch 'main' into @janic/open-at-new
chrispader 57b4a7e
fix: `ReportUtils.isUnread` signature changed
chrispader d3f1c53
Merge branch 'main' into @janic/open-at-new
chrispader 21340a5
fix: ts error
chrispader aa6d447
fix: just check whether report is initially loading rather than wheth…
chrispader 38e084d
Merge branch 'main' into @janic/open-at-new
chrispader 3b89ab7
fix: add `canBeMissing` options to `useOnyx`
chrispader 2f02420
fix: default string id lint errors
chrispader 30eada3
fix: make canBeMissing false
chrispader b9b1cbe
fix: add condition for when user is offline
chrispader 44b8528
fix: scroll to end if first message is unread
chrispader 1c75d7a
fix: only scroll to top once
chrispader 6a2419e
fix: improve scrolling code
chrispader 55dd1f4
Merge branch 'main' into @janic/open-at-new
chrispader 6540565
Merge branch 'main' into @janic/open-at-new
chrispader 7dd1ba9
fix: typecheck
chrispader ab7fefa
fix: update unread indicator test
chrispader d9899db
Merge branch 'main' into @janic/open-at-new
chrispader 4c9768b
Merge branch 'main' into @janic/open-at-new
chrispader 73174dc
fix: don't immediately mark last message as read
chrispader d424e78
fix: improve scrolling logic
chrispader eac544d
fix: scrolling logic
chrispader 5b7d8ce
fix: only start render queue when it's not already rendering
chrispader 6d7d226
fix: initial loading when offline
chrispader 9277cd8
fix: mock new RenderTaskQueue function
chrispader a5f2338
fix: RenderTaskQueue mock
chrispader 531972f
Merge branch 'main' into pr/51366
chrispader ee538c7
Merge branch 'main' into @janic/open-at-new
chrispader 0d2e982
fix: initial scrolling in BaseInvertedFlatList
chrispader a3bda66
fix: TS error in jest test setup
chrispader 7d7f0a3
fix: only mark report as read when no newer messages
chrispader 0df5d06
fix: allow fetching new/old messages multiple times
chrispader d6ad10e
Merge branch 'main' into @janic/open-at-new
chrispader 7ab75e8
fix: TS and ESLint errors
chrispader f28a353
fix: more TS errors
chrispader 6a3f4bf
Merge branch 'main' into @janic/open-at-new
chrispader 4252442
fix: unread marker
chrispader b2e35b9
fix: only show floating message counter when we have an unread message
chrispader 6080aec
fix: prevent multiple calls to GetOlderActions/GetNewerActions at the…
chrispader 40c5a92
fix: prevent readNewestAction when report has not been unread
chrispader ddfcf16
fix: better variable names
chrispader bbba7ca
fix: update PaginationTest accordingly
chrispader bf15082
fix: remove test timeout
chrispader 8c4565c
fix: wait for list to emit initial load event before expecting in tests
chrispader f4f8db6
fix: improve unread indicator test
chrispader fd5ab55
Update CONST.ts
chrispader c706843
fix: better mock BaseInvertedFlatList
chrispader efc32e1
revert testing changes
chrispader f555e31
Merge branch 'main' into @janic/open-at-new
chrispader bee7bf7
fix: imports
chrispader aa3d0df
fix: readActionSkipped fix
chrispader 82db3c0
fix: wait for ReadNewestAction in test
chrispader 236e7a0
fix: remove timeout
chrispader 5aa401e
Merge branch 'main' into @janic/open-at-new
chrispader cc5a5b1
fix: eslint
chrispader 3fd5c41
Merge branch 'main' into @janic/open-at-new
chrispader 59e2475
fix: only call `onInitiallyLoaded` once and improve naming of variable
chrispader fbb0355
fix: add a max waiting time to GetNewerMessages/GetOlderMessages trigger
chrispader a42da60
fix: firefox chat scroll content cut off
chrispader 77305fe
Merge branch 'main' into @janic/open-at-new
chrispader c14e819
Merge branch 'main' into @janic/open-at-new
chrispader 917cf42
fix: add waitFor to Test
chrispader 056c6f6
remove unused import
chrispader 73b8633
fix: report screen not loading
chrispader a2958bd
Merge branch 'main' into @janic/open-at-new
chrispader 87e73dd
rename variable
chrispader b2bce90
feat: add oldestUnreadReportActionID to OpenReport
chrispader 5d9bee1
fix: initial unread message correct on empty cache
chrispader d17dae6
Update ReportScreen.tsx
chrispader 7947454
fix: ref types
chrispader 40d2814
fix: move Onyx operation to user action
chrispader 181fa61
fix: reset oldestUnreadReportActionID on new openReport
chrispader 8366ce9
refactor: simplify
chrispader 914223f
Merge branch 'main' into @janic/open-at-new
chrispader 2a51d0f
Merge branch 'main' into @janic/open-at-new
chrispader 4abee92
fix: spelling
chrispader 968788a
fix: use CONST.DEFAULT_NUMBER_ID instead of -1
chrispader 96aebf1
fix: eslint
chrispader 9762eda
pass down oldestUnreadReportActionID from backend
chrispader d14c710
fix: extract not found id
chrispader 80adb6f
Merge branch 'main' into @janic/open-at-new
chrispader ed7faec
Merge branch 'main' into @janic/open-at-new
chrispader e31d69a
fix: loading chats in offline mode
chrispader c5925c3
fix: remove console log
chrispader 9affe08
refactor: add default boolean value
chrispader 4ce35d6
refactor: remove unused code
chrispader 9bf5488
refactor: rename variable
chrispader 18ceb72
fix: add comments
chrispader 55a18d1
fix: readNewestAction logic after merge
chrispader 6b0097a
fix: simplify if statement
chrispader 5eee0da
Merge branch 'main' into @janic/open-at-new
chrispader 22539e6
refactor: simplify report ready conditions
chrispader 04a2615
Update Pagination.ts
chrispader 1167533
fix: update oldestUnreadReportActionID type
chrispader 5f02df7
fix: don't reset oldestUnreadReportActionID on every openReport call
chrispader 5297ea0
fix: use onyx value if available on first render
chrispader 6262c53
fix: isReportReady condition
chrispader 5c9188e
Update PaginationTest.tsx
chrispader db7bd71
Merge branch 'main' into @janic/open-at-new
chrispader 45e0f66
Update UnreadIndicatorsTest.tsx
chrispader 16fb1a1
Update useReportUnreadMessageScrollTracking.ts
chrispader 742bcb3
fix: prettier
chrispader 1c11181
refactor: simplify maintainVisibleContentPosition variable
chrispader 85093ee
refactor: improve props
chrispader b70a043
fix: animate container rather then children in `ActionSheetAwareScrol…
chrispader db95f6f
Revert "fix: animate container rather then children in `ActionSheetAw…
chrispader 28606ca
fix: animate container rather then children in `ActionSheetAwareScrol…
chrispader 2d82c4e
fix: list not loading smoothly
chrispader 1f15c70
fix: onyx value not cleared
chrispader 96df2d6
Update ReportScreen.tsx
chrispader 91aa0d8
fix: clear after setting the value
chrispader d76bcfa
fix: tests
chrispader 95921c8
remove console.log
chrispader 8709b9f
Merge branch 'main' into @janic/open-at-new
chrispader 6aaad85
dummy commit
chrispader ac3ace2
another dummy commit for triggering checks
chrispader 997f637
Merge branch 'main' into @janic/open-at-new
chrispader 6c206dd
fix: extract comment linking code to useFlatListScrollKey
chrispader 8167bc5
fix: improve naming of some variables
chrispader 1706d2e
feat: implement useWithFallbackRef hook
chrispader 9551c73
fix: extract more logic to useFlatListScrollKey and useFlatListHandle
chrispader afac60f
fix: deprecation warning
chrispader 2f9a92b
fix: invalid import
chrispader 7e9b9b2
fix: render content immediately in FlatListWithScrollKey
chrispader 93c298a
fix: typo
chrispader eeeae6b
revert: useFLatListScrollKey PR changes
chrispader 1c0cfc9
Merge branch 'main' into @janic/open-at-new
chrispader e5a7ffd
fix: rename hook useRefWithFallback for more clarity
chrispader ec423af
feat: make use of useFlatListHandle and useWithFallbackRef
chrispader 22b67e3
fix: missing property in useReportUnreadMessageScrollTracking call
chrispader 5d9aa08
fix: add missing property in ReportActionsList
chrispader 9161912
Merge branch 'main' into @janic/open-at-new
chrispader c8bd9dc
Merge branch 'main' into @janic/open-at-new
chrispader b2a5d6e
refactor: extract oldestUnreadReportActionID logic into separate hook
chrispader 109da8f
docs: add comments around the new hook
chrispader 6a73219
Merge branch 'main' into pr/51366
chrispader 8d24e0e
fix: recursive ref calling loop
chrispader a9545d9
Merge branch 'main' into @janic/open-at-new
chrispader 48ab5b8
refactor: move local constant PAGINATION_SIZE out of CONST
chrispader 34395f9
fix: invalid index in `scrollToIndex`
chrispader 8418480
Merge branch 'main' into @janic/open-at-new
chrispader 3f5c76f
Merge branch 'main' into @janic/open-at-new
chrispader ffb3c71
fix: isReportArchived missing in `isUnread` util function call
chrispader 4f30632
refactor: move Onyx.set call
chrispader 4bed196
fix: UnreadIndicatorsTest
chrispader 8321452
fix: disable deprecation warning to pass tests for now
chrispader c2e13cf
fix: deprecation warning
chrispader 67d7982
fix: another new isUnread function usage
chrispader 41c0073
Merge branch 'main' into @janic/open-at-new
chrispader 15cf348
Merge branch 'main' into @janic/open-at-new
chrispader bb2abba
Merge branch 'main' into pr/51366
chrispader 2fadbf4
Merge branch 'main' into pr/51366
chrispader 11390d3
docs: add comment about `REPORT_OLDEST_UNREAD_REPORT_ACTION_ID` colle…
chrispader 947134d
fix: eslint deprecation warning
chrispader f822b79
fix: remove unnecessary `eslint-disable-next` comments
chrispader d1a151f
fix: exit early if reportID is nullish
chrispader 3ea2db9
fix: remove race condition and use `Promise.finally`
chrispader 22e4a8a
fix: improve chat loading finalisation
chrispader aa76a22
fix: remove promises
chrispader 0358bf6
refactor: remove unused type
chrispader 4c30692
Merge branch 'main' into pr/51366
chrispader 9507ca6
fix: remove deprecation rule `eslint-disable` comments
chrispader d1fbb1e
fix: stop loading if no report action is loaded
chrispader 9a872ba
Merge branch 'main' into pr/51366
chrispader 8ab1d8f
Merge branch 'main' into pr/51366
chrispader a48582c
Merge branch 'main' into pr/51366
chrispader e311169
fix: report loading indicator on every open
chrispader 58e49a7
Merge branch 'main' into pr/51366
chrispader 3ecaeac
Merge branch 'main' into pr/51366
chrispader b28acad
feat: implement new search for unread report action ID in `Pagination…
chrispader 1e86e77
add comments and rename property
chrispader a53719e
feat: return found item from `getContinousChain`
chrispader a24520a
fix: remove `oldestUnreadReportActionID` changes
chrispader 8b05d99
fix: remove more old changes
chrispader 70fa0c7
unnecessary change
chrispader d52f129
fix: improve `usePaginatedReportActions` function signature
chrispader 80b980c
fix: remove unused `oldestUnreadReportActionID` prop in list componetns
chrispader a0c5210
fix: simplify PaginationUtils and return `resourceItem` restul
chrispader c70a883
refactor: use `resourceItem` for `linkedAction` and `oldestUnreadRepo…
chrispader 970609f
fix: invalid condition for `oldestUnreadReportActionID`
chrispader c6930d3
Merge branch 'main' into pr/51366
chrispader 766870f
fix: rename `usePaginatedReportActions ` option and fix linked/unread…
chrispader 136e1a7
remove log
chrispader 1f5c9fb
feat: show skeleton if report actions don't fill page
chrispader eba6789
fix: search oldest unread report action by initial `report.lastReadTime`
chrispader 7bf2e3c
feat: implement loading state for loading initial report actions
chrispader a5e7fb9
fix: search with `resourceItemPredicate` for last index
chrispader a0fae0d
remove empty line
chrispader 2b04286
remove logs
chrispader 7a076d2
fix: improve report ready conditions
chrispader f2bca6e
refactor: improve screen filling condition
chrispader af20a30
Merge branch 'main' into pr/51366
chrispader 594570a
refactor: add comments and minor refactors
chrispader f7ef85d
fix: remove redundant conditional
chrispader 7f1cd9b
fix: add missing `isInitiallyLoaded` dependency
chrispader 8f5f094
refactor: move variable
chrispader ffbb946
fix: start render task queue with delay
chrispader ec7c41b
fix: remove null for `currentDataID` instead of empty string
chrispader 9073cb0
refactor: remove unused `useEffect` deps
chrispader 7f3b5b0
fix: dependency array
chrispader f5d8323
fix: maintainVisibleContentPosition
chrispader 96f9672
fix: Expensicons deprecated
chrispader c70056c
fix: spell check
chrispader e7858f5
fix: RenderTaskQueue tests
chrispader a091b4f
fix: reduce Pagina`getContinuousChain` to one resource ID param
chrispader 06834f3
fix: add back external change
chrispader 641914c
fix: simplify `getContinousChain` logic
chrispader 7b8dbbb
Update usePaginatedReportActions.ts
chrispader 83c3b7c
Merge branch 'main' into pr/51366
chrispader 6cd8f46
fix: simplify
chrispader 357e222
fix: rename Expensicons variable
chrispader a22aec9
update comments
chrispader ea13a27
Merge branch 'main' into pr/51366
chrispader 482a607
refactor: extract changes to separate PRs
chrispader 618e933
refactor: extract more changes to separate PRs
chrispader 290df1e
fix: missing condition
chrispader 99d8152
refactor: move more changes
chrispader a38b82f
refactor: extract changes
chrispader 262cf44
Merge branch 'main' into @janic/open-at-new
chrispader b2d705d
Update Mobile-Expensify
chrispader 9d06d14
fix: TS and ESLint errors
chrispader deca4e5
fix: ESLint
chrispader 6ecce8c
revert: API changes
chrispader 1eca499
fix: prevent page merging when opening unread report action
chrispader 44a9efe
Merge branch 'main' into pr/51366
chrispader 80a7396
fix: missing `shouldLinkToOldestUnreadReportAction` option in `usePag…
chrispader 3f6c320
fix: keep condition for initial request load
chrispader d75a1af
fix: missing `shouldLinkToOldestUnreadReportAction` call
chrispader c296025
Merge branch 'main' into pr/51366
chrispader 56fbca9
Merge branch 'main' into pr/51366
chrispader 9d1f19c
fix: scrolling to bottom on new message snet
chrispader a898c50
Merge branch 'main' into pr/51366
chrispader 2841ff7
Merge branch 'main' into pr/51366
chrispader 0d9fc51
fix: invalid import
chrispader a4dc08d
Merge branch 'main' into pr/51366
chrispader 120aaf5
fix: remove unused backend response param
chrispader 82599b9
Merge branch 'main' into pr/51366
chrispader dab912d
Merge branch 'main' into pr/51366
chrispader bd52a44
Merge branch '@janic/open-at-new' of https://github.com/janicduplessi…
chrispader 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
3 changes: 0 additions & 3 deletions
3
...components/InvertedFlatList/BaseInvertedFlatList/getInitialPaginationSize/index.native.ts
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
src/components/InvertedFlatList/BaseInvertedFlatList/getInitialPaginationSize/index.ts
This file was deleted.
Oops, something went wrong.
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
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.
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.
how is this relevant if the last unread message is show at the bottom not the top?
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.
From Flatlist's
scrollToIndex()docs: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.
This is actually not needed anymore.