I have a synchronized copies of Trello task in my app(synchronized in real time with webhooks).
I would like to display boards in my app and let users move cards and send appropriate request to Trello REST API to update card’s position there as well.
The problem is I have to send the specific float that will determine card’s position on the board and I have a few questions about the positioning system. From what I’ve observed on Trello:
- When placing card A between cards B and C, new A card’s position is (B.pos + C.pos)/2. Is that what I should send to Trello?
- After multiple changing cards positions multiple times the pos attributes become a decimal number with many decimal places and at some point all cards have their pos numbers reassigned to create bigger “slots” between them again. Is there some rule for when it happens? I need to track these changes as well, will they be sent in webhooks?
- Is there any other way to specify new card’s position in request(other than passing float)? There are “top of list” and “bottom of list” options, but from what I see the only way to place card somewhere in the middle of the list is passing float?