Skip to content

Add iPad mini avatar rail layout#2198

Draft
xsa-dev wants to merge 12 commits into
TelegramMessenger:masterfrom
xsa-dev:ipad-mini-avatar-rail
Draft

Add iPad mini avatar rail layout#2198
xsa-dev wants to merge 12 commits into
TelegramMessenger:masterfrom
xsa-dev:ipad-mini-avatar-rail

Conversation

@xsa-dev

@xsa-dev xsa-dev commented Jun 13, 2026

Copy link
Copy Markdown

Summary

Adds a compact iPad tablet split-layout state that collapses the master chat list to an avatar-only rail on narrow tablet widths, preserving more space for the currently open chat.

  • Use a 96pt compact master width for narrow tablet split layouts.
  • Add a persisted manual full/compact toggle via the split separator tap/drag handle.
  • Hide chat-list navigation/header tabs in compact rail mode so clipped search/compose controls do not remain visible.
  • Hide the bottom tab bar/search component while the compact rail is active to avoid invalid narrow search layout.
  • Clamp narrow chat-list text/title measurement widths to avoid invalid AsyncDisplayKit geometry.
  • Keep unread badges visible on avatars in the rail.

Test Plan

  • xcrun swiftc -frontend -parse submodules/Display/Source/Navigation/NavigationSplitContainer.swift
  • xcrun swiftc -frontend -parse submodules/ChatListUI/Sources/Node/ChatListItem.swift
  • xcrun swiftc -frontend -parse submodules/ChatListUI/Sources/Node/ChatListNode.swift
  • xcrun swiftc -frontend -parse submodules/ChatListUI/Sources/ChatListControllerNode.swift
  • xcrun swiftc -frontend -parse submodules/TabBarUI/Sources/TabBarContollerNode.swift
  • Built simulator target with Bazel:
    • build-input/bazel-8.4.2-darwin-arm64 build Telegram/Telegram ... --ios_multi_cpus=sim_arm64 --//Telegram:disableExtensions --//Telegram:disableProvisioningProfiles
  • Installed and launched on iPad mini (A17 Pro) Simulator, iOS 18.6.
  • Verified no recent assert, fatal, crash, or invalid bounds logs after launch.

Add an iPad compact sidebar state that collapses the chat list to an avatar rail, with drag/tap restoration to the regular master list. Hide compact-mode chrome that does not fit the rail and clamp narrow chat-list measurements to avoid invalid AsyncDisplayKit geometry.
@xsa-dev xsa-dev marked this pull request as draft June 13, 2026 22:26
@xsa-dev

xsa-dev commented Jun 13, 2026

Copy link
Copy Markdown
Author

Device validation update

This branch has now been built and installed on a real iPad mini device for local validation.

Validation performed:

  • generated a local Xcode/Bazel project with extensions disabled for a personal-device install
  • built the app for a physical iPad target
  • installed and launched the app on an iPad mini using a local development bundle identifier
  • verified that the modified app starts on-device and can log in when built with a local development Telegram API configuration

Known remaining issues / reason for draft:

  • this is still an iterative iPad mini UX/layout change and needs more real-device testing
  • there are remaining visual/interaction issues in the compact avatar-rail mode that should be cleaned up before review-ready status
  • the local device install required a separate development signing/API configuration and is not part of this PR

I am marking this PR as draft while these remaining compact-mode issues are investigated and fixed.

@xsa-dev

xsa-dev commented Jun 13, 2026

Copy link
Copy Markdown
Author

Follow-up fix pushed for a real-device compact-mode issue:

  • Keeps the localized StoryFeed.MyStory label visible for the current user's empty story item in compact/collapsed story rail state.
  • This makes the create-story affordance distinct from normal chat/user avatars: user avatar + plus badge + My Story label.
  • Verified locally with Swift parse.
  • Built a physical-device Bazel app and installed/launched build 3 on the iPad mini.

Commit: 592063fc fix: keep My Story label visible in compact rail

@xsa-dev

xsa-dev commented Jun 13, 2026

Copy link
Copy Markdown
Author

Follow-up after real-device feedback: the previous label-based approach did not fix the actual compact-rail UX.

Updated behavior:

  • In very narrow compact/avatar rail layouts (availableSize.width <= 120pt), the current user's empty story composer item is not inserted into the story peer list.
  • This prevents the first compact avatar from opening new-story when it visually reads like a normal chat/avatar.
  • If the user already has a story or a pending upload, the account story item is still kept.
  • Full-width / non-compact story list behavior remains unchanged.

Verified:

  • Swift parse passed for the changed story peer list files.
  • Device Bazel app built and signed.
  • Installed and launched on the physical iPad mini as com.xsadev.TelegramAvatarRail, build 5.

Commit: 47bf0ba1 fix: hide empty story composer in compact rail

@xsa-dev

xsa-dev commented Jun 13, 2026

Copy link
Copy Markdown
Author

Follow-up after testing folder-filter state (All + user-created folders): the issue is not the story composer path. The compact rail must not hide the folder-tabs state.

Updated behavior:

  • When tabContainerData has more than one entry (All + custom folders), compact iPad rail no longer suppresses the navigation header tabs.
  • This preserves HorizontalTabsComponent and folder switching in the compact-width state instead of hiding the only visible All/custom-folder control.
  • The previous story-composer workaround is reverted in this follow-up.

Verified:

  • Swift parse passed for ChatListControllerNode.swift and the story files restored to baseline.
  • Device Bazel app built and signed.
  • Installed and launched on physical iPad mini as com.xsadev.TelegramAvatarRail, build 7.

Commit: c0c74736 fix: preserve folder tabs in compact rail

@xsa-dev

xsa-dev commented Jun 13, 2026

Copy link
Copy Markdown
Author

Follow-up for compact folder rail UX:

  • Keep folder tabs (All + user folders) visible in compact rail.
  • Disable ChatListNavigationBar search in compact avatar rail (<=160pt), because the search panel is not useful there and crowds the folded UI.
  • Full-width behavior remains unchanged.

Verified:

  • Swift parse passed for ChatListControllerNode.swift.
  • Device Bazel app built/signed.
  • Installed and launched on physical iPad mini as com.xsadev.TelegramAvatarRail, build 8.

Commit: c8339d56 fix: hide search in compact folder rail

@xsa-dev

xsa-dev commented Jun 13, 2026

Copy link
Copy Markdown
Author

Follow-up from real iPad feedback: the compact rail should be clean and should not expose folder/search chrome.

Updated behavior:

  • In compact avatar rail (tablet && width <= 160pt), ChatListNavigationBar is hidden again regardless of folder tabs, so Search and All / custom folder pills are not shown.
  • The My Story entry remains visible as the first explicit item.
  • Disabled story-compose overscroll in the compact rail (composeContentOffset is not applied when the story list container width is <=120pt), removing the stray top + ... create-story strip while keeping My Story available.

Verified:

  • Swift parse passed for ChatListControllerNode.swift and StoryPeerListComponent.swift.
  • Bazel device app build completed successfully; Xcode wrapper still ends with the known framework Info.plist permission issue after Bazel success.
  • Installed and launched on physical iPad mini as com.xsadev.TelegramAvatarRail, build 9.

Commit: e7e40d3a fix: keep compact rail clean with my story

@xsa-dev

xsa-dev commented Jun 13, 2026

Copy link
Copy Markdown
Author

Follow-up from real iPad feedback: the compact rail must not leave an invisible/ambiguous own-story hit target at the top.

Updated behavior:

  • In compact story rail width (<=120pt), storySubscriptions.accountItem is skipped entirely.
  • This removes the hidden/ambiguous My Story tap area that looked like the first chat/avatar but opened the story viewer.
  • Full-width story list behavior is unchanged.

Verified:

  • Swift parse passed for StoryPeerListComponent.swift.
  • Bazel device app build completed successfully; Xcode wrapper still ends with the known framework Info.plist permission issue after Bazel success.
  • Installed and launched on physical iPad mini as com.xsadev.TelegramAvatarRail, build 10.

Commit: 31d69c44 fix: remove own story hit target from compact rail

@xsa-dev

xsa-dev commented Jun 13, 2026

Copy link
Copy Markdown
Author

Follow-up from real iPad feedback: the issue was not limited to My Story; the compact rail still showed the story strip, so the first visible avatar could open someone else's story.

Updated behavior:

  • In compact avatar rail (tablet && width <=160pt), effectiveStorySubscriptions is now forced to an empty subscription set.
  • This removes the story strip from the folded rail entirely, so top rail avatars should represent chats rather than stories.
  • Full-width behavior remains unchanged.

Verified:

  • Swift parse passed for ChatListControllerNode.swift.
  • Bazel reached Telegram app bundling/signing and produced a signed build 11 app; the Xcode wrapper/Bazel daemon then crashed with OOM after signing, but the signed .app existed and was verified.
  • Installed and launched on physical iPad mini as com.xsadev.TelegramAvatarRail, build 11.

Commit: f40d3291 fix: hide stories in compact avatar rail

@xsa-dev

xsa-dev commented Jun 13, 2026

Copy link
Copy Markdown
Author

Follow-up from real iPad feedback in filtered folders: hiding the visible story strip was not enough, because compact rail still had story top-inset / story camera gesture hooks, so the first item could still trigger story creation/viewer.

Updated behavior:

  • In compact avatar rail (tablet && width <=160pt), story top-inset expansion is disabled in ChatListContainerNode.
  • Story posting/right-edge gesture availability is disabled in compact rail.
  • storyCameraPanGestureChanged is not triggered in compact rail.
  • This is intended to make the first visible rail avatar behave as a chat item, including when the chat list is filtered by folders.

Verified:

  • Swift parse passed for ChatListControllerNode.swift.
  • Bazel device app build completed successfully; Xcode wrapper still ends with the known framework Info.plist permission issue after Bazel success.
  • Installed and launched on physical iPad mini as com.xsadev.TelegramAvatarRail, build 12.

Commit: 97cd6a81 fix: disable story gestures in compact rail

@xsa-dev

xsa-dev commented Jun 14, 2026

Copy link
Copy Markdown
Author

Follow-up from real iPad feedback: the top search/loupe placeholder itself should not exist, and the top rail space must not be an overlay or navigation hit-test area.

Updated behavior:

  • Removed the visual loupe placeholder completely.
  • Kept only an empty top spacer via ChatListContainerItemNode's listInsets.top += 74.0 in compact rail (width <= 160pt).
  • ChatListControllerNode still returns zero navigation height in compact rail, so upper avatars are regular list rows rather than sitting in a navigation/top overlay region.
  • Build installed on device as 12.8 (15).

@sabalandemichael2

sabalandemichael2 commented Jun 15, 2026 via email

Copy link
Copy Markdown

@CLAassistant

CLAassistant commented Jun 15, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

3 participants