Skip to content

Conversation

@sbakhtiarov
Copy link
Contributor

@sbakhtiarov sbakhtiarov commented Nov 12, 2025

TaskWPB-21155 [Android]Update “Move to Folder” empty and none-selected states (disable Move button, adjust CTA hierarchy)

https://wearezeta.atlassian.net/browse/WPB-21155

What's new in this PR?

Updating logic and refactoring the Move To Folder feature screen.

  • Disable "Move Here" button when no folder selected to avoid moving file to the same folder
  • Show "Create Folder" button as primary button if no folder selected
  • New text for empty screen if no (root) folders available for selection

Refactoring:

  • Moving some logic from composable files to view model
  • Move screen parameters to view state
  • Extract composable function for content into another file to reduce file length

https://www.figma.com/design/grnVU2vAihHXwYgHryu2xE/Cells---Files?node-id=9021-421573&t=OtIBYIZDGP1jX71t-0

@sonarqubecloud
Copy link

Copy link
Member

@ohassine ohassine left a comment

Choose a reason for hiding this comment

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

tbh, I’m not a fan of sending navigation actions through the ViewModel. I feel like we’re overcomplicating things, when it would be much easier and cleaner for reading to just call the navigate command directly from the UI instead of going through the ViewModel and sending the action back.

I also like to keep ViewModels focused on business logic rather than UI stuff like navigation. Otherwise, it can start to feel like we’re mixing responsibilities and adding extra boilerplate.

sealed interface MoveToFolderViewAction {
data object Success : MoveToFolderViewAction
data object Failure : MoveToFolderViewAction
data class NavigateToBreadcrumb(val steps: Int) : MoveToFolderViewAction
Copy link
Member

Choose a reason for hiding this comment

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

The name NavigateToBreadcrumb might be a bit confusing, how about NavigateThroughBreadcrumb ?

@sbakhtiarov sbakhtiarov added this pull request to the merge queue Nov 19, 2025
Merged via the queue into develop with commit c149352 Nov 19, 2025
16 of 17 checks passed
@sbakhtiarov sbakhtiarov deleted the feat/move-to-folder-update branch November 19, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants