504: adds taggedPersonIds in create comment and update comment hooks#593
504: adds taggedPersonIds in create comment and update comment hooks#593DarrellRoberts wants to merge 15 commits into
Conversation
Code ReviewThis PR stacks on #537 (not yet merged). The actual new logic is the async 🔴 Blockers1. Raw const response = await fetch(`${apiPathUser}/${id}`);The rest of the app uses axios which carries auth headers automatically. A raw 2.
3. taggedPersonIds = resolvedPersonIds?.filter((id) => id !== null);If .filter((id): id is number => id != null)4. Button not disabled during async fetch gap
🟡 Non-blocking5. Extra API calls unnecessary
taggedPersonIds = tags
.map(tag => users?.find(u => u.id === tag.id)?.personId)
.filter((id): id is number => id != null);6. Silent failure on fetch error The catch just 7. Duplicated logic
Note: This PR also inherits #537's open issues (trailing slash, dead |
|
thanks @nadavosa ! I've resolved the Blockers 1,2,3,4 along with non-blocker 6 and 7. 5 is not possible as we have |
|
have also rebased with the autocomplete branch which should fix blocker 2 |
1813f4a to
d9c1554
Compare
Description
Adds taggedPersonIds in the create comment request and in the update comment request when the user tags another user
Branch created and based from
darrell/feature/autocompleteRelated Issues
Closes #504
Changes
EntityCommentsuseUpdateCommentuseCreateCommentScreenshots / Demos
If UI-related, add before/after or GIFs.
Checklist