mattermost-community/focalboard

Perf: Drag and drop cards in Kanban board view shows intermediate sort state

Ouverte

#2 315 ouverte le 11 févr. 2022

 (1 commentaire) (0 réaction) (0 personne assignée)TypeScript (2 542 forks)user submission
BugHelp WantedPerformanceSev/3Up for grabs

Métriques du dépôt

Stars
 (26 187 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Steps to reproduce the behavior

  1. Open a board (Kanban) view
  2. Drag a card onto another card in a column with multiple (5+) cards
  3. The card first appears at the beginning or end, then moves to the right position a split second later

Expected behavior

The card should move directly to the dropped position

Screenshots

https://user-images.githubusercontent.com/46905241/153519856-3a0fd910-a008-46d9-bfca-fd1ee70e68d1.mov

Edition and Platform

  • Edition: Mattermost plugin
  • Version: v0.14
  • Browser and OS: Chrome on Mac

Additional context

In the browser network tab, notice that PATCH Block is called twice. This is because on onDropToCard in kanban.tsx, the property change and sort order are two separate API calls. Propose refactoring to call UpdateBlocks in a single call.

Guide contributeur