[PR #25634] feat(mobile): timeline - add bottomWidgetBuilder #18319

Open
opened 2026-02-05 16:36:25 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/25634
Author: @PeterOmbodi
Created: 1/28/2026
Status: 🔄 Open

Base: mainHead: feature/select_all_in_timeline


📝 Commits (5)

  • 1992c05 feat(mobile): timeline - add selectable all-assets control
  • b46ae81 Merge remote-tracking branch 'origin/main' into feature/select_all_in_timeline
  • 41bedef feature(mobile): introduce bottomWidgetBuilder in Timeline
  • 905df8a fix(mobile): remove redundant code
  • a7e7f70 refactor(mobile): refactor new code in Timeline

📊 Changes

1 file changed (+28 additions, -8 deletions)

View changed files

📝 mobile/lib/presentation/widgets/timeline/timeline.widget.dart (+28 -8)

📄 Description

Description

In some timeline modes, it is necessary to support bulk actions for all assets, while the current implementation of the new timeline only allows selecting individual assets or groups by date. For example, this affects the Trash view and the in-progress Trash Synchronization Review screen. This PR proposes adding a bottomWidgetBuilder to address this limitation.

Solution #

bottomWidgetBuilder is a callback with parameters context, isSelectionMode, and isMultiSelectEnabled, which allows delegating the widget construction logic with the required parameters.

        bottomWidgetBuilder: (_, _, isMultiSelectEnabled) {
          return isMultiSelectEnabled ? const TrashBottomBar() : const TrashAllActionsBar();
        },

bottomWidgetBuilder should be used instead of the bottomSheet parameter, while preserving the existing behavior for widgets that do not use bottomWidgetBuilder.

The new controll

https://github.com/user-attachments/assets/6c5f55f0-bda8-40b7-97da-1239a0262d68

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

...


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/25634 **Author:** [@PeterOmbodi](https://github.com/PeterOmbodi) **Created:** 1/28/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feature/select_all_in_timeline` --- ### 📝 Commits (5) - [`1992c05`](https://github.com/immich-app/immich/commit/1992c05c4c7e3a75c767873879f407a612a3e160) feat(mobile): timeline - add selectable all-assets control - [`b46ae81`](https://github.com/immich-app/immich/commit/b46ae818a08de8cfbffece2fdc779bfe27a187fc) Merge remote-tracking branch 'origin/main' into feature/select_all_in_timeline - [`41bedef`](https://github.com/immich-app/immich/commit/41bedef1a1c0e86d0b059a6e01a1f51271d457bd) feature(mobile): introduce bottomWidgetBuilder in Timeline - [`905df8a`](https://github.com/immich-app/immich/commit/905df8a919029a3144aed8bf4fa82a18a7a8572f) fix(mobile): remove redundant code - [`a7e7f70`](https://github.com/immich-app/immich/commit/a7e7f70fcae93edd85c48ac9be911cbd60700512) refactor(mobile): refactor new code in Timeline ### 📊 Changes **1 file changed** (+28 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `mobile/lib/presentation/widgets/timeline/timeline.widget.dart` (+28 -8) </details> ### 📄 Description ## Description In some timeline modes, it is necessary to support bulk actions for all assets, while the current implementation of the new timeline only allows selecting individual assets or groups by date. For example, this affects the Trash view and the in-progress Trash Synchronization Review screen. This PR proposes adding a bottomWidgetBuilder to address this limitation. Solution # `bottomWidgetBuilder `is a callback with parameters `context`, `isSelectionMode`, and `isMultiSelectEnabled`, which allows delegating the widget construction logic with the required parameters. ``` bottomWidgetBuilder: (_, _, isMultiSelectEnabled) { return isMultiSelectEnabled ? const TrashBottomBar() : const TrashAllActionsBar(); }, ``` `bottomWidgetBuilder `should be used instead of the `bottomSheet `parameter, while preserving the existing behavior for widgets that do not use `bottomWidgetBuilder`. <details><summary><h2> The new controll </h2></summary> https://github.com/user-attachments/assets/6c5f55f0-bda8-40b7-97da-1239a0262d68 </details> ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have made corresponding changes to the documentation if applicable - [x] I have no unrelated changes in the PR. - [x] I have confirmed that any new dependencies are strictly necessary. - [ ] I have written tests for new code (if applicable) - [x] I have followed naming conventions/patterns in the surrounding code - [x] All code in `src/services/` uses repositories implementations for database calls, filesystem operations, etc. - [x] All code in `src/repositories/` is pretty basic/simple and does not have any immich specific logic (that belongs in `src/services/`) ... --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 16:36:25 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#18319