Fix bug on adding skills to new tasks
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- frontend
調査の方向性
まず task.new skill-typeahead-result と projectSkillsList コンポーネントを見つけ、選択された skills のコレクションがどのようにチェックされているかを追跡します。既存の project skill が検索結果で選択済みとして表示され、クリックすると重複を作成せずに削除されることを確認します。コンポーネントのフローで必要な場合は、関連する x-SkillsList サービスも確認します。
索引モデルが issue の本文から書いたものです。
説明
Problem
From @begedin:
If I add a skill using the project skill list, then try to search for the same skill in the dropdown, it will appear "uncrossed", as if not yet added, in the results:

Even though it looks incorrect, clicking it will still remove it, not add a duplicate, so at least the background logic works.
Basically,
-
skill-typeahead-resultusually usesservice:x-skills.includes(skill)to determine if skill has already been added. this method is NOT easily rewritten into something else -
In the case of
task.new, theskill-typeahead-resultinstead uses just anarray.includes(skill), but this no longer works when we add project skills into the mix, because those areDS.PromiseObjectrecords, notDS.Modelrecords. This happened to work because the method was named the same, but the proper method to use here isarray.isAny('id', skillId)so it works with bothDS.ModelandDS.PromiseObjectrecords -
monkeypatch the
includesmethod in this specific case - quick and dirty, definitely against it -
wrap the unsaved skills collection into another service, which makes it work - clean, but makes thing worse in the long run, I think. Another complex service, difficult to follow.
-
rethink the
projectSkillsListcomponent added here. make it an extremely simpleskills-item-listcomponent which just receives and renders a list of skills. let the controller handle the exclusion of already added skills, etc. - clean and doesn't make things worse; a good compromise. -
rewrite the services, rethink them, really. now that I got back into them, I found them extremely difficult to follow and, especially with "sometimes" accessing the
contentproperty of proxy objects, ex:
return records.any((found) => {
let targetId = get(target, 'id');
let targetModelName =
get(target, 'constructor.modelName') || get(target, 'content.constructor.modelName');
let foundId = found.belongsTo(targetModelName).id();
return (foundId === targetId);
});
I think, with proper controller usage, the whole x-SkillsList collection of services could be almost if not completely eliminated.
- 主要言語
- JavaScript
- スター
- 120
- フォーク
- 75
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
code-corps/code-corps-ember のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
code-corps/code-corps-ember#1616 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
code-corps/code-corps-ember#1613 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
code-corps/code-corps-ember#1612 ·
-
Difficulty: Medium Skill: ember-cli-page-object
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
code-corps/code-corps-ember#1063 · リアクション 1 件 ·
-
greenkeeper
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
code-corps/code-corps-ember#1765 · コメント 1 件 ·
code-corps/code-corps-ember の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
naver/egjs-flicking#971 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
RADAR-base/radar-self-enrolment-ui#118 ·
メンテナーはふだん 1 日以内に返信
-
Renderer treats a sub-pixel width difference as a resize, which cancels the `motion()` entranceオープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
MicrosoftDocs/edge-developer#3970 ·
メンテナーはふだん 1 日以内に返信
-
agent/scanner hive/hosted-available-lke648397-260827-5n31 quality testing
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信