-
Notifications
You must be signed in to change notification settings - Fork 71
DROID-3916 Tech | StoreOfRelationOptions realisation #2942
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
base: main
Are you sure you want to change the base?
DROID-3916 Tech | StoreOfRelationOptions realisation #2942
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 implements a store-based architecture for managing relation options with drag-and-drop reordering capabilities. The changes replace the SpaceManager dependency with direct SpaceId usage and introduce a global subscription system for relation options.
Key Changes:
- Introduces
StoreOfRelationOptionswithRelationOptionsSubscriptionManagerfor centralized relation option management - Adds
SetRelationOptionOrderuse case with full middleware integration for persisting option order - Implements drag-and-drop reordering UI with haptic feedback for editable tag/status relations
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
TagOrStatusValueViewModel.kt |
Refactored to use SetRelationOptionOrder instead of SpaceManager; added OnMove action handler for drag-and-drop |
TagOrStatusValueViewModelFactory.kt |
Updated dependency injection to replace SpaceManager with SetRelationOptionOrder |
StoreOfRelationOptions.kt |
New domain store with thread-safe CRUD operations and relation key indexing |
RelationOptionsSubscriptionManager.kt |
New global subscription manager for relation options lifecycle |
RelationOptionsSubscriptionContainer.kt |
New subscription container handling real-time relation option updates |
SetRelationOptionOrder.kt |
New use case for persisting relation option order |
MiddlewareServiceImplementation.kt |
Added setRelationOptionsOrder RPC method implementation |
BlockMiddleware.kt |
Added repository integration for setRelationOptionOrder |
GlobalSubscriptionManager.kt |
Integrated relation options subscription into global lifecycle |
TagOrStatusCompose.kt |
Implemented reorderable list UI with drag handles and haptic feedback |
TagItem.kt / StatusItem.kt |
Added drag handle UI elements and dragging state animations |
Common.kt |
Removed unused ItemTagOrStatusCreate composable |
Relations.kt |
Added RELATION_OPTION_ORDER constant |
ObjectWrapper.kt |
Added relationKey and orderId properties to Option wrapper |
Command.kt |
Added SetRelationOptionsOrder command |
| DI modules | Updated dependency injection for new components |
Comments suppressed due to low confidence (2)
core-ui/src/main/java/com/anytypeio/anytype/core_ui/relations/Common.kt:1
- These imports are no longer used after removing the
ItemTagOrStatusCreatecomposable. They should be removed to keep the import list clean.
package com.anytypeio.anytype.core_ui.relations
core-ui/src/main/java/com/anytypeio/anytype/core_ui/relations/Common.kt:1
- These imports are no longer used after removing the
ItemTagOrStatusCreatecomposable. They should be removed to keep the import list clean.
package com.anytypeio.anytype.core_ui.relations
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
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?