-
Notifications
You must be signed in to change notification settings - Fork 71
DROID-4023 Types | Adds the ability to show/hide description field for object types #2912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DROID-4023 Types | Adds the ability to show/hide description field for object types #2912
Conversation
There was a problem hiding this 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 adds the ability to pin/unpin description field for object types. The main changes include refactoring featured relations use cases to use the new ResultInteractor pattern and implementing a toggleable description widget for object type screens.
- Refactored
AddToFeaturedRelationsandRemoveFromFeaturedRelationsfromBaseUseCasetoResultInteractorfor async operations withfold() - Added description toggle functionality in object type menu to show/hide the description field
- Implemented editable description widget for object type screens with real-time updates
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
domain/src/main/java/com/anytypeio/anytype/domain/relations/AddToFeaturedRelations.kt |
Refactored to use ResultInteractor instead of BaseUseCase for async execution |
domain/src/main/java/com/anytypeio/anytype/domain/relations/RemoveFromFeaturedRelations.kt |
Refactored to use ResultInteractor instead of BaseUseCase for async execution |
presentation/src/main/java/com/anytypeio/anytype/presentation/relations/RelationListViewModel.kt |
Updated to use new .async() and .fold() API for featured relations operations |
presentation/src/main/java/com/anytypeio/anytype/presentation/objects/menu/ObjectSetMenuViewModel.kt |
Updated to use new .async() and .fold() API for featured relations operations |
presentation/src/main/java/com/anytypeio/anytype/presentation/objects/menu/ObjectMenuViewModel.kt |
Updated to use new .async() and .fold() API for featured relations operations |
feature-object-type/src/main/java/com/anytypeio/anytype/feature_object_type/viewmodel/ObjectTypeViewModel.kt |
Added description toggle logic, description state management, and permission checks |
feature-object-type/src/main/java/com/anytypeio/anytype/feature_object_type/viewmodel/VmFactory.kt |
Added new dependencies for featured relations and text update use cases |
feature-object-type/src/main/java/com/anytypeio/anytype/feature_object_type/ui/header/DescriptionWidget.kt |
New composable widget for editable description field with placeholder text |
feature-object-type/src/main/java/com/anytypeio/anytype/feature_object_type/ui/menu/ObjectTypeMenu.kt |
Updated menu to show dynamic Show/Hide label for description and conditional delete button |
feature-object-type/src/main/java/com/anytypeio/anytype/feature_object_type/ui/menu/ObjectTypeMenuState.kt |
Added isDescriptionFeatured field to track description visibility state |
feature-object-type/src/main/java/com/anytypeio/anytype/feature_object_type/ui/UiState.kt |
Added UiDescriptionState data class for description widget state |
feature-object-type/src/main/java/com/anytypeio/anytype/feature_object_type/ui/UiEvent.kt |
Added OnDescriptionChanged event for description updates |
app/src/main/java/com/anytypeio/anytype/ui/primitives/WithSetScreen.kt |
Integrated description widget into object type screen layout |
app/src/main/java/com/anytypeio/anytype/ui/primitives/ObjectTypeFragment.kt |
Passed description state and menu parameters to composables |
app/src/main/java/com/anytypeio/anytype/di/feature/PrimitivesObjectTypeDI.kt |
Provided DI bindings for featured relations and text update use cases |
app/src/main/java/com/anytypeio/anytype/di/feature/ObjectRelationListDI.kt |
Updated DI providers to include dispatchers parameter for refactored use cases |
app/src/main/java/com/anytypeio/anytype/di/feature/ObjectMenuDI.kt |
Updated DI providers to include dispatchers parameter for refactored use cases |
domain/src/main/java/com/anytypeio/anytype/domain/search/ObjectTypesSubscriptionManager.kt |
Added FEATURED_RELATIONS to subscription keys to track featured relations changes |
core-models/src/main/java/com/anytypeio/anytype/core_models/ObjectWrapper.kt |
Added featuredRelations property to ObjectWrapper.Type for accessing featured relations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
What type of PR is this? (check all applicable)
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?