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

Document JupyterLite Notebook custom widget #296

Merged
merged 3 commits into from
Jan 4, 2024
Merged

Conversation

alexmojaki
Copy link
Collaborator

Similar to #294, this mostly just moves the contents of https://github.com/gristlabs/jupyterlite-widget/blob/main/USAGE.md.

Copy link

netlify bot commented Jan 4, 2024

Deploy Preview for grist-help-preview ready!

Name Link
🔨 Latest commit 646f4fc
🔍 Latest deploy log https://app.netlify.com/sites/grist-help-preview/deploys/659692057ee5b7000832a249
😎 Deploy Preview https://deploy-preview-296--grist-help-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@paulfitz paulfitz left a 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.

- `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.
Copy link
Member

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, fixed

- `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.
Copy link
Member

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.

Copy link
Collaborator Author

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.

@alexmojaki alexmojaki merged commit e8823b5 into master Jan 4, 2024
5 checks passed
fflorent pushed a commit to fflorent/grist-help that referenced this pull request Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants