-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Canvas][Docs] Updates Canvas function reference #37614
Conversation
Pinging @elastic/kibana-canvas |
Pinging @elastic/kibana-docs |
💚 Build Succeeded |
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.
👍 LGTM. I just skimmed the diff, but its obviously providing many corrections and additions. We can continue iterating on it and it feels like something we should push sooner rather than later.
17da51d
to
4ff40bb
Compare
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.
My recommendations mostly include format changes, but let me know if you want to chat about any of these.
I'll review another chunk of this tomorrow.
|
||
Outputs the context to the console. | ||
Clears _context_ and returns `null` |
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.
How about:
Clears the _context_, then returns
null.
|
||
|
||
[float] | ||
=== columns | ||
[[columns_fn]] | ||
=== `columns` | ||
|
||
Includes or excludes columns from a data table. If you specify both, this will exclude first. |
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.
How about:
Includes or excludes columns from a data table. TIP: When you specify both options, excludes the first option.
|include | ||
|string | ||
|`include` | ||
|`string` | ||
|A comma separated list of column names to keep in the table |
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.
This should be:
A comma-separated list of column names to include in the data table.
|exclude | ||
|string | ||
|`exclude` | ||
|`string` | ||
|A comma separated list of column names to remove from the table |
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.
This should be:
A comma-separated list of column names to remove from the data table.`
Compares the input to something else to determine true or false. | ||
Usually used in combination with `if`. This only works with primitive types, | ||
such as number, string, and boolean. | ||
Compares the input to something else to determine `true` or `false`. |
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.
How about:
To determine true
or false
, compares the input. TIP: The compare
function works only with primitive types, such as boolean
, number
, and string
. Use compare
with `<<if_fin>>. See also <<eq_fn>>, <<gt_fn>>, <<gte_fn>>, <<lt_fn>>, <<lte_fn>>, and <<neq_fn>>.
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.
Nit: let's also be consistent about ending all entries with periods, (or not)
|
||
Alias: `type` | ||
|`string` | ||
|The name of the demo data set to use |
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.
I'd include a path to the demo data index file.
* Synced up docs with function defs * Updated docs with changes from PR elastic#37305 * Merged canvas function ref into a single doc * Fixed arg order * Fixed typo * Added alphabet links * Added alphabet headers * Removed B header * Added missing args from * Added edits from PR elastic#37614 * Updated containerStyle * Removed metafields. ESSQL doesn't support retrieving metafields * Edits to function copy * More edits * More edits * Final round of edits * Fixed i18n errors * Addressing feedback * Fixed jest test * Fixed missing import * Fixed i18n error * Restored metaFields arg in esdocs * Extracted i18n string constants * Fixed i18n errors * Updated translation files
* Synced up docs with function defs * Updated docs with changes from PR #37305 * Merged canvas function ref into a single doc * Fixed arg order * Fixed typo * Added alphabet links * Added alphabet headers * Removed B header * Added missing args from * Added edits from PR #37614 * Updated containerStyle * Removed metafields. ESSQL doesn't support retrieving metafields * Edits to function copy * More edits * More edits * Final round of edits * Fixed i18n errors * Addressing feedback * Fixed jest test * Fixed missing import * Fixed i18n error * Restored metaFields arg in esdocs * Extracted i18n string constants * Fixed i18n errors * Updated translation files
* Synced up docs with function defs * Updated docs with changes from PR elastic#37305 * Merged canvas function ref into a single doc * Fixed arg order * Fixed typo * Added alphabet links * Added alphabet headers * Removed B header * Added missing args from * Added edits from PR elastic#37614 * Updated containerStyle * Removed metafields. ESSQL doesn't support retrieving metafields * Edits to function copy * More edits * More edits * Final round of edits * Fixed i18n errors * Addressing feedback * Fixed jest test * Fixed missing import * Fixed i18n error * Restored metaFields arg in esdocs * Extracted i18n string constants * Fixed i18n errors * Updated translation files
* [Canvas][Docs] Merge Canvas function references (#38300) * Synced up docs with function defs * Updated docs with changes from PR #37305 * Merged canvas function ref into a single doc * Fixed arg order * Fixed typo * Added alphabet links * Added alphabet headers * Removed B header * Added missing args from * Added edits from PR #37614 * Updated containerStyle * Removed metafields. ESSQL doesn't support retrieving metafields * Edits to function copy * More edits * More edits * Final round of edits * Fixed i18n errors * Addressing feedback * Fixed jest test * Fixed missing import * Fixed i18n error * Restored metaFields arg in esdocs * Extracted i18n string constants * Fixed i18n errors * Updated translation files * Fixes Canvas doc headers (#40921)
* [Canvas][Docs] Merge Canvas function references (#38300) * Synced up docs with function defs * Updated docs with changes from PR #37305 * Merged canvas function ref into a single doc * Fixed arg order * Fixed typo * Added alphabet links * Added alphabet headers * Removed B header * Added missing args from * Added edits from PR #37614 * Updated containerStyle * Removed metafields. ESSQL doesn't support retrieving metafields * Edits to function copy * More edits * More edits * Final round of edits * Fixed i18n errors * Addressing feedback * Fixed jest test * Fixed missing import * Fixed i18n error * Restored metaFields arg in esdocs * Extracted i18n string constants * Fixed i18n errors * Updated translation files * Fixes Canvas doc headers (#40921) * Fixed imports
Summary
Blocked by #37305.[skip-ci]
The Canvas function references have gotten out of sync with the codebase. I went through each function and updated the docs. I also made a few formatting changes. Changes made in #37305 are reflected in these doc changes.
Changes:
†
marker to indicate an argument can be passed multiple times, which was missing from the docs previouslynull
andany
clear
andprogress
clog
markdown
,timelion
andto
tocanvas-client-functions
boolean
andnull
as valid context types andboolean
as validvalue
type forgt
,gte
,lt
, andlte
because they didn't make sensemin
,max
, andtickSize
inaxisConfig
definitionneq
as validop
value incompare
filterGroup
arg todropdownControl
,exactly
, andtimefilterControl
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] This was checked for cross-browser compatibility, including a check against IE11- [x] Documentation was added for features that require explanation or tutorials- [ ] Unit or functional tests were updated or added to match the most common scenarios- [ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers