adopted-ember-addons / adopted-ember-addons/ember-data-model-fragments

Supplying a unique key to ensure response is correctly mapped for array fragment

オープン
#328 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
367
フォーク
108
PR マージ指標
30日以内にマージされた PR はありません

説明

Hi, thanks for making this addon it takes care of a much needed use case in ember data.

@goldstarlearning we are using this addon to handle rich json documents in some of our models. The issue we are having has to do with the Array fragments in the library, and the way that response data is applied in the library relies on indexes. https://github.com/lytics/ember-data-model-fragments/blob/master/addon/array/fragment.js#L43

This has a knack for causing issues for us, when the server and client do not order arrays in the same way.

The solution I would like to see in the library is the ability to specify a unique key. This unique key in our case is not necessarily globally unique (think something like an order number etc..). This would provide a more robust way to handling reconciling data.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with addon/array/fragment.js at line 43, where response data is applied using array indexes. Trace how array fragments are reconciled when server and client ordering differs, then determine how a caller-supplied unique key should be specified and used. Done means array fragment responses map correctly despite differing order, including keys that are not globally unique.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
frontend
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。