Giter VIP home page Giter VIP logo

jupytercalpoly / jupyterlab-tabular-data-editor Goto Github PK

View Code? Open in Web Editor NEW
132.0 132.0 18.0 54.48 MB

Manipulate your tabular data responsively and effectively within JupyterLab.

Home Page: https://github.com/jupytercalpoly/jupyterlab-tabular-data-editor/blob/master/PRESS_RELEASE.md

License: BSD 3-Clause "New" or "Revised" License

JavaScript 0.59% TypeScript 97.41% CSS 0.99% Shell 0.12% Python 0.90%
jupyterlab lumino-datagrid

jupyterlab-tabular-data-editor's People

Contributors

kgoo124 avatar krassowski avatar loganamcnichols avatar ryuntalan avatar zsailer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

jupyterlab-tabular-data-editor's Issues

Enabling search and replace

Describe the new feature being added

  • Users can use Accel F to search for some text in the DataGrid
  • Users can also access the Replace and Replace All feature

How will this feature improve this extension

  • Bigger datasets are easier to search
  • Similiar things that need to be changed can be changed all at one time

Describe alternatives you've considered
N/A

Additional context

  • Using an adapted version of searchprovider.ts from the csvviewer-extension package

replaceAll requires multiple undos/redos

Actual behavior
replaceAll function in the search and replace features takes only one undo/redo

Expected behavior
replaceAll function in the search and replace features takes multiple undo/redo

To Reproduce
Steps to reproduce the behavior:

  1. Use Accel F to access search and replace menu
  2. Search for something that has multiple matches (multiple cells)
  3. Open the replace drop down menu
  4. Add a string to replace with and click replace all
  5. Try to undo/redo using shortcuts Accel Z/Accel Shift Z respectively

Additional context
The problem lies in that every setData call is one Transaction. Need to refactor Transaction outside of the setData method.

Edit cells

Enabled cell editing inside of the EditableDataGrid class

Moving rows and columns

Describe the new feature being added

  • Upon hover over the header, the cursor will be changed to grab.
  • On mouseDown, a slightly offset shadow of the row/column will appear above.
  • The row/column's shadow can be moved with a line indicating where it will be reinserted.
  • On mouseUp, the row will move into place

How will this feature improve this extension
Users can move portions their data around easily instead of manually re-editing cells

Describe alternatives you've considered
N/A

Additional context
N/A

Alphabetic column header

Describe the new feature being added
The first row of displayed will be alphabets (similar to Excel/Google Sheets)

How will this feature improve this extension
Easy way to references cells and columns

Describe alternatives you've considered
Another option would be to use numbers, but that may be confusing as the rows are number

Additional context
N/A

Create issue templates

To standardize the format and information for every issue we create, I want to create some issue templates. This will keep everything uniform and should help in the long run!

Cell selection for undo/redo/searching

Describe the new feature being added

  • Undo/redo selects the cell that was undone/redone
  • The current match is selected

How will this feature improve this extension
Draws focus to the cell that was just manipulated/searched

Describe alternatives you've considered
N/A

Additional context
Utilizing the SelectionModel's select method

Removing rows/columns

Describe the new feature being added
Rows and columns can be removed via the context menu

How will this feature improve this extension
Users will be able to remove unwanted rows or columns

Describe alternatives you've considered
N/A

Additional context
N/A

Undo/redo for cut

Describe the new feature being added
Undo/redo for cut

How will this feature improve this extension
Users can go back and forth between the cut action

Describe alternatives you've considered
N/A

Additional context
N/A

Datastore implementation

Describe the new feature being added
The updated data from the raw csv file will now be managed with the Datastore

How will this feature improve this extension
With the datastore, we get easy access to undo/redo functionality

Describe alternatives you've considered
N/A

Additional context
N/A

Cannot Extend the CSVViewer class in a helpful way.

The CSVViewer constructor handles the initial rendering of the datagrid. When extending CSVViewer, we have to call super(props). Unfortunately, it seems that any attempt to redefine this_grid to our version of the grid AFTER running super(props) results in nothing being rendered. I have also tried including all of the code in the CSVViewer constructor within the EditableCSVViewer constructor. This also doesn't work.

UI/UX for User Story: Searching and replacing data

Description

This is an example of UI/UX for searching and replacing a data point. Command+F is used to initiate the search feature.
search-replace

Here is an image of the toolbar with a search icon.
Header bar and toolbar

Related Issues

None.

Questions

  • Should the search feature have an icon on the toolbar?

Interactive Prototype

Prototype Link

Incorrect version of GitHub NPM package being used.

Actual behavior

When spinning up JupyterLab and trying to edit cells, we get an error that model.head is undefined. The source of the problem seems to be with webpack pulling a previous version of our csvviewer repo.

Expected behavior
Expect head to be defined.

To Reproduce
Run jupyter lab --watch
Attempt to edit a cell in a csv file using the EditableVS

Saving datagrid

Describe the new feature being added
The ability to save a CSV file after being edited in the Tabular Data Editor

How will this feature improve this extension
Changes to files will be able to be saved and preserved.

Additional context
When a cell is changed, the DataModel is updated, which re-renders the DataGrid, but doesn't update the CSV file

Notes: 7/2

  • Probably need to use signals
  • How to change the raw csv file?

Toolbar

Describe the new feature being added
A toolbar that enables you to quickly save, undo, cut, copy, paste, and filter data.

How will this feature improve this extension
This feature provides an interface that will help you accomplish data editing tasks quickly and intuitively.

Describe alternatives you've considered
For new users, not having a toolbar assumes the person has prior knowledge of context menus and keyboard shortcuts.

Additional context
More tools and a function bar will be implemented in the future.

Undo/redo for basic cell functions (add/remove rows/columns and cell edits)

Describe the new feature being added

  • Basic cell functions can be undone (accel-Z) and redone (accel-shift-Z)

How will this feature improve this extension

  • Users should always be able to undo and redo their actions (design heuristic)

Describe alternatives you've considered

  • N/A

Additional context

  • N/A

Undo/redo for moving rows and columns

Describe the new feature being added
Undo/redo for moving rows and columns using shortcuts

How will this feature improve this extension
Users will be able to undo/redo these changing actions

Describe alternatives you've considered
N/A

Additional context
N/A

Operations on columns extremely slow.

Actual behavior
When operating on individual cells or rows, the operation is fairly fast. However, operating on columns is very slow. For example, in a 5,000 row data set, it took 30 seconds to complete the operation.

Expected behavior
Performance should at least be comparable to Excel.

Copy, cut and paste for the tablular data editor.

Describe the new feature being added
Users should be able to cut, copy and paste cells using keyboard shortcuts or right click menus much like they can in other spreadsheet programs.

How will this feature improve this extension
Provides a very flexible way to move data around.

Unit tests for moving rows/columns

Currently, no tests exist with moving rows/columns. Adding these tests will ensure data is being manipulated correctly in our current and future uses.

Tabular Data Editor Automatically Selects Top Left Cell After Pasting

Actual behavior
The Top Right Cell of the Tabular Data Editor gets highlighted after pasting (with the previous value highlighted).

Expected behavior
The new value (pasted value) should be in place and there shouldn't be any cells highlighted after pasting.

Additional context
Add any other context about the problem here.

Set up extension to get @jupyterlab/csvviewer and @lumino/datagrid from forked verisons of Jupyterlab and Lumino

We would like to be able to modify some of the attributes in DSVModel class https://github.com/lmcnichols/jupyterlab/blob/master/packages/csvviewer/src/model.ts and the DataGrid class https://github.com/jupyterlab/lumino/blob/master/packages/datagrid/src/datagrid.ts. However, many of the attributes & methods we would like to change are set to private.

As a fix, we would like to have our extension depend on some node modules which come from Jupyterlab and Lumino forks on our local repository. In these forks, we would modify the source code so that the private attributes we need are set to protected.

We haven't figured out a way to set a dependency to a subdirectory of a git repository. This is a known issue (see yarnpkg/yarn#4725 and npm/npm#2974). Attempts to use existing tools (e.g. https://gitpkg.now.sh/) have failed, although we are still unclear on why they are failing.

UI/UX for User Story: Adding a row and column (ghost row and column)

Description

This is an example of a way to add a row or column. With a single click, you can add a new row or column to the end of your data table. So if you were to acquire new information, you can quickly append that data to your table.

add-row-column
(slight mistake with the prototype: the add row button is supposed to extend when the new column is added)

Related Issues

None

Questions

What are the different use cases when using this feature?

Should the add row/ columns be less prominent (more transparent)?

Feedback on this concept would be greatly appreciated!

Interactive Prototype

Prototype Link

Add Rows/Columns

Enable the user to add rows and columns. Would ideally like the flexibility of inserting columns and rows right after the selected column/row via right clicking.

Context menu has the icons instead of the descriptions.

Actual behavior
Toolbar icons have replaced the descriptions in the context menu.

Expected behavior
Expect the original context menu, which displays the description of the command (e.g. 'Paste') rather than the toolbar icon for it.

Typescript errors caused by different versions of the same package interacting in our extension.

These errors came up when we tried to install the latest version of @lumino/datagrid which our extension depends on. It seemed that different versions of the same package were coming into contact, producing errors. Here is a prototypical example of the error message.

at the line
export class EditableCSVDocumentWidget extends DocumentWidget<EditableCSVViewer>

 Type 'import("C:/Users/logan/git/tde/jupyterlab-tabular-data-editor/node_modules/@lumino/datagrid/node_modules/@lumino/widgets/types/title").Title<import("C:/Users/logan/git/tde/jupyterlab-tabular-data-editor/node_modules/@lumino/datagrid/node_modules/@lumino/widgets/types/widget").Widget>'
is not assignable to type
 'import("C:/Users/logan/git/tde/jupyterlab-tabular-data-editor/node_modules/@jupyterlab/docregistry/node_modules/@lumino/widgets/types/title").Title<import("C:/Users/logan/git/tde/jupyterlab-tabular-data-editor/node_modules/@jupyterlab/docregistry/node_modules/@lumino/widgets/types/widget").Widget>'.

Only the first 14 rows are initially added to the cache, causing computeRowOffsets to malfunction when we are removing a column in a dataset with more than 14 columns.

Actual behavior
When testing the deleteColumn function the operation malfunctioned after the first 14 entries were removed. Random characters began being removed instead of the entry we wanted removed.

Expected behavior
All entries in the column we were removing would be removed, without effecting any other entries.

To Reproduce
Steps to reproduce the behavior:
1 .You can use this csv file.
2. Open Jupyterlab with the extension activated in the directory with the csv file saved.
3. Open the csv file with CSV Tabular Data Editor.
4. Do not scroll to the bottom of the file at any point. Simply navigate to a column header, right click it, and choose delete column
5. Now scroll down so the rest of the rows come into view. You should see something like this.

Screenshots
Screen Shot 2020-07-10 at 7 36 34 AM

Desktop (please complete the following information):

  • OS: iOS
  • Browser: firefox

Removing last column of the DataGrid flattens all of the data

Actual behavior
Removing the last column of the DataGrid flattens all of the data

Expected behavior
The data should remain intact and in the same layout

To Reproduce
Steps to reproduce the behavior:

  1. Open the Tabular Data Editor extension from a CSV file
  2. Right-click on the last column
  3. Click Remove Columns

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
N/A

Deleting the last row of the editor produces strange behavior.

Actual behavior
When the last row of the editor gets deleted, the entire table gets pasted directly below the trimmed table.

Expected behavior
The final row is simply removed.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Jupyterlab
  2. Open a test.csv with TabularDataEditor and attempt to remove the last row.

Screenshots
If applicable, add screenshots to help explain your problem.
Screen Shot 2020-07-08 at 9 38 53 AM
Screen Shot 2020-07-08 at 9 39 00 AM
Desktop (please complete the following information):

  • iOS

Additional context
Add any other context about the problem here.

CSVTextCellEditor isn't resized when rows/columns are resized

Actual behavior
The cell editor stays the same size no matter the size of the cell

Expected behavior
The cell editor should be the same size as the cell even when it is resized

To Reproduce
Steps to reproduce the behavior:

  1. Open a CSV file in the CSVTabularDataEditor
  2. Resize a row or column
  3. Double click on the cell to edit

Screenshots

Additional context

  • Probably need to adjust updatePosition()
  • Look into createWidget for an InputCellEditor
  • Look into creating a PR for Lumino for this functionality once verified and validated

Upgrade movement of the move-line.

Describe the new feature being added
The move line should default to the right side of the column. When moving right, it should maintain its rightward position on whatever column is being hovered over. When crossing a column divide going leftward, the line should snap to the left of the column being highlighted.

How will this feature improve this extension
It is a more intuitive approach to demarcating the selected column.

Describe alternatives you've considered
Line always snaps to the direction of the mouse movement.

Header values get put in the wrong place when the there are more than 26 columns

Actual behavior
When experimenting with a data set with more than 26 columns, header values were being inserted into the first row of the body data on an add column operation.

Expected behavior
Expect the header to be added to the end of the first row.

To Reproduce
Steps to reproduce the behavior:

  1. open TDE with a dataset with more than 26 columns
  2. add a column
  3. For easiest evaluation, use devTools to see what the rawData actually looks like at the end of the operation.

UI/UX for User Story: Filtering and sorting data within JupyterLab

Description

Here is a gif of how you can set up filters and sort your data within JupyterLab.
filter-sort

Also, here are some iterations of the filter menu:

Basic Filter Symbol Cell Menu
Advanced Filter Symbol Cell Menu
Sort + Advanced Filter Symbol Cell Menu

Related Issues

None.

Questions

  • Other than filtering by values, what other key filters do people want when filtering their data (e.g., filter by conditions, filter by color)?

  • Should "Sort" be included in the filter menu?

  • What do you expect on a data table editing toolbar?

Interactive Prototype

Prototype Link

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.