opral / inlang-message-ui-components

Issue tracker for UI components
0 stars 0 forks source link

Improve sorting strategy #86

Closed NilsJacobsen closed 4 months ago

NilsJacobsen commented 5 months ago

Current approach: When a variant gets added or a match is changed it gets sorted into its correct position

Downside:

Proposal1: Sort all entries only before rendering. Adding and renaming doesn't change anything; sorting can be triggered manually if it gets wild.

Pro:

Cons:

Proposal2: Only sort in the frontend. Make sure that a saving saves the message in the old order

Pro:

Cons:

NilsJacobsen commented 4 months ago

Explanation Loom: https://www.loom.com/share/db19be66c7b24a43b38df65d8fbe4500

NilsJacobsen commented 4 months ago

I agree that having the sorting only in the UI makes the most sense. Persisting order in a distributed system like ours is very hard
- by Loris DM

NilsJacobsen commented 4 months ago

Sorting update https://www.loom.com/share/2efbb4f79d374b879595c3253ab4a33d

TL;DR: