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

CurCell should not be updated until CellMove callback sends Proceed #284

Open
mkromberg opened this issue Nov 13, 2024 · 2 comments
Open
Milestone

Comments

@mkromberg
Copy link
Collaborator

mkromberg commented Nov 13, 2024

As for KeyPress, CurCell needs to report the active cell BEFORE the move. Currently, in DemoScroll, if you move from Cell [1,1] to [1,2], you will see:

{"Event":{"ID":"F1.VGRID","EventName":"CellMove","EventID":"2539b4e3-aedb-444c-a63e-f8ad544eec06","Info":[1,2,1,0,0,0,""]}}

Callback requests CurCell and receives response [1,2]:

{"WG":{"ID":"F1.VGRID","Properties":["CurCell"],"WGID":"78"}}
{"WG":{"ID":"F1.VGRID","Properties":{"CurCell":[1,2]},"WGID":"78"}}

Callback sends Proceed:
{"EC":{"EventID":"2539b4e3-aedb-444c-a63e-f8ad544eec06","Proceed":1}}

@mkromberg mkromberg added this to the Blocking milestone Nov 13, 2024
@cursork
Copy link
Contributor

cursork commented Nov 13, 2024

To be clear, my understanding is that this should be:

{"WG":{"ID":"F1.VGRID","Properties":["CurCell"],"WGID":"78"}}
{"WG":{"ID":"F1.VGRID","Properties":{"CurCell":[1,1]},"WGID":"78"}}

@mkromberg
Copy link
Collaborator Author

Note that when a KeyPress precedes a CellMove, the following should be true:

  1. KeyPress events should NOT update CurCell
  2. If a KeyPress is confirmed, the client should perform "default processing" for the keystroke
  3. Some keys like cursor arrows and enter have defined behaviours that trigger CellMove events
  4. If one of these keys was pressed and there is a CellMove event defined, a CellMove event should be sent
  5. ONLY if/when the CellMove is confirmed should CurCell be updated

On the other hand, if a CellMove is caused by a mouse click, then:

  1. The CellMove event should be sent to the server
  2. If it is rejected, CurCell must remain unchanged and focus remain in the previous cell
  3. If it is approved, CurCell can now change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants