Commit graph

117 commits

Author SHA1 Message Date
Marco Liberati 898385c2e2
[Lens] Clean full reference operation error state when switching to other operation (#87064)
* 🐛 Make sure to check incomplete columns before saved ones

* ⚗️ Try a different approach

* 🐛 Isolate the fullRef to field transition and trigger the removal + tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-18 16:58:23 +01:00
Jonathan Budzenski 51ba94d3e5
[dev] Replace sass-lint with stylelint (#86177)
Co-authored-by: Tyler Smalley <tylersmalley@me.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dave Snider <dave.snider@gmail.com>
2021-01-15 11:52:29 -06:00
Anton Dosov d3303f28bb
[Search] Search Sessions with relative time range (#84405) 2021-01-12 14:51:04 +01:00
Joe Reuter 94b02d97ed
[Lens] Implement deep linking and embedding (#84416) 2021-01-12 10:45:53 +01:00
Josh Dover 0af81310b6
Remove dynamic mapped types from UiActions (#87075)
* Remove dynamic mapped types from UiActions

* Remove import between data <-> embeddables

* remove outdated comments, export action types from discover_enhanced

* fix notice.txt

Co-authored-by: restrry <restrry@gmail.com>
2021-01-05 10:11:05 +01:00
Marco Liberati bd908c6ba3
[Lens] Integrate searchSessionId into Lens app (#86297)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-29 14:18:30 +01:00
Joe Reuter 57a72a78f7
[Lens] Configurable color syncing (#86180) 2020-12-22 17:35:27 +01:00
Wylie Conlon 23fd044562
[Lens] Introduce 4 new calculation functions: counter rate, cumulative sum, differences, and moving average (#84384)
* [Lens] UI for reference-based functions

* Fix tests

* Add a few unit tests for reference editor

* Respond to review comments

* Update error handling

* Update suggestion logic to work with errors and refs

* Support ParamEditor in references to fix Last Value: refactoring as
needed

* Fix error states

* Update logic for showing references in dimension editor, add tests

* Fix tests

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-22 10:33:27 -05:00
Joe Reuter 388b2508b3
[Lens] Make sure Lens does not reload unnecessarily (#86092) 2020-12-21 14:26:14 +01:00
Luke Elmers 9a3e2910a3
App Services: Remove remaining uiActions, expressions, data, embeddable circular dependencies. (#82791)
* Move applyFilter, selectRange, valueClick triggers to data/embeddables.

* Update imports.

* Remove embeddable references to non-existent data plugin dependency.

* remove data mocks from embeddable

* Remove query, filters, timeRange from EmbeddableInput and move to apps.

* Remove data plugin imports from embeddable test samples.

* Remove circular dependencies caused by expressions renderer handlers.

* Update circular deps allowList.

* Remove data dependency on embeddable.

* Revert accidental data plugin change.

* Fix new circular deps issues.

* Update generated docs.

* Fix type errors in vis_type_xy

* Fix inspector data table.
2020-12-18 18:34:07 -07:00
Peter Pisljar b93034b72c
inspector table adapter cleanup (#84232) 2020-12-17 12:14:07 +01:00
Marta Bondyra 5b9e285582
[Lens] (Accessibility) focus on adding/removing layers (#84900) 2020-12-16 21:58:14 +01:00
Marco Liberati 62623cdab9
[Lens] New sorting feature for the datatable visualization (#84435)
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-15 12:37:59 +01:00
Vadim Dalecky b01a327076
Row trigger 2 (#83167)
* feat: 🎸 add ROW_CLICK_TRIGGER

* feat: 🎸 wire row click event to UI Actions trigger in Lens

* feat: 🎸 add row click trigger to url drilldown

* feat: 🎸 add datatable to row click context

* feat: 🎸 pass in row index in row click trigger context

* feat: 🎸 add columns to row click trigger context

* feat: 🎸 fill values and keys event scope array

* feat: 🎸 generate correct row scope variables

* fix: 🐛 report triggers from lens embeddable

* feat: 🎸 add sample preview for row click trigger

* feat: 🎸 remove url drilldown preview box

* chore: 🤖 remove mock variable generation functions

* feat: 🎸 generate context and global variable lists

* feat: 🎸 preview event variable list

* feat: 🎸 show empty url error on blur

* feat: 🎸 add ability to always show popup for executed actions

* refactor: 💡 rename multiple action execution method

* fix: 🐛 don't add separator befor group on no main items

* feat: 🎸 wire in uiActions service into datatable renderer

* feat: 🎸 check each row if it has compatible row click actions

* feat: 🎸 allow passing data to expression renderer

* feat: 🎸 add isEmbeddable helper

* feat: 🎸 pass embeddable to lens table renderer

* feat: 🎸 hide lens table row actions which are empty

* feat: 🎸 re-render lens embeddable when dynamic actions chagne

* feat: 🎸 hide actions column if there are no row actions

* feat: 🎸 re-render lens embeddable on view mode chagne

* fix: 🐛 fix TypeScript errors

* chore: 🤖 fix TypeScript errors

* docs: ✏️ update auto-generated docs

* feat: 🎸 add hasCompatibleActions to expression layer

* feat: 🎸 remove "data" from expression renderer handlers

* fix: 🐛 fix TypeScript errors

* test: 💍 fix Jest tests

* docs: ✏️ update autogenerated docs

* fix: 🐛 wrap event payload into data

* test: 💍 add "alwaysShowPopup" test

* chore: 🤖 add comment requested in review

https://github.com/elastic/kibana/pull/83167#discussion_r537340216

* test: 💍 add hasCompatibleActions test

* test: 💍 add datatable renderer test

* test: 💍 add Lens embeddable input change tests

* test: 💍 add embeddable row click test

* fix: 🐛 add url validation

* test: 💍 add url drilldown tests

* docs: ✏️ remove url drilldown preview from docs

* docs: ✏️ remove preview from url templating

* docs: ✏️ add row click description

* chore: 🤖 move 36.5 KB bundle balance to url_drilldown

* test: 💍 simplify test case

* style: 💄 change types places

* refactor: 💡 clean up panel variable generation

* test: 💍 add getPanelVariables() tests

* fix: 🐛 generate runtime variables correctly

* fix: 🐛 improve getVariableList() and add tests for it

* feat: 🎸 add translation, improve types
2020-12-14 13:28:23 +01:00
Anton Dosov cb29438b0d
[Search] Fix dashboard embeddables don't refetch on searchSessionId change (#84261) 2020-12-10 14:21:35 +01:00
Joe Reuter 33c552feee
[Lens] Use eui component instead of custom color stops (#85239) 2020-12-09 16:06:25 +01:00
Wylie Conlon 0fdf76e779
[Lens] Don't assign dimension until it becomes valid (#84972) 2020-12-08 11:29:07 +01:00
Marta Bondyra 2cf4e72394
[Lens] (Accessibility) Added focus state and accessible name to suggestions (#84653)
* [Lens] (Accessibility) Added focus state and accessible name to suggestions

* Apply suggestions from code review

* Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx

padding oops

* cr
2020-12-04 19:28:33 +01:00
Wylie Conlon f176e8b7fd
[Lens] Remove extra render when closing flyout with valid column (#84951)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-04 11:00:10 -05:00
Marta Bondyra 1ff2bb3d8a
[Lens] allow drag and drop reorder on xyChart for y dimension (#84640)
* [Lens] allow drag and drop on xyChart for y dimension

* wip

* tests

* dimension panel fix

* eslint

* fix test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-03 20:30:42 +01:00
Marta Bondyra 145c0a5128
Revert "[Lens] (Accessibility) Focus mistakenly stops on righthand form (#84519)" (#84866)
This reverts commit a9845c6fc2.
2020-12-03 14:12:14 +01:00
Marta Bondyra 487eb2e4e4
[Lens] accessibility screen reader issues (#84395)
* [Lens] accessibility screen reader issues

* fix i18n

* fix: no aria-label on divs

* cr fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-03 13:28:41 +01:00
Marco Liberati 17d986e499
[Embeddable] Export CSV action for Lens embeddables in dashboard (#83654)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-03 10:46:51 +01:00
Marta Bondyra 6900ce2b96
[Lens] Provide single-value functions to show the "First" or "Last" value of some field (#83437) 2020-12-02 19:55:58 +01:00
Wylie Conlon c73de26773
[Lens] Refactor function selection invalid state (#84599)
* [Lens] Refactor function selection invalid state

* Fix types per review comment
2020-12-02 11:16:59 -05:00
Marta Bondyra 9d25669db1
[Lens] (Accessibility) Improve landmarks in Lens (#84511) 2020-12-01 15:03:38 +01:00
Marta Bondyra a9845c6fc2
[Lens] (Accessibility) Focus mistakenly stops on righthand form (#84519) 2020-12-01 15:02:59 +01:00
Marta Bondyra f23d2e6ea1
[Lens] (Accessibility) add aria-label to chart type icon (#84493) 2020-11-30 15:45:26 +01:00
Joe Reuter a763d3302f
[Lens] Calculation operations (#83789) 2020-11-25 09:43:23 +01:00
Joe Reuter 38a09b99c4
Expression: Add render mode and use it for canvas interactivity (#83559) 2020-11-24 18:42:02 +01:00
Mikhail Shustov 5ec6fe315f
[DX] Bump TS version to v4.1 (#83397)
* bump version to 4.1.1-rc

* fix code to run kbn bootstrap

* fix errors

* DO NOT MERGE. mute errors and ping teams to fix them

* Address EuiSelectableProps configuration in discover sidebar

* use explicit type for EuiSelectable

* update to ts v4.1.2

* fix ts error in EuiSelectable

* update docs

* update prettier with ts version support

* Revert "update prettier with ts version support"

This reverts commit 3de48db3ec.

* address another new problem

Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
2020-11-24 16:04:33 +01:00
Marco Liberati 423888c14e
[Lens] CSV Export for Lens (#83430)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-24 12:37:27 +01:00
Mikhail Shustov 95861a0fb0
[DX] Prettier v2.2 (#83899)
* update prettier with ts version support

* mute type-error

* run prettier on codebase

* fix examples

* fix errors after master merged
2020-11-23 13:17:05 +01:00
Wylie Conlon b50e7ba7da
[Lens] Implement types for reference-based operations (#83603)
* [Lens] Implement types for reference-based operations

* Update from review feedback
2020-11-20 13:42:12 -05:00
Mikhail Shustov 4917df30b9
Update typescript eslint to v4.8 (#83520)
* update deps

* update rules

use type-aware @typescript-eslint/no-shadow instead of no-shadow. do not use no-undef, rely on TypeScript instead

* fix or mute all lint errors

* react-hooks eslint plugin fails on ? syntax

* fix wrong typings in viz

* remove React as a global type

* fix eslint errors

* update version to 4.8.1

* fix a new error
2020-11-18 18:23:08 +01:00
Joe Reuter 95e44f25a6
[Lens] Color in dimension trigger (#76871) 2020-11-17 10:19:13 +01:00
Tyler Smalley aba2068291
Consolidates Jest configuration files and scripts (#82671)
Jest tests are currently organized into main configuration files (src/dev/jest/config.js and x-pack/dev-tools/jest/create_jest_config.js). Both of these are similar, but very slightly due to  previously being in separate repositories. This change consolidates the scripts referenced in those configs and moves them to the `@kbn/test` project.

OSS contained an alias for `test_utils`. Those aliases have been removed in favor of importing these utilities from `@kbn/test/jest`

Blocker to #72569

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-11-12 16:19:56 -08:00
Wylie Conlon ccb0b35452
[Lens] Use entire layers, not specific columns (#82550)
* [Lens] Use entire layers, not specific columns

* Fix types

* Move all of state_helpers over

* Fix tests

* Fix crash and add tests to prevent future issues

* Prevent users from dropping duplicate fields

* Respond to review feedback

* Fix review feedback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-10 13:45:46 -05:00
Luke Elmers c6afc47f32
Remove data <--> expressions circular dependencies. (#82685) 2020-11-09 13:01:22 -07:00
Marco Liberati 97e2dc853b
[Lens] Extend Datasource props validation with VisualizationGroups (#82607)
*  First pass with visualization validation + error messages

* 🔥 Remove indexpattern error handling for now

* 🏷️ Fix type issues

*  Add getErrorMessage test for data table

*  Add tests for pie and metric error messages

* 🌐 Fix i18n checks issues

* 🐛 Fix last issue

*  Add more tests for the XY visualization validation code

* 👌 Included all feedback from first review

* ✏️ Off by one message

* 🌐 Fix i18n duplicate id

* 🌐 Fix last i18n issue

* 🐛 Fixed a hook reflow issue

* ♻️+ Reworked validation flow + tests

* 🏷️ Fix type issue

* 🐛 Improved XY corner cases validation logic

* 🐛 Fix empty datatable scenario

*  +  Improved error messages for invalid datasources + tests

* 🌐 Add missing i18n translation

* 🏷️ Fix type issues

* 🌐 Fix i18n issues

*  Filter out suggestions which fail to build

* 🚚 Migrate datatable validation logic to the building phase, handling it as building state

* 🏷️ Fix type issue

* ✏️ Add comment for future enhancements

* ✏️ Updated comment

* :world_with_meridians: Refactor axis labels

* 🌐 Reworked few validation messages

* 🐛 Fix break down validation + percentage charts

*  Align tests with new validation logic

* ♻️ Fix suggestion panel validation to match main panel

* 🌐 Fix i18n issues

* 🔧 Fix some refs for validation checks in suggestions

* 🐛 Fix missing key prop in multiple errors scenario

* 🐛 Fix swtich issue from XY to partition

* 🌐 Fix i18n messages and aligned tests

* 🐛 Fix suggestions switching bug

* :refactor: Add more validation + refactored validation logic in a single place

* ✏️ Add note about lint hooks disable rule

* 🚨 Fix linting issue

* 🏗️ Add infra API for datasource advanced validation

*  Align tests with new API

*  Fix type issues in tests

* 👌 Early exists added

*  Add layers groups to the API

*  Fix some broken test after the validation change

* 👌 Move to disctionary shape

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-09 15:22:21 +01:00
Joe Reuter 651345b18b
[Lens] Expose active data in some places (#79851) 2020-11-06 17:05:34 +01:00
Joe Reuter d83167629c
fix underlying data drilldown for Lens (#82737) 2020-11-06 12:18:54 +01:00
Devon Thomson 7c66880a11
[Time to Visualize] Embeddable Error Handling Without ReplacePanel (#82201)
Fixed embeddable error handling so that fatal errors are caught and displayed with an errorEmbeddable no matter when they occur.
2020-11-05 11:11:29 -05:00
Kim S. Ly 52e8d1459c
[Lens] Remove visible title in workspace panel (#82234) 2020-11-05 14:33:56 +01:00
Marco Liberati 53ea09078f
[Lens] Visualization validation and better error messages (#81439)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-04 18:28:00 +01:00
Joe Reuter fe3b0538ff
[Lens] Categorical color palettes (#75309) 2020-11-04 11:27:52 +01:00
Marta Bondyra 6689167b64
[Lens] Drag within dimension group to reorder (#80547) 2020-11-03 21:18:44 +01:00
Joe Reuter d8c37fe890
[Lens] Reload on change via history object (#81753) 2020-11-03 14:29:56 +01:00
Devon Thomson 8c1b2157df
[Time to Visualize] Small Attribute Service Fixes (#82072)
* Removed some dashboard-centric wording from the Attribute Service & removed type argument from save method
2020-11-02 11:25:53 -05:00
Joe Reuter 512c35e70b
fix Lens heading structure (#81752) 2020-10-30 11:20:54 +01:00