Skip to content

[Canvas] Improvements to Expression Editor - #32336

Merged
cqliu1 merged 3 commits into
elastic:masterfrom
cqliu1:canvas/enhance-expression-editor
Mar 7, 2019
Merged

cqliu1 merged 3 commits into
elastic:masterfrom
cqliu1:canvas/enhance-expression-editor

Conversation

@cqliu1

@cqliu1 cqliu1 commented Mar 1, 2019 •

Copy link
Copy Markdown
Contributor

Summary

Closes #23934.
Related to #27697.

This PR adds a couple UX enhancements to the expression editor.

  • adds slider to adjust font size in expression editor
    mar-05-2019 15-34-18

  • adds maximize/minimize button to expand and shrink the expression
    mar-05-2019 15-34-34

Checklist

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

For maintainers

@cqliu1 cqliu1 added WIP Work in progress Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// labels Mar 1, 2019
@cqliu1
cqliu1 requested review from a team as code owners March 1, 2019 19:59
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-canvas

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@ryankeairns

Copy link
Copy Markdown
Contributor

Design PR here -> cqliu1#3

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@cqliu1
cqliu1 force-pushed the canvas/enhance-expression-editor branch from 69ec3ef to 6cc6ae9 Compare March 5, 2019 22:17
@cqliu1
cqliu1 requested review from alexfrancoeur and w33ble March 5, 2019 22:19

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

left over debugging code?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Right! I'll remove it

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

left over debugging code?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll remove this too

@cqliu1 cqliu1 changed the title [Canvas][WIP] Improvements to Expression Editor [Canvas] Improvements to Expression Editor Mar 5, 2019
@cqliu1
cqliu1 requested a review from ryankeairns March 5, 2019 23:11
@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@cqliu1
cqliu1 force-pushed the canvas/enhance-expression-editor branch from f65e2f2 to 59ff226 Compare March 5, 2019 23:52
@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@shaunmcgough

Copy link
Copy Markdown

Hi there. This is a great feature that keeps it simple while adding a lot of functionality. Great work. When I am looking at this, I noticed the following behavior. Here are some steps to reproduce. Note I am using the eCommerce - Revenue Tracking dashboard.

  1. Click on one of the pairs of jeans
  2. Click expression editor
  3. Click fullscreen / maximizE
  4. Notice the upper right "Selected Layer" section is still there, and you can scroll through things, toggle between Display and Data, etc.

I don't know if this section is needed in full screen, or perhaps should be a drag out from the right with an arrow to pop it out. What are the thoughts on this section in fullscreen?

@alexfrancoeur alexfrancoeur left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Font size & expand are two much needed features, these look great Catherine! While we're in there, I'd be interested in hearing the groups thoughts on adding a button for previewing a data source from the expression editor. I originally wanted it to help build out custom conditional logic #23162

Probably out of scope for this PR, but thought I'd bring it up if we're making UI/UX improvements.

@ryankeairns

ryankeairns commented Mar 7, 2019 •

Copy link
Copy Markdown
Contributor

@alexfrancoeur The data preview option would be great and I also agree that it should be tackled in a separate PR.

@shaunmcgough We can explore ways to improve that area, but it's going to take a bit of wrangling. Given that, I would vote for moving this change to a separate issue as well. The gap (as it stands) allows for the autocomplete panel to still be functional when it appears above the editor. When we revisit this, I will come up with some options for better utilizing that space - overlay the background content, change the autocomplete to a context menu vs fullwidth panel, etc.

@w33ble

w33ble commented Mar 7, 2019

Copy link
Copy Markdown
Contributor

hearing the groups thoughts on adding a button for previewing a data source

I actually want to take this farther. I would like you to be able to see what your data looks like at any point in the expression. My thought is we could have a "run until cursor" option somewhere (the auto-complete dialog maybe) so you can just use your cursor to control how much of the expression runs. I'm planning to build a POC of that.

}));
setExpression(exp);
},
setFontSize: ({ setFontSize }) => size => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've never tried overriding a prop value like that. That's a neat idea.

@w33ble w33ble left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Such a great improvement! Either one of these would have been a welcome addition on their own. LGTM!

@cqliu1

cqliu1 commented Mar 7, 2019

Copy link
Copy Markdown
Contributor Author

@shaunmcgough @ryankeairns I opened #32671 re: Shaun's feedback. It makes sense to fullscreen the expression editor to cover up the controls up top.

@ryankeairns ryankeairns left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 LGTM

@cqliu1
cqliu1 merged commit 45149c0 into elastic:master Mar 7, 2019
@cqliu1
cqliu1 deleted the canvas/enhance-expression-editor branch March 7, 2019 18:22
cqliu1 added a commit to cqliu1/kibana that referenced this pull request Mar 7, 2019
* Added font size controls and expand/shrink button to expression editor

* style the expression editor controls

* Removed debug code
cqliu1 added a commit to cqliu1/kibana that referenced this pull request Mar 7, 2019
* Added font size controls and expand/shrink button to expression editor

* style the expression editor controls

* Removed debug code
cqliu1 added a commit that referenced this pull request Mar 7, 2019
* Added font size controls and expand/shrink button to expression editor

* style the expression editor controls

* Removed debug code
cqliu1 added a commit that referenced this pull request Mar 7, 2019
* Added font size controls and expand/shrink button to expression editor

* style the expression editor controls

* Removed debug code
@alexfrancoeur

Copy link
Copy Markdown

I actually want to take this farther. I would like you to be able to see what your data looks like at any point in the expression. My thought is we could have a "run until cursor" option somewhere (the auto-complete dialog maybe) so you can just use your cursor to control how much of the expression runs. I'm planning to build a POC of that.

fwiw, love that suggestion @w33ble

patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
* Added font size controls and expand/shrink button to expression editor

* style the expression editor controls

* Removed debug code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:enhancement review Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v7.0.0 v7.2.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants