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

Spreadsheet mode #32

Open
ajvsol opened this issue Nov 18, 2017 · 2 comments
Open

Spreadsheet mode #32

ajvsol opened this issue Nov 18, 2017 · 2 comments

Comments

@ajvsol
Copy link

ajvsol commented Nov 18, 2017

Calculist allows a lot of computation similar to a spreadsheet but doesn't quite have a spreadsheet modality. This could be implemented via setting a particular item as the table title (e.g. #29 for configuring metadata via a $properties sub-item).

Example:

    New Example Spreadsheet
        $properties
            View Type [=] Spreadsheet
            Spreadsheet Columns [=]
                Colour
                Size
                Flavour

When the $property Spreadsheet Columns is created it would create two new items named Rows and Row 1.

Then when each Spreadsheet Column e.g. Colour is added it would similarly add a corresponding sub-item for it below Row 1 (adding each letter in real-time or when the user moves their cursor position).

    New Example Spreadsheet
        $properties
            View Type [=] Spreadsheet
            Spreadsheet Columns [=]
                Colour
                Size
                Flavour
        Rows
            Row 1
                Colour [=]
                Size [=]
                Flavour [=]

New row creation would happen simply by pressing the Enter key when the cursor position is at the last column of the last row. Instead of only creating a new empty item as per usual, it would automatically prepopulate with Row 2 and all of the relevant sub-items/columns with no set values.

    Row 1
        Colour [=] Red
        Size [=] Large
        Flavour [=] Banana
    Row 2
        Colour [=]
        Size [=]
        Flavour [=]

It should also be impossible to delete the items within each row, and trying to do so only empties the "cells". To delete the columns completely it has to be done by deleting the relevant column Spreadsheet Columns from the $properties section.

    Row 1
        Colour [=] 
        Size [=] 
        Flavour [=] 

Spreadsheets in Calculist implemented also can play well with other Calculist features, for example:

  • Command mode on one of Spreadsheet Columns values e.g. sort columns A-Z
  • Computation within each cell/item
  • Accessors to reference columns, rows or cells in a simple format like Excel's e.g. Row 1 or Column A or Item A3:A7

I think this is a decent draft of how to make a spreadsheet work within Calculist and fits in line with it's overall approach (although challenging to implement), let me know what you think.

@danallison
Copy link
Member

Thanks for these ideas @neomodern .

I've just created a function called table for rendering items as a table (calculist/calculist-web@4980950). This does not add any additional modes or behaviors like what you've described. It is purely a visual function. For example, the table in the screenshot below has the text

[=] table(table_data)

screenshot from 2017-11-18 19-51-36

It's interesting to think about how this could become interactive as a spreadsheet, and how metadata would play a role. I like the ideas you've suggested and will keep them in mind. I need to think on this some more before I can provide meaningful feedback.

danallison referenced this issue in calculist/calculist-web Nov 19, 2017
@ajvsol
Copy link
Author

ajvsol commented Nov 20, 2017

Didn't know if you'd be interested in the making a GUI for the spreadsheet which is why I focused on functionality but now you have it I am very much enjoying using it :D this is excellent for displaying some data I have which I felt wasn't suited to the outliner format such as a decision matrix so thank you very much!

I'd say the main tricky thing about using a visual spreadsheet like this is that I keep trying to click on the cells to update them like that but that's not possible. Another useful enhancement could be making the tables embeddable by its guid (though I haven't attempted this yet) as well as adding tabs/sheets so different data can display in the same table item.

Thanks for your quick response to this idea, glad to help provide some inspiration :)

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

No branches or pull requests

2 participants