phosphorjs / phosphor

The PhosphorJS Library
BSD 3-Clause "New" or "Revised" License
1.04k stars 166 forks source link

Feature datagrid copy #424

Closed sccolbert closed 4 years ago

sccolbert commented 4 years ago

This implements copy-to-system-clipboard of the current selection.

The behavior is configurable wrt element separator, to-string formatting, which headers are included in the copy, and cell count threshold above which a warning dialog is displayed warning the user that the copy may take awhile.

CC @afshin @blink1073 @ellisonbg @jasongrout @SylvainCorlay

ellisonbg commented 4 years ago

Awesome! Can you comment on the paste side of this? IOW, how would it work for someone to copy from one selection, and paste back into the same datagrid in a different location. I realize that involves the data model and may not be a view related thing, but at a minimum the current cursor position comes into play. What if someone pastes when there is a selection?

On Wed, Sep 4, 2019 at 1:55 PM S. Chris Colbert notifications@github.com wrote:

This implements copy-to-system-clipboard of the current selection.

The behavior is configurable wrt element separator, to-string formatting, which headers are included in the copy, and cell count threshold above which a warning dialog is displayed warning the user that the copy may take awhile.

CC @afshin https://github.com/afshin @blink1073 https://github.com/blink1073 @ellisonbg https://github.com/ellisonbg @jasongrout https://github.com/jasongrout @SylvainCorlay https://github.com/SylvainCorlay

You can view, comment on, or merge this pull request online at:

https://github.com/phosphorjs/phosphor/pull/424 Commit Summary

  • rename model to dataModel everywhere to be more explicit
  • update datamodel naming
  • implement copy to clipboard

File Changes

Patch Links:

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/phosphorjs/phosphor/pull/424?email_source=notifications&email_token=AAAGXUHA256KC3PT3RWZDGDQIAODFA5CNFSM4ITWNMA2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HJLR5RA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAGXUF3I3TUEH4AAJUMU73QIAODFANCNFSM4ITWNMAQ .

-- Brian E. Granger

Principal Technical Program Manager, AWS AI Platform (brgrange@amazon.com) On Leave - Professor of Physics and Data Science, Cal Poly @ellisonbg on GitHub

sccolbert commented 4 years ago

The paste requires editable data models. So we'll need to expand the data model to support that. Editable data models are also needed for cell editors. So we can add the paste feature at the same time.

On Wed, Sep 4, 2019, 4:03 PM Brian E. Granger notifications@github.com wrote:

Awesome! Can you comment on the paste side of this? IOW, how would it work for someone to copy from one selection, and paste back into the same datagrid in a different location. I realize that involves the data model and may not be a view related thing, but at a minimum the current cursor position comes into play. What if someone pastes when there is a selection?

On Wed, Sep 4, 2019 at 1:55 PM S. Chris Colbert notifications@github.com wrote:

This implements copy-to-system-clipboard of the current selection.

The behavior is configurable wrt element separator, to-string formatting, which headers are included in the copy, and cell count threshold above which a warning dialog is displayed warning the user that the copy may take awhile.

CC @afshin https://github.com/afshin @blink1073 https://github.com/blink1073 @ellisonbg https://github.com/ellisonbg @jasongrout https://github.com/jasongrout @SylvainCorlay https://github.com/SylvainCorlay

You can view, comment on, or merge this pull request online at:

https://github.com/phosphorjs/phosphor/pull/424 Commit Summary

  • rename model to dataModel everywhere to be more explicit
  • update datamodel naming
  • implement copy to clipboard

File Changes

Patch Links:

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/phosphorjs/phosphor/pull/424?email_source=notifications&email_token=AAAGXUHA256KC3PT3RWZDGDQIAODFA5CNFSM4ITWNMA2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HJLR5RA , or mute the thread < https://github.com/notifications/unsubscribe-auth/AAAGXUF3I3TUEH4AAJUMU73QIAODFANCNFSM4ITWNMAQ

.

-- Brian E. Granger

Principal Technical Program Manager, AWS AI Platform (brgrange@amazon.com) On Leave - Professor of Physics and Data Science, Cal Poly @ellisonbg on GitHub

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/phosphorjs/phosphor/pull/424?email_source=notifications&email_token=AABBQSLQ3DOCKKOS7ZEBIJTQIAPBBA5CNFSM4ITWNMA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD547H3I#issuecomment-528085997, or mute the thread https://github.com/notifications/unsubscribe-auth/AABBQSIMT6MSCOT3ZXQMNRLQIAPBBANCNFSM4ITWNMAQ .