feat: Enable panel resizing on tablets and foldable devices#2884
Open
Elouan1411 wants to merge 16 commits intomainfrom
Open
feat: Enable panel resizing on tablets and foldable devices#2884Elouan1411 wants to merge 16 commits intomainfrom
Elouan1411 wants to merge 16 commits intomainfrom
Conversation
38b5d46 to
c717b1e
Compare
c717b1e to
fffad91
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a draggable separator to allow users to resize the two-pane UI on tablets and foldable devices, and persists the chosen pane ratio across sessions.
Changes:
- Add a drag separator UI (line + handle) to two-pane layouts (thread list and search).
- Implement touch-driven resizing logic in
TwoPaneFragment, with persistence viaLocalSettings/TwoPaneViewModel. - Adjust a few layouts for better responsiveness (empty state width handling, message date truncation).
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/res/values/dimens.xml | Adds new sizing dimens for min pane widths and drag separator visuals. |
| app/src/main/res/layout/view_empty_state.xml | Makes empty state content adapt better to wider containers. |
| app/src/main/res/layout/item_message.xml | Adds single-line truncation behavior for the message date. |
| app/src/main/res/layout/fragment_thread_list.xml | Adds the draggable separator view between list and thread panes. |
| app/src/main/res/layout/fragment_search.xml | Adds the draggable separator view between results list and thread pane. |
| app/src/main/res/drawable/item_vertical_drag_handle.xml | Adds selector drawable for the drag handle. |
| app/src/main/res/drawable/item_drag_line.xml | Adds selector drawable for the separator line. |
| app/src/main/java/com/infomaniak/mail/ui/main/search/SearchFragment.kt | Exposes the separator view to TwoPaneFragment. |
| app/src/main/java/com/infomaniak/mail/ui/main/folder/TwoPaneViewModel.kt | Stores/restores the left pane ratio and persists it. |
| app/src/main/java/com/infomaniak/mail/ui/main/folder/TwoPaneFragment.kt | Implements drag-to-resize and updated two-pane width computation. |
| app/src/main/java/com/infomaniak/mail/ui/main/folder/ThreadListFragment.kt | Exposes the separator view to TwoPaneFragment. |
| app/src/main/java/com/infomaniak/mail/data/LocalSettings.kt | Adds a persisted leftPaneRatio preference. |
Comments suppressed due to low confidence (1)
app/src/main/res/layout/item_message.xml:117
shortMessageDateis constrained start/end in a ConstraintLayout, but still useslayout_width="wrap_content". For ellipsizing to reliably work (as you already do forexpeditorName), it should be width0dp(match constraints) or setapp:layout_constrainedWidth="true"; otherwise it can measure beyond constraints and never ellipsize.
<TextView
android:id="@+id/shortMessageDate"
style="@style/Label.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/marginStandardSmall"
android:ellipsize="end"
android:lines="1"
app:layout_constraintBaseline_toBaselineOf="@id/expeditorName"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/scheduleSendIcon"
tools:text="9 déc 2021 à 11:00" />
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ble pressed state styling
ec33deb to
a803108
Compare
|
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
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.



No description provided.