Fix bug on adding skills to new tasks
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- frontend
Direzione di ricerca
Inizia individuando task.new skill-typeahead-result e il componente projectSkillsList, quindi segui come viene verificata la raccolta delle skills selezionate. Verifica che la project skill esistente venga mostrata come selezionata nei risultati di ricerca e che facendo clic su di essa venga rimossa senza creare un duplicato; esamina i servizi x-SkillsList correlati se il flusso del componente lo richiede.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- JavaScript
- Stelle
- 120
- Fork
- 75
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di code-corps/code-corps-ember
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
code-corps/code-corps-ember#1616 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
code-corps/code-corps-ember#1613 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
code-corps/code-corps-ember#1612 ·
-
Difficulty: Medium Skill: ember-cli-page-object
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
code-corps/code-corps-ember#1063 · 1 reazione ·
-
greenkeeper
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
code-corps/code-corps-ember#1765 · 1 commento ·
Tutte le issue di code-corps/code-corps-ember
Issue simili
-
Daemon delete dialog: "Remove all ExApps" checkbox and `removeExApps` parameter have no effectAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 3 giorni
-
Add: Atlas TVApertachannels:add check:passed
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 4 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
jaegertracing/jaeger-ui#4547 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
feedback simulation workshop
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
githubnext/gh-aw-workshop#4090 ·
I maintainer di solito rispondono entro 1 giorno
-
bug deck: add to staging level: missing p-feature: Manage Submissions p-feature: Submissions and process priority: MUST HAVE ready for dev lead role: missing size: missing time sensitive
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
hackforla/tdm-calculator#3581 ·
I maintainer di solito rispondono entro 2 giorni