harmony-development / protocol

The schemas for the Harmony protocol
Apache License 2.0
21 stars 2 forks source link

feat: adjust ItemPosition #54

Closed pontaoski closed 3 years ago

pontaoski commented 3 years ago

Due to channel visibility, Top/Between/Bottom doesn't work in a lot of cases.

For example, the list of channels might be:

While a client may see only:

A user moving d above c in the client will result in a Top message, which results in the following from the client's perspective:

The problem is, this results in this ordering for clients that can see all the channels:

The expected result would be

Likewise, Between also poses issues due to channel visibility.

Given a channel list:

A client might see:

If the client tries to place a channel in between c and e, it looks good from their side, but from the server's perspective, this is invalid, due to c and e not being adjacent.

Using Before/After positioning allows these issues to be avoided, and better matches user expectations.