Copy/Paste Behavior
Current Hypergrid Rules established for copy buffer.
- command and control keys are ignored ~~fixed~~
- COPY operation copies all row selections (contiguous or not) but only the youngest region selection. We believe this is appropriate and OK as is. (Note that Excel does this for row selections; Excel only allows a single region selection to be copied.)
- COPY operation gives priority to region selections over row selections even when the row selections are younger. This is not OK and needs to be fixed.
Simplest solution we arrived at for the last item above is: If there are any row selections, they get copy priority regardless of when created. Otherwise, the youngest region selection is copied.
@Dwaynekj currently hypergrid does not support paste functionality. Is this something desired? I have implemented this locally and am wondering if this is something that I should fork over to the repo? Probably before that though, if paste functionality is something desired, there should be a discussion on the exact specs on how it should work. I.e. -Should there be any type validation on pasted value? -Should pasting be limited to editable cell? -How to deal with unequal copy vs. paste region sizes?
Hey @noahtaylor I think the current line of thinking is that it would be a good tutorial to add to our wiki pages. In keeping in line with of HyperGrid as a grid and not a spreadsheet, we feel the core should enable the ability to create a feature like this for a developer-user to implement. Similarly with the questions you posed
Would you be open to sharing the changes you made? It might be useful as a wiki and some changes may be pertinent in HyperGrid core
@Dwaynekj I can certainly share what I did, just been busy with some high priority releases. I can post it here in a few days unless there is a better place for it.
@noahtaylor Ok thanks!
@Dwaynekj I have created a copy and paste fiddle here: https://jsfiddle.net/4qqzkbL3/2/ Logic is incorporated in the dom 'paste' listener.
@noahtaylor Thanks We will evaluate for 1.3.0
@noahtaylor We've decided to keep this request out of 1.3.0 based on priorities and evaluation of what layer a paste feature should be in the grid. We have it queued up for following sprint.