-
Notifications
You must be signed in to change notification settings - Fork 22
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
Document JupyterLite Notebook custom widget #296
Conversation
✅ Deploy Preview for grist-help-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @alexmojaki, this is helpful.
help/widget-custom.md
Outdated
- `async fetch_selected_table()`: returns the data of the table backing the notebook widget. | ||
- `async fetch_selected_record(row_id=None)`: returns a record of the table backing the notebook widget. If `row_id` is specified, returns the record at that row. Otherwise, returns the record at the current cursor position in a widget linked to the notebook widget. | ||
- `async fetch_table(table_id)`: returns the data of the specified table. Note that this differs from `fetch_selected_table` (even for the same table) in several ways: | ||
- The widget must have full document access. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whatever mkdocs is using for markdown isn't catching the nesting here, the list is staying flat -can you fiddle with spacing or switch to an alternate bullet marker or whatever it needs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, fixed
help/widget-custom.md
Outdated
- `async fetch_selected_record(row_id=None)`: returns a record of the table backing the notebook widget. If `row_id` is specified, returns the record at that row. Otherwise, returns the record at the current cursor position in a widget linked to the notebook widget. | ||
- `async fetch_table(table_id)`: returns the data of the specified table. Note that this differs from `fetch_selected_table` (even for the same table) in several ways: | ||
- The widget must have full document access. | ||
- All columns are included, whereas `fetch_selected_table` excludes columns that are hidden in the widget configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an assumption of full access level here? Wondering if this should be explicitly mentioned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's mentioned in the line above. Also this is just how fetch_table
is, this has nothing to do with my plugin API changes for including more columns.
Similar to #294, this mostly just moves the contents of https://github.com/gristlabs/jupyterlite-widget/blob/main/USAGE.md.