fix(Group): add resolver for groups selection bucket#281
Merged
Conversation
Reviewer's GuideExpose and manage a view component reference on GroupState, and plug it into the groups selection bucket so selected group IDs resolve to live Group view instances. Sequence diagram for group selection bucket resolving to view componentssequenceDiagram
participant User
participant SelectionBucket
participant GroupsListStore
participant GroupState
participant Group
User->>SelectionBucket: select groups by ids
SelectionBucket->>GroupsListStore: resolve(ids)
GroupsListStore->>GroupsListStore: getGroupStates(ids)
loop for each id
GroupsListStore->>GroupState: access instance
GroupState-->>GroupsListStore: return GroupState
end
GroupsListStore->>GroupsListStore: map GroupState to getViewComponent()
loop for each GroupState
GroupsListStore->>GroupState: getViewComponent()
alt mounted
GroupState-->>GroupsListStore: Group instance
else unmounted
GroupState-->>GroupsListStore: undefined
end
end
GroupsListStore-->>SelectionBucket: list of Group instances
SelectionBucket-->>User: selection with live Group components
rect rgb(230,230,230)
Note over Group,GroupState: During Group.mount
Group->>GroupState: setViewComponent(this)
Note over Group,GroupState: During Group.unmount
Group->>GroupState: setViewComponent(undefined)
end
Class diagram for updated GroupState, Group, and GroupsListStoreclassDiagram
class GroupState {
<<class>>
+readonly $state
+readonly $viewComponent
+setState(state)
+setViewComponent(component)
+getViewComponent()
}
class Group {
<<class>>
+groupState
+mount()
+unmount()
+updateHitBox(rect)
}
class GroupsListStore {
<<class>>
+selectionBucket
+getGroupStates(ids)
}
GroupState --> Group : holds viewComponent
Group --> GroupState : uses
GroupsListStore --> GroupState : resolves groupStates
GroupsListStore --> Group : resolves view components
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
|
Preview is ready. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Track and expose the live view component associated with each group state and ensure group selection operates on mounted Group view instances.
Enhancements: