CentreForDigitalHumanities / CentreForDigitalHumanities/backbone-collection-transformers

Update events from underlying collection are not replicated

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Description

If the underlying collection triggers `'update'`, the mapped/filtered collection does not trigger an `'update'` event as well.

Mapped collections should probably *always* trigger `'update'` along with the underlying collection. It is theoretically possible that a model in the underlying model changed while the mapped model didn't, but I expect this situation to be extremely rare.

Filtered collections should check whether any of the added, changed or removed models matches the filter criterion. The `'update'` event should only be replicated if it actually affects one of the models in the filtered set.

Contributor guide

Open the contributing guide

Research direction

Start by locating the mapped and filtered collection implementations and their handling of underlying collection events. Reproduce an underlying 'update' with mapped and filtered collections, then verify that mapped collections always propagate it while filtered collections do so only when added, changed, or removed models match the filter criterion.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.