Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change SET_SELECTION protocol message #505

Open
heswell opened this issue Feb 9, 2023 · 0 comments
Open

change SET_SELECTION protocol message #505

heswell opened this issue Feb 9, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request server UI user Interface

Comments

@heswell
Copy link
Contributor

heswell commented Feb 9, 2023

proposal: change the way client notifies server of user selection actions.

Right now, client send an array of selected row index positions. In the case that user holds down shift and selects a large range (can potentially be many thousands of rows) this is an inefficient way to transmit selection. How about the following:

instead of

{
  type: "SET_SELECTION";
  selection: Array<number>;
  vpId: string;
}

we use this

type RangeTuple = [number, number]

{
  type: "SET_SELECTION";
  selection: Array<number | RangeTuple>;
  vpId: string;
}

So where a consecutive range of row index values must be included, we just describe that range with the first and last index using the RangeTuple. We can send any combination of single values and ranges. Select All becomes trivial [[0, rowCount]]

If user makes a complex extended selection, picking out specific rows and ranges of rows, we might see a selection like this

selection: [1,3,6,[8,11],14,[17,35],[50,100]]

which translates to

[1,3,6,8,9,10,11,14,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,50,51,52 .....100]
@heswell heswell added enhancement New feature or request UI user Interface server labels Feb 16, 2023
@keikeicheung keikeicheung moved this to 📋 Backlog in Vuu board May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server UI user Interface
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants