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

[Canvas][Docs] Merge Canvas function references #38300

Merged
merged 31 commits into from
Jul 11, 2019

Conversation

cqliu1
Copy link
Contributor

@cqliu1 cqliu1 commented Jun 6, 2019

Summary

Blocked by #37614. All changes from #37614 are reflected in this PR.

It's no longer useful to distinguish between common, client, and server from the user's standpoint since only server functions can run on the server while all other functions run on the client without any way of switching between the two.

I've combined all of the functions into a single list of all functions in Canvas.

This PR also covers changes to the function copy/i18n strings.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

- [ ] This was checked for cross-browser compatibility, including a check against IE11

For maintainers

@cqliu1 cqliu1 force-pushed the docs/merge-canvas-fn-refs branch from d682b0b to b08691d Compare June 6, 2019 17:54
@cqliu1 cqliu1 added Team:Docs impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:small Small Level of Effort release_note:skip Skip the PR/issue when compiling release notes labels Jun 6, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-docs

@cqliu1 cqliu1 marked this pull request as ready for review June 6, 2019 17:56
@cqliu1 cqliu1 added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas review labels Jun 6, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-canvas

@elastic elastic deleted a comment from elasticmachine Jun 6, 2019
@cqliu1 cqliu1 requested review from ryankeairns and gchaps June 6, 2019 19:13
Copy link
Contributor

@ryankeairns ryankeairns left a comment

Choose a reason for hiding this comment

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

👍 LGTM. I like it!

@cqliu1 cqliu1 force-pushed the docs/merge-canvas-fn-refs branch from 2b8c14e to a9178a3 Compare June 6, 2019 19:25
@cqliu1 cqliu1 requested a review from KOTungseth June 7, 2019 20:18
@cqliu1 cqliu1 force-pushed the docs/merge-canvas-fn-refs branch from a9178a3 to 6eda8b5 Compare June 7, 2019 20:55
@cqliu1 cqliu1 removed the v7.2.0 label Jun 7, 2019
Copy link
Contributor

@KOTungseth KOTungseth left a comment

Choose a reason for hiding this comment

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

Commenting on the correct PR this time!

docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
@cqliu1 cqliu1 force-pushed the docs/merge-canvas-fn-refs branch 2 times, most recently from 2ed90a1 to d5f1c39 Compare June 11, 2019 19:50
Copy link
Contributor

@KOTungseth KOTungseth left a comment

Choose a reason for hiding this comment

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

Another batch of reviews.

docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
@clintandrewhall
Copy link
Contributor

How are we keeping this file in sync with the help strings we're using in the UI? Are we?

Copy link
Contributor

@KOTungseth KOTungseth left a comment

Choose a reason for hiding this comment

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

This is the last of my initial edits. Let me know if you have any questions.

docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
docs/canvas/canvas-function-reference.asciidoc Outdated Show resolved Hide resolved
@cqliu1 cqliu1 added impact:critical This issue should be addressed immediately due to a critical level of impact on the product. and removed impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Jun 19, 2019
Copy link
Contributor

@clintandrewhall clintandrewhall left a comment

Choose a reason for hiding this comment

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

So many excellent changes here. Accepting to unblock, but please review my comments before committing.

examples: Object.values(FontWeight).join(', '),
list: Object.values(FontWeight)
.slice(0, -1)
.map(weight => `\`"${weight}"\``)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I would argue that " and code ticks are a bit redundant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As a formatting decision, I chose to wrap any argument values in back ticks so this show up as inline code. Again related to other comment about markdown, it will render correctly in the docs when they're published, but they will look kinda funky in autocomplete until we can add support for markdown syntax, which I'm hoping I can tackle in the next release (I'm assuming it's a counts as a feature).

@@ -37,7 +37,6 @@ export function lt(): ExpressionFunction<'lt', Context, Arguments, boolean> {
return false;
}

// @ts-ignore #35433 This is a wonky comparison for nulls
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this removed?

#35433

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah I fixed this in #37305, but I didn't realize there was an issue to close. My fault for skimming over the comment. I removed boolean and null as valid context types for gt, gte, lt, and lte. The comment was left behind, so I'm deleting it here, but the change to the function def was merged already.

defaultMessage: 'Return if the context is greater than or equal to the argument',
defaultMessage: 'Returns whether the {context} is greater or equal to the argument.',
values: {
context: '_context_',
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: are these underscores converted with markdown somehow? Or should there be code tick marks in the default message instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently autocomplete in Canvas doesn't support markdown, but I filed an issue a while back to add support for markdown rendering. #38439

This is the same syntax used in asciidoc, so it will show up as italicized in the published docs. For the sake of keeping all the content in sync including text formatting, I kept the syntax in even though you see the raw characters in the autocomplete.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@KOTungseth KOTungseth left a comment

Choose a reason for hiding this comment

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

LGTM!

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@cqliu1 cqliu1 merged commit 0166246 into elastic:master Jul 11, 2019
@cqliu1 cqliu1 deleted the docs/merge-canvas-fn-refs branch July 11, 2019 21:48
cqliu1 added a commit to cqliu1/kibana that referenced this pull request Jul 11, 2019
* 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
cqliu1 added a commit to cqliu1/kibana that referenced this pull request Jul 11, 2019
    * 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
cqliu1 added a commit that referenced this pull request Jul 12, 2019
* [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)
cqliu1 added a commit that referenced this pull request Jul 12, 2019
* [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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:critical This issue should be addressed immediately due to a critical level of impact on the product. loe:large Large Level of Effort release_note:skip Skip the PR/issue when compiling release notes review Team:Docs Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v7.3.0 v7.4.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants