-
Notifications
You must be signed in to change notification settings - Fork 80
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
Embeddable grid in iframes #1904
Conversation
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.
Very cool. I think we might want a way to encode a generic ticket (so, we can fetch application mode tickets, etc); probably something like ?ticket=<hex-or-base64url-encoded>
?
This does get into the realm of URIs that I'm hoping we can support more thoroughly server-side (resolve("<uri>")
); in which case, maybe we want to support encoded URIs instead of tickets directly: ?uri=...
Does it make sense to break out the static media as it's own package that can be further depended on? Looks like we are duplicating about 15M of content:
|
Alternatively, should we have a single entrypoint into our |
Use by creating URL with the correct src and tableName, eg. <iframe src="http://localhost:10000/embed-grid?tableName=miami"></iframe>
The hex ticket can be a follow up ticket. I'll make one entrypoint to our npm pack and re-post. |
At some point we could add ticket hash loading and/or code splitting on routes
# Pull in the published embed-grid package from npmjs and extract is | ||
RUN set -eux; \ | ||
npm pack @deephaven/embed-grid@${WEB_VERSION}; \ |
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.
Just verifying - we expect code-studio and embed-grid to always be in-sync with their versions?
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.
Yes, they should.
tableName
canCopy
,canDownloadCsv
to enable specific functionalityFiltering
Command:
filter
Value:
{ name: string; value: string }[]
- Provide an array of column name and quick filter values to set.Example:
document.getElementById('my-iframe').contentWindow.postMessage({ command: 'filter', value: [{ name: 'A', value: '>50' }, { name: 'B', value: '<4' } ] }, 'http://localhost:4010')
Sorting
Command: 'sort'
Value:
{ name: string, direction?: 'ASC' | 'DESC' }[]
- Provide an array of column names to sort on, and optionally the sort direction (defaults to'ASC'
);Example:
document.getElementById('my-iframe').contentWindow.postMessage({ command: 'sort', value: [{ name: 'A' }, { name: 'B', direction: 'DESC' } ] }, 'http://localhost:4010')