-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
feat(message-list): add new message list view model #10252
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
Draft
rafaeltonholo
wants to merge
15
commits into
thunderbird:main
Choose a base branch
from
rafaeltonholo:feat/9497/new-message-list-view-model
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.
Draft
feat(message-list): add new message list view model #10252
rafaeltonholo
wants to merge
15
commits into
thunderbird:main
from
rafaeltonholo:feat/9497/new-message-list-view-model
+3,695
−2,605
Conversation
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
c5fd504 to
9220017
Compare
9220017 to
01e3138
Compare
… AbstractMessageListFragment
…plementation with LegacyMessageListFragment
…ge list view model and MessageListFragment, loading initial configuration
01e3138 to
61d14ce
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Part of #9497.
Depends on #10170, #10227
Note
I may split this PR into smaller ones to make the review process more manageable. For now, I want to provide an overview of the intended approach for the new
MessageListViewModeland how we plan to integrate it with the existing message list implementation.MessageListFragmentimplementation to an abstract class implementationMessageListFragmenttoLegacyMessageListFragment, extendingAbstractMessageListFragmentMessageListFragment, extendingAbstractMessageListFragment`MessageListStateMachine, acting as a state machine wrapper for the Message List, including all the state transitions configurationMessageListPreferencessingleListOfandfactoryListOfto accept parametersMessageListPreferenceswith the legacy implementation of theMessageListFragmentvia abstract function override.SortTypestored in the newMessageListStatewith the legacy implementation of theMessageListFragmentvia abstract function override.Know issue
When the message list loads for the first time, we are not yet using the new state to load the message items. As a result, the SortType and the MessageList loading process are not synchronized. This leads to the app performing a sort operation after the items have loaded, which displays an animation as the items are sorted. This issue should be resolved once we start loading the message items using the new
MessageListState.How to test
The new
MessageListFragmentandMessageListStateare activated by a feature flag calledenable_message_list_new_state, which is enabled by default in development builds.Once you build and launch the app, it will automatically utilize the new
MessageListStatefor the above-mentioned features. Please ensure that all the message list features function as intended, particularly the sorting and preference changes.You can disable the feature flag by accessing the secret debug screen through the overflow button on the top bar. This is a good way to compare the new implementation with the old one.
Additionally, make sure that the legacy implementation continues to work as expected.