phosphorjs / phosphor

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

Feature datagrid expando #426

Closed sccolbert closed 4 years ago

sccolbert commented 4 years ago

This implements expansive last row/column when the size of the viewport is larger than the size of the data. This behavior is configurable by the user.

CC @blink1073 @afshin @ellisonbg @jasongrout @SylvainCorlay

expando

sccolbert commented 4 years ago

This needs one more thing: updated hit testing to take into account the expansion mode.

blink1073 commented 4 years ago

Looks good so far

sccolbert commented 4 years ago

Hit testing are in. This PR should now be complete.

sccolbert commented 4 years ago

The grid has scrollTo/row/column/cell methods now. That would be better.

On Sat, Sep 7, 2019, 1:51 PM Ian Rose notifications@github.com wrote:

@ian-r-rose approved this pull request.

API looks good to me.

It's not in this PR, but I just realized that the new rowAt and columnAt functions in the datagrid will solve a long-standing issue in the JupyterLab CSV viewer: https://github.com/jupyterlab/jupyterlab/blob/a10491957c9ef19c8745380305d045165ff6bf79/packages/csvviewer/src/widget.ts#L333-L343

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

ian-r-rose commented 4 years ago

Right, I meant to point at those.

sccolbert commented 4 years ago

This works, but I'm not super happy with the implementation. It lacks encapsulation.

I think I'm going to try modifying the SectionList class (in a parallel branch) to handle this logic. That should also allow for different modes. i.e. expand last column, or expand all columns.

nmichaud commented 4 years ago

@sccolbert There's a visual glitch in the "Random Ticks 1" example when you expand and then shrink the row header column such that the expando column values go offscreen.

sccolbert commented 4 years ago

@nmichaud Thanks!!!!