-
Notifications
You must be signed in to change notification settings - Fork 906
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
[Feature] Expressions example plugin #1438
[Feature] Expressions example plugin #1438
Conversation
Signed-off-by: Ashwin Pc <ashwinpc@amazon.com>
Signed-off-by: Ashwin Pc <ashwinpc@amazon.com>
Signed-off-by: Ashwin Pc <ashwinpc@amazon.com>
Signed-off-by: Ashwin Pc <ashwinpc@amazon.com>
Signed-off-by: Ashwin Pc <ashwinpc@amazon.com>
Signed-off-by: Ashwin Pc <ashwinpc@amazon.com>
Signed-off-by: Ashwin Pc <ashwinpc@amazon.com>
"paths": { | ||
"expressionsExample": "." | ||
}, | ||
"translations": ["translations/ja-JP.json"] |
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: probably can remove this. i know this scaffolded on generation
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 wasn't sure if we were going to use these files for the localization that we are reintroducing. Figured if we were, its easier to start from this boilerplate, and if not we can just nuke this and all other .i18nrc.json
files
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.
Awesome!! TY so much. Given that it is an example and not an end user functionality I think most follow-ups can be handle subsequently.
In the developer docs to run and access examples, or specifically to access this example?
@kavilla I'll add to the expression plugin's readme in a followup PR because i dont have all the details i want to add in it yet. As for how to run example plugins, we already have these instructions in the Example plugin folder's readme. I will update this readme too in that followup PR. |
Signed-off-by: Ashwin Pc <ashwinpc@amazon.com>
While the initial PR only made changes to the examples directory, this revision makes 3 changes to the expressions plugin itself. 2 of those changes are w.r.t |
root: true, | ||
extends: ['@elastic/eslint-config-kibana', 'plugin:@elastic/eui/recommended'], | ||
rules: { | ||
'@osd/eslint/require-license-header': 'off', |
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.
don't we require license header for example code?
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.
None of the example files currently have license headers and our linter does not catch them either. Not sure why the examples were skipped, but i can add them to this and the other examples in a followup PR once i confirm the reason.
"navigation", | ||
"expressions", | ||
"developerExamples", | ||
"opensearchDashboardsReact" |
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.
not used?
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 didn't understand your comment @zengyan-amazon. These plugins are used in the expressions-example plugin. Hence marked as required dependencies.
.expExpressionRenderer__expression { | ||
display: flex; | ||
flex-direction: column; | ||
width: 100%; | ||
height: 100%; | ||
overflow: auto; | ||
position: relative; | ||
flex: 1 1 100%; | ||
} |
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.
Will this scss change impact the style of UI components in other places?
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.
No they will not. These styles only affect ReactExpressionRenderer
which is currently not used anywhere in the application and is only used in the example plugin and in ReactExpressionRenderer
unit tests.
* feat(Expressions): Initial demo plugin Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * feat(Expressions): Adds handlers tab Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * feat(Expressions): Adds playground tab Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * chore: Better expression playground messaging Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * feat(Expressions): Adds expression explorer Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * feat(Expressions): A better explorer Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * fix(Expressions): Fix basic demo abort error Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * Updates readme and fixes rendering visualizations Signed-off-by: Ashwin Pc <ashwinpc@amazon.com>
* feat(Expressions): Initial demo plugin Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * feat(Expressions): Adds handlers tab Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * feat(Expressions): Adds playground tab Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * chore: Better expression playground messaging Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * feat(Expressions): Adds expression explorer Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * feat(Expressions): A better explorer Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * fix(Expressions): Fix basic demo abort error Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * Updates readme and fixes rendering visualizations Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> (cherry picked from commit b7ca138)
* feat(Expressions): Initial demo plugin Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * feat(Expressions): Adds handlers tab Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * feat(Expressions): Adds playground tab Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * chore: Better expression playground messaging Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * feat(Expressions): Adds expression explorer Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * feat(Expressions): A better explorer Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * fix(Expressions): Fix basic demo abort error Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> * Updates readme and fixes rendering visualizations Signed-off-by: Ashwin Pc <ashwinpc@amazon.com> (cherry picked from commit b7ca138) Co-authored-by: Ashwin P Chandran <ashwinpc@amazon.com>
Description
We have a few example plugins that demonstrate how to use the various OpenSearch Dashboards features like UIActions, Embeddables, etc. This add to that list by creating an example plugin for
expressions
. It has 3 basic example for the main 3 features forembeddables
, a playground to explore expressions and finally an explorer to explore and discover all the registered expression functionsexpressions.example.mp4
Issues Resolved
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr