Skip to content

feat: Enable panel resizing on tablets and foldable devices#2884

Open
Elouan1411 wants to merge 16 commits intomainfrom
resize-for-fold
Open

feat: Enable panel resizing on tablets and foldable devices#2884
Elouan1411 wants to merge 16 commits intomainfrom
resize-for-fold

Conversation

@Elouan1411
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 24, 2026 11:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 via LocalSettings/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

  • shortMessageDate is constrained start/end in a ConstraintLayout, but still uses layout_width="wrap_content". For ellipsizing to reliably work (as you already do for expeditorName), it should be width 0dp (match constraints) or set app: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.

Comment thread app/src/main/java/com/infomaniak/mail/ui/main/folder/TwoPaneFragment.kt Outdated
Comment thread app/src/main/java/com/infomaniak/mail/data/LocalSettings.kt Outdated
Comment thread app/src/main/res/drawable/item_vertical_drag_handle.xml Outdated
Comment thread app/src/main/res/layout/fragment_thread_list.xml
Comment thread app/src/main/res/layout/fragment_thread_list.xml
Comment thread app/src/main/res/layout/fragment_search.xml Outdated
Comment thread app/src/main/java/com/infomaniak/mail/ui/main/folder/TwoPaneFragment.kt Outdated
Comment thread app/src/main/java/com/infomaniak/mail/ui/main/folder/TwoPaneFragment.kt Outdated
Comment thread app/src/main/res/layout/fragment_search.xml
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants