Skip to content

Conversation

@konstantiniiv
Copy link
Collaborator

@konstantiniiv konstantiniiv commented Nov 24, 2025


  • I understand that contributing to this repository will require me to agree with the CLA

Description

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 README.md
  • 📓 tech-docs
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

Copy link
Contributor

Copilot AI left a 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 AddToFeaturedRelations and RemoveFromFeaturedRelations from BaseUseCase to ResultInteractor for async operations with fold()
  • 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.

@konstantiniiv konstantiniiv changed the title Droid 4023 add pinunpin button for types Droid 4023 Types | Adds the ability to show/hide description field for object types Nov 24, 2025
@konstantiniiv konstantiniiv changed the title Droid 4023 Types | Adds the ability to show/hide description field for object types DROID-4023 Types | Adds the ability to show/hide description field for object types Nov 24, 2025
@konstantiniiv konstantiniiv merged commit 489fdeb into main Nov 24, 2025
3 checks passed
@konstantiniiv konstantiniiv deleted the droid-4023-add-pinunpin-button-for-types branch November 24, 2025 17:55
@github-actions github-actions bot locked and limited conversation to collaborators Nov 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants