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] Adds edit menu #64738

Merged
merged 5 commits into from
Apr 30, 2020
Merged

[Canvas] Adds edit menu #64738

merged 5 commits into from
Apr 30, 2020

Conversation

cqliu1
Copy link
Contributor

@cqliu1 cqliu1 commented Apr 29, 2020

Summary

Related to #35873.

This changes the element options menu from the right sidebar into an edit menu in the Canvas top menu.

Screen Shot 2020-04-28 at 8 35 14 PM

This menu is context aware and will enable certain menu options only when those actions make sense.

Examples

No elements selected and no stored paste data

Every option except Undo and Redo are disabled

Screen Shot 2020-04-28 at 9 51 44 PM

No elements selected with stored paste data

Paste is enabled

Screen Shot 2020-04-28 at 9 47 34 PM

Single element selected

Group, Alignment, and Distribution are disabled

Screen Shot 2020-04-28 at 9 47 47 PM

Single grouped element selected

Order, Alignment, and Distribution are disabled

Screen Shot 2020-04-28 at 9 54 51 PM

Two elements selected

Order and Distribution are disabled

Screen Shot 2020-04-28 at 9 48 41 PM

Three or more elements selected

Order is disabled

Screen Shot 2020-04-28 at 9 48 51 PM

Changes:

  • moves element options menu from SidebarHeader to EditMenu
  • adds Undo and Redo options to the edit menu
  • converts SidebarHeader from a class component to a function component
  • removes title from ShareMenu context menu to reduce redundancy

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@cqliu1 cqliu1 added the WIP Work in progress label Apr 29, 2020
@cqliu1 cqliu1 added impact:critical This issue should be addressed immediately due to a critical level of impact on the product. loe:medium Medium Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v7.8.0 v8.0.0 labels Apr 29, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-canvas (Team:Canvas)

@cqliu1 cqliu1 added review enhancement New value added to drive a business result release_note:enhancement and removed WIP Work in progress labels Apr 29, 2020
@cqliu1 cqliu1 marked this pull request as ready for review April 29, 2020 16:21
@cqliu1 cqliu1 requested a review from a team as a code owner April 29, 2020 16:21
@ryankeairns ryankeairns self-requested a review April 29, 2020 17:47
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. Design looks spot on, all functionality works as expected. Well done!

Copy link
Contributor

@crob611 crob611 left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@cqliu1
Copy link
Contributor Author

cqliu1 commented Apr 30, 2020

@elasticmachine merge upstream

@cqliu1 cqliu1 merged commit f9c1033 into elastic:master Apr 30, 2020
@cqliu1 cqliu1 deleted the canvas/edit-menu branch April 30, 2020 21:51
cqliu1 added a commit to cqliu1/kibana that referenced this pull request Apr 30, 2020
@cqliu1 cqliu1 mentioned this pull request Apr 30, 2020
7 tasks
cqliu1 added a commit that referenced this pull request May 1, 2020
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

v1v added a commit to v1v/kibana that referenced this pull request May 4, 2020
* upstream/master: (315 commits)
  [APM] Fix failing `ApmIndices` test (elastic#64965)
  [APM] Fix paths for ts optimization script (elastic#65012)
  Use HDR for percentiles (elastic#64758)
  [EPM] fix updates available filter (elastic#64957)
  [Uptime] Certificates page (elastic#64059)
  load lens app lazily (elastic#64769)
  [legacy/server/config] remove unnecessary deps for simple helper (elastic#64954)
  Fixed alert Edit flyout shows the error message when one of this actions has a preconfigured action type (elastic#64742)
  [data.search.aggs] Remove legacy aggs APIs. (elastic#64719)
  Fixed `AddAlert` flyout does not immediately update state to reflect new props (elastic#64927)
  [Discover] Show doc viewer action buttons on focus (elastic#64912)
  [EPM] restrict package install endpoint from installing/updating to old packages (elastic#64932)
  [Metrics UI] Add inventory metric threshold alerts (elastic#64292)
  [Canvas] Adds edit menu (elastic#64738)
  [Canvas] Adds refresh and autoplay options to view menu (elastic#64375)
  [Lens] Trigger a filter action on click in datatable visualization (elastic#63840)
  [SIEM][CASE] Refactor Connectors - Jira Connector (elastic#63450)
  [APM] Client new platform migration (elastic#64046)
  [Monitoring] NP Migration complete client cutover (elastic#62908)
  Ingest Node Pipelines UI (elastic#62321)
  ...
jloleysens added a commit to jloleysens/kibana that referenced this pull request May 4, 2020
…or-part-mvp-2

* 'master' of github.com:elastic/kibana: (51 commits)
  [APM] Fix failing `ApmIndices` test (elastic#64965)
  [APM] Fix paths for ts optimization script (elastic#65012)
  Use HDR for percentiles (elastic#64758)
  [EPM] fix updates available filter (elastic#64957)
  [Uptime] Certificates page (elastic#64059)
  load lens app lazily (elastic#64769)
  [legacy/server/config] remove unnecessary deps for simple helper (elastic#64954)
  Fixed alert Edit flyout shows the error message when one of this actions has a preconfigured action type (elastic#64742)
  [data.search.aggs] Remove legacy aggs APIs. (elastic#64719)
  Fixed `AddAlert` flyout does not immediately update state to reflect new props (elastic#64927)
  [Discover] Show doc viewer action buttons on focus (elastic#64912)
  [EPM] restrict package install endpoint from installing/updating to old packages (elastic#64932)
  [Metrics UI] Add inventory metric threshold alerts (elastic#64292)
  [Canvas] Adds edit menu (elastic#64738)
  [Canvas] Adds refresh and autoplay options to view menu (elastic#64375)
  [Lens] Trigger a filter action on click in datatable visualization (elastic#63840)
  [SIEM][CASE] Refactor Connectors - Jira Connector (elastic#63450)
  [APM] Client new platform migration (elastic#64046)
  [Monitoring] NP Migration complete client cutover (elastic#62908)
  Ingest Node Pipelines UI (elastic#62321)
  ...

# Conflicts:
#	x-pack/plugins/ingest_pipelines/common/types.ts
#	x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form.tsx
#	x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_fields.tsx
#	x-pack/plugins/ingest_pipelines/public/shared_imports.ts
gmmorris added a commit to gmmorris/kibana that referenced this pull request May 4, 2020
* master: (44 commits)
  onEvent prop for expression component (elastic#64995)
  [APM] Fix failing `ApmIndices` test (elastic#64965)
  [APM] Fix paths for ts optimization script (elastic#65012)
  Use HDR for percentiles (elastic#64758)
  [EPM] fix updates available filter (elastic#64957)
  [Uptime] Certificates page (elastic#64059)
  load lens app lazily (elastic#64769)
  [legacy/server/config] remove unnecessary deps for simple helper (elastic#64954)
  Fixed alert Edit flyout shows the error message when one of this actions has a preconfigured action type (elastic#64742)
  [data.search.aggs] Remove legacy aggs APIs. (elastic#64719)
  Fixed `AddAlert` flyout does not immediately update state to reflect new props (elastic#64927)
  [Discover] Show doc viewer action buttons on focus (elastic#64912)
  [EPM] restrict package install endpoint from installing/updating to old packages (elastic#64932)
  [Metrics UI] Add inventory metric threshold alerts (elastic#64292)
  [Canvas] Adds edit menu (elastic#64738)
  [Canvas] Adds refresh and autoplay options to view menu (elastic#64375)
  [Lens] Trigger a filter action on click in datatable visualization (elastic#63840)
  [SIEM][CASE] Refactor Connectors - Jira Connector (elastic#63450)
  [APM] Client new platform migration (elastic#64046)
  [Monitoring] NP Migration complete client cutover (elastic#62908)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result impact:critical This issue should be addressed immediately due to a critical level of impact on the product. loe:medium Medium Level of Effort release_note:enhancement review Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants