## Summary
Closes https://github.com/elastic/kibana/issues/161047
- Removes the `save as` top nav menu button
- Also renames nav menu item `clone` to `duplicate` and make it
available in edit mode.
- The save dashboard modal no longer displays and open to save the
dashboard in context as new, given that we've chosen to explicitly
create a copy of the dashboard in context when either of the the
`duplicate` or `saveas` menu option is selected.
- includes bug fix for an issue where clicking the dashboard modal
scrolled the user to the content bottom, see
https://github.com/elastic/kibana/pull/180938#issuecomment-2117586572
## Before
### View mode
<img width="1728" alt="Screenshot 2024-04-16 at 15 59 10"
src="48dc4565-1f75-4f46-839c-8d76f4fedefe">
### Edit mode
<img width="1725" alt="Screenshot 2024-04-16 at 15 59 00"
src="1ac743ac-33b4-4f68-ab59-ad19ab58fa1c">
## After
#### Managed Dashboard
5072a501-8d16-4f25-9575-6f11fed6e580
#### View mode
610d0952-97f0-46b8-a0ea-1546a799d387
#### Edit mode
4f596c07-7bd1-4c5a-9131-0c78731cb113
<!-- ### Checklist
Delete any items that are not applicable to this PR.
- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.
When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:
| Risk | Probability | Severity | Mitigation/Notes |
|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
-->
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Updates to the panel title flyout behavior to be more strict about changes to the title, including...
- Input defaults to the actual title when empty (`""`), no longer fills
with default viz `title`/`description`.
- Uses the default title/description when the value is `undefined`, such
that the value has never been set.
- Adds a clear button to the `title` input.
- `Reset` wording replaced with `Reset to default`, for `title` and
`description`.
- Only shows reset if there is a `default` non-empty
`title`/`description` to reset to, applies mostly to by-value viz.
- Changes the inspect panel `title` to always match the panel `title`
and show `"[No Title]"` when empty.
Closes https://github.com/elastic/kibana/issues/181172
## Summary
This PR fixes a bug where panels were not showing descriptions from
library items - this is because (1) we weren't providing the
`defaultPanelDescription` as part of the default embeddable API and (2)
the panel header was not defaulting to the `defaultPanelDescription`
when a panel description was not provided.
Because of (1), the panel settings flyout showed a blank description
**despite** having the correct logic for defaulting to the default panel
description - that is why the tests in `customize_panel_editor.test.tsx`
passed but it didn't work in production.
### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
## Summary
@dej611 shared with me a way to look for code duplication in Kibana repo
and I did a quick check in FTR page objects / services
```
npx jscpd --ignore '**/target/**,**/*.d.ts,*.json,**/*spec*,**/test_suites/**' **/test*/**/page_objects/** -r html
npx jscpd --ignore '**/target/**,**/*.d.ts,*.json,**/*spec*,**/test_suites/**' **/test*/**/services/** -r html`
```
I was able to find not only easy to fix duplications, but also
non-longer used service and functions. This PR just a small cleanup :)
---------
Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
Closes https://github.com/elastic/kibana/issues/170396
Closes https://github.com/elastic/kibana/issues/135459
## Summary
This PR adds the option to **stop** selections from being auto-applied -
instead, authors can make it so that their selections are only applied
once the new apply button is clicked:
d785631c-0aa5-4e3f-81f9-2d1d0f582b70
### Brief Summary of Changes
- **Publishing Filters**
We used to publish the control group filters as soon as **any** child
changed its output - however, if the apply button is enabled, this logic
no longer works. So, we added an extra step to the publishing of
filters:
1. When a child's output changes, we check if the apply button is
enabled
2. If it is disabled, we publish the filters to the control group output
right away (like we used to); otherwise, we push the new filters to the
`unpublishedFilters` array.
3. Clicking the apply button will publish the `unpublishedFilters`
array.
- **Unsaved Changes**
We used to publish control group unsaved changes whenever **anything**
about the children panels' persistable input changed - however, this no
longer works with the apply button because we **don't** want selections
to trigger unsaved changes when it is enabled.
To get around this, we **no longer** take into account selections when
checking for unsaved changes - instead, we compare the **output
filters** from the control group to determine whether anything about the
children changed. As described above, if the control group has
"auto-apply selections" turned off, the control group waits to change
its output until the apply button is clicked - therefore, unsaved
changes will **also** not be triggered until the apply button is
clicked. This unsaved changes logic works **regardless** of if the apply
button is enabled or not.
- **Saved Object**
This required changes to the **dashboard** saved object because of how
we store the control group input as part of the dashboard SO - so, we
are now on a second version for the Dashboard SO. I've also made this
version **slightly less strict** by allowing unknown attributes in the
schema - that way, unknown attributes will no longer throw an error (as
they do on version 1).
### Checklist
- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nick Peihl <nick.peihl@elastic.co>
### Summary
Refactoring general ui service (test helpers), to a kbn package.
- Optimize methods and drop some code duplication.
### Why
- Makes the service easily available from multiple code areas.
- This is a preparation to potentially moving tests to plugins /
packages, where they would no longer be able to import thing from test
or x-pack/test but only from a package.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Fixes https://github.com/elastic/kibana/issues/160583
Test failed because combobox trying to select already selected tag. PR
fixes test by using combobox service to set element. Combobox service
includes logic to only select value when not selected.

```
[00:07:27] │ debg Find.clickByCssSelector('[data-test-subj="savedObjectTagSelector"]') with timeout=10000
[00:07:27] │ debg Find.findByCssSelector('[data-test-subj="savedObjectTagSelector"]') with timeout=10000
[00:07:27] │ debg TestSubjects.click(tagSelectorOption-tag-1)
[00:07:27] │ debg Find.clickByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:07:27] │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:07:37] │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:07:37] │ Wait timed out after 10003ms
[00:07:38] │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:07:48] │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:07:48] │ Wait timed out after 10038ms
[00:07:48] │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:07:58] │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:07:58] │ Wait timed out after 10054ms
[00:07:59] │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:08:09] │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:08:09] │ Wait timed out after 10013ms
[00:08:09] │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:08:19] │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:08:19] │ Wait timed out after 10038ms
[00:08:20] │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:08:30] │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:08:30] │ Wait timed out after 10005ms
[00:08:30] │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:08:40] │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:08:40] │ Wait timed out after 10034ms
[00:08:41] │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:08:51] │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:08:51] │ Wait timed out after 10037ms
[00:08:51] │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:09:01] │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:09:01] │ Wait timed out after 10007ms
[00:09:02] │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:09:12] │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:09:12] │ Wait timed out after 10054ms
[00:09:13] │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:09:23] │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:09:23] │ Wait timed out after 10037ms
[00:09:23] │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:09:33] │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:09:33] │ Wait timed out after 10042ms
[00:09:34] │ debg --- retry.try error: retry.try timeout: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:09:34] │ Wait timed out after 10042ms
[00:09:34] │ at /var/lib/buildkite-agent/builds/kb-n2-4-spot-ee2d6153f1c6deeb/elastic/kibana-on-merge/kibana/node_modules/selenium-webdriver/lib/webdriver.js:929:17
[00:09:34] │ at processTicksAndRejections (node:internal/process/task_queues:95:5)
[00:09:34] │ info Taking window screenshot "/var/lib/buildkite-agent/builds/kb-n2-4-spot-ee2d6153f1c6deeb/elastic/kibana-on-merge/kibana/x-pack/test/saved_object_tagging/functional/screenshots/failure/saved objects tagging - functional tests dashboard integration creating allows t-29814279444f4d298f24b012c2e451886d9c481ab2ec65240025329c4f56ba13.png"
[00:09:34] │ info Current URL is: http://localhost:5620/app/dashboards#/create?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-15m,to:now))
[00:09:34] │ info Saving page source to: /var/lib/buildkite-agent/builds/kb-n2-4-spot-ee2d6153f1c6deeb/elastic/kibana-on-merge/kibana/x-pack/test/saved_object_tagging/functional/failure_debug/html/saved objects tagging - functional tests dashboard integration creating allows t-29814279444f4d298f24b012c2e451886d9c481ab2ec65240025329c4f56ba13.html
[00:09:34] └- ✖ fail: saved objects tagging - functional tests dashboard integration creating allows to select tags for a new dashboard
[00:09:34] │ Error: retry.try timeout: Error: retry.try timeout: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:09:34] │ Wait timed out after 10042ms
[00:09:34] │ at /var/lib/buildkite-agent/builds/kb-n2-4-spot-ee2d6153f1c6deeb/elastic/kibana-on-merge/kibana/node_modules/selenium-webdriver/lib/webdriver.js:929:17
[00:09:34] │ at processTicksAndRejections (node:internal/process/task_queues:95:5)
[00:09:34] │ at onFailure (retry_for_success.ts:17:9)
[00:09:34] │ at retryForSuccess (retry_for_success.ts:59:13)
[00:09:34] │ at RetryService.try (retry.ts:31:12)
[00:09:34] │ at Proxy.clickByCssSelector (find.ts:417:5)
[00:09:34] │ at TestSubjects.click (test_subjects.ts:164:5)
[00:09:34] │ at DashboardPageObject.selectDashboardTags (dashboard_page.ts:560:7)
[00:09:34] │ at DashboardPageObject.enterDashboardTitleAndClickSave (dashboard_page.ts:544:7)
[00:09:34] │ at dashboard_page.ts:481:7
[00:09:34] │ at runAttempt (retry_for_success.ts:29:15)
[00:09:34] │ at retryForSuccess (retry_for_success.ts:68:21)
[00:09:34] │ at RetryService.try (retry.ts:31:12)
[00:09:34] │ at DashboardPageObject.saveDashboard (dashboard_page.ts:480:5)
[00:09:34] │ at Context.<anonymous> (dashboard_integration.ts:87:9)
[00:09:34] │ at Object.apply (wrap_function.js:73:16)
[00:09:34] │ at onFailure (retry_for_success.ts:17:9)
[00:09:34] │ at retryForSuccess (retry_for_success.ts:59:13)
[00:09:34] │ at RetryService.try (retry.ts:31:12)
[00:09:34] │ at DashboardPageObject.saveDashboard (dashboard_page.ts:480:5)
[00:09:34] │ at Context.<anonymous> (dashboard_integration.ts:87:9)
[00:09:34] │ at Object.apply (wrap_function.js:73:16)
[00:09:34] │
[00:09:34] │
```
## Summary
This PR copies, with limited modifications, functional test suites from
`test/functional` and `x-pack/test/functional`
## Lens Smoke tests
- [x] Smokescreen tests
(x-pack/test/functional/apps/lens/group1/smokescreen.ts)
- [x] Basic vega tests
(test/functional/apps/visualize/group6/_vega_chart.ts)
- [x] Sanity checks for TSDB functionality in Lens
x-pack/test/functional/apps/lens/group4/tsdb.ts
## Convert to Lens
These tests outside of serverless, assume the following vis types are
accessible via the **Visualize editor**, however all the following types
are designated **readonly** in serverless and thus the fn tests fail.
In place of these tests I created the identical visualizations, added
them to a dashboard and exported the SOs. These dashboard and dependent
visualizations are loaded in each respective test, and the assertions
are run on the `Convert to Lens` option from the dashboard. All
assertions are mostly unchanged or achieve the same effect.
- ✅ Agg based -
`x-pack/test/functional/apps/lens/open_in_lens/agg_based`
- ✅ TSVB - `x-pack/test/functional/apps/lens/open_in_lens/tsvb`
- ❌ Dashboard -
`x-pack/test/functional/apps/lens/open_in_lens/dashboard/config.ts`
- Not applicable to serverless env and/or duplicate of other tests.
Closes#162346
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
closes https://github.com/elastic/kibana/issues/166900
Flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3295
Flaky test because `await appsMenu.clickLink('Dashboard', { category:
'kibana' });` is opening dashboard application. Looking at the screen
shot, kibana stays on home page. Looking at the logs, the context menu
is opened and Dashboard link is clicked. PR resolves flakiness by adding
retry around appsMenu.clickLink.
<img width="600" alt="Screenshot 2023-10-02 at 3 52 19 PM"
src="5f3535c0-94d2-48c4-8d9b-15c4433bfe81">
<img width="600" alt="Screenshot 2023-10-02 at 3 52 42 PM"
src="9fc890e2-9f98-4078-87a1-d5cec8cee0e6">
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Moves the Dashboard view mode from session storage to local storage. This means that users will only need to enter edit mode **once** if they are an editor, and any subsequent Dashboards they open will already be in edit mode.
## Summary
This PR wraps up the work the @elastic/kibana-presentation team has done
to finish the MVP of [Phase
1](https://github.com/elastic/kibana/issues/154354) of the `Link`
embeddable, which enables users to add panels to their dashboard that
contain links to other dashboards + external links - with respect to
dashboard links, we give the author control over which pieces of context
should be kept across dashboards so that things like filter pills,
queries, and time ranges are not lost. This marks a huge improvement in
dashboard navigation overall, which was previously only available via a
variety of different workarounds including (but not limited to):
- Creating (essentially) a `noop` dashboard-to-dashboard drilldown
- Using markdown panels with hard Dashboard links, which are prone to
break across updates
- Avoiding navigation all together, which resulted in large,
slow-to-load dashboards.
As an added benefit, because these panels contain **references** to each
dashboard rather than hard links, (1) unlike markdown links, they should
not break after updates and (2) if a links panel is exported and
imported into another space or instance, all of the dashboards it links
to will also be imported.
1a86b713-47e7-4db9-8a04-29d41b13681a
> **Note**
> 🔉 The above video has audio! Turn on your sound for the best
experience.
### Note about this PR
- A majority of this work was done on a feature branch, with thorough
reviews from @andreadelrio on behalf of @elastic/kibana-design along the
way. Therefore, while feedback on the design is encouraged, any large
concerns brought up in this PR should be filed as separate issues and
addressed in follow-up PRs.
- This PR contains work for giving embeddables control over their own
panel size / default positioning on the dashboard. This was especially
important for the links panel, since we assume that (a) most links
panels would be located somewhere near the top of the dashboard and (b)
the horizontal links panel should have a different default "shape"
(longer than it is tall) than the vertical panel (taller than it is
long).
- This PR also contains work for caching dashboard saved objects, which
makes navigation much more seamless.
### Flaky Test Runner
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3251

### Checklist
- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~ This will
be addressed in a follow up:
https://github.com/elastic/kibana/issues/166750
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios - ~Units tests
are added, functional tests are forthcoming~ Edit: All tests are in.
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
---------
Co-authored-by: Nick Peihl <nick.peihl@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
Co-authored-by: Devon Thomson <devon.thomson@elastic.co>
Co-authored-by: Nick Peihl <nickpeihl@gmail.com>
Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
## Summary
Closes#154500.
Closes https://github.com/elastic/kibana/issues/114206.
This updates the UX around cloning dashboards. I removed the clone
confirm model, so cloning a dashboard is just a one click action now.
This aligns with how other apps like ML handle cloning. I've also made
the dashboard title breadcrumb a button in edit mode that opens the
dashboard settings flyout for better discoverability.
4f5ea117-a5e4-4ec5-9113-8b09fd8c84a1
I also changed the pattern for cloned dashboard title from `Dashboard
Title Copy` to `Dashboard Title (#)`.
<img width="1226" alt="Screenshot 2023-06-30 at 1 03 35 PM"
src="b50ba5c6-dc95-4aab-a320-b1a78b74c1b6">
* Service abstraction for data service
* Remove unnecessary files
* Fix jest tests for new data service
* Service abstraction for HTTP service + fix Jest tests
* Services abstraction for visualizations service
* Services abstraction for data views editor service
* Services abstraction for spaces service
* Services abstraction for settings service
* Remove more unnecessary files + clean up imports
* Add theme to new settings service + fix imports
* Services abstraction for overlays service
* Services abstraction for navigation service
* Services abstraction for chrome service
* Services abstraction for embeddable service + fix Jest tests
* Services abstraction for notifications service
* Services abstraction for dashboard capabilities service
* Remove unecessary context provider
* Services abstraction for screenshot mode service
* Services abstraction for url forwarding service
* Services abstraction for share service
* Services abstraction for usage collection service
* Another round of code cleanup
* Services abstraction for initializer context service
* Clean up more unecessary files
* Services abstraction for application service
* Remove duplicated saved object client service
* Services abstraction for saved objects service
* Services abstraction for saved objects tagging service
* Services abstraction for dashboard session storage service
* Services abstraction for core context service
* Clean up initializer context code
* Refactor to create singular no data page context service
* Create and use dashboard mount context provider
* Clean up + abstraction for docs link service
* Remove dashboard container services
* Temporarily revert back to deprecated fullscreen button
* Remove PlaceholderEmbeddableServices + more code clean up
* More code clean up
* Clean up plugin code
* Investigated possibly flaky test - doesn't actually seem to be flaky
* Update snapshot for new services
* Clean up actions code
* Clean up dashboard container code
* Add to documentation links service to remove type casting
* Address feedback
* Undo move of services in dashboard container factory
* Use panel action to show filters
* Switch over to a modal
* Fix how I'm getting data views
* Deserialize and clean filters for getFilters
* Read only filter items
* Fix render of filter pills
* Fix title for read only filter pills + clean up code
* Add i18n support + fix types
* Provide Kibana uiSettings to modal
* Fix how panel titles are grabbed for functional tests
* Add jest tests for badge
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
* Remove focus trap from modal
* Add edit button to modal that redirects to visualize app
* Add tooltip to filter pills
* Add jest tests for modal
* Clean up badge code and move to modal
* Make filter pills focusable
* Add tooltip to readOnly filter pills only
* Add `getFilters` to saved search embeddable
* Add query to filters modal
* Support by reference embeddables - specifically for visualize
* Fix jest tests for modal
* Add i18n support for new form in modal
* Clean up code
* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
* Fix jest tests for badge
* Temporarily disable for maps and add TODO comment
* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* Fix styling of modal + i18n of aria label
* Fix bundle size
* Address first round of feedback
* Add comments to public APIs
* Export missing API
* Add comments to public dashboard API
* Fix imports, types, and add more comments
* Fix losing of context
* Add more public API comments
* Add comments to each embeddable/dashboard container
* Add more public API comments
* Fix losing of context for real this time
* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
* Fix jest test
* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
* Address feedback
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* don't use es_archiver/empty_kibana, speed up steps
* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
* revert change to listing page
* revert this change and do in another PR
* normalize data-test-subjects on landing pages
* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
* revert shakespeare from another PR
* re-add missing dts
* found a few more replacements to change
* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
* another fix
* add data-test-subj for 'Create your first vis/dash'
* update jest snapshot
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* Remove panel wrapper element
* Fix functional tests to work without wrapper
* Remove duplicated code
* Re-add classes to right-justify in view mode
* Apply high z-index to children of floating header rather than parent
* kbnArchiver es_archiver/dashboard/legacy
* cleanStandardList of saved objects in init, and after
* remove unused files
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Migrated_Dashboard_TimePicker_Tests_To_Use_CCS
* Added dashboard to the config file.
* Flipped ccs switch conditional.
* Added CCS test to its own small describe block for readability.
* Added conditional for data.
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* Fixed CCS dashboard test.
* Removed file that should have been removed via merge.
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* Added special case to panel comparison.
* Fixed panel title behaviour when linking/unlinking to/from the library.
* Added panel title test suite.
* Made the injection of the 'savedSearchId' key conditional on if it is defined when unlinking.
* Adjusted use of 'setValue()' based on feedback from @dmlemeshko
* Refractor test suite.
* Improved code for removal of title on library link.
* Now the new EuiDataGrid based document table is the default
* Columns can be sorted by drag and drop
* Column width can be changed by drag and drop
* There's a fullscreen mode
* There's document selection
* There's document navigation in the flyover of a expanded document
* Sorting is much more user friendly, less confusing and sort order can be changed by drag and drop
* Makes lens default editor in dashboard
Added all editors menu to dashboard panel toolbar
Fixed toggle on editor menu
Removed unnecessary comments
Added data test subjects to editor menu buttons
Populated editor menu with vis types
Removed unused imports
Fixed imports
Adds showCreateNewMenu prop to AddPanelFlyout
Rearranged order of editor menu options
Fixed ts errors
Added groupnig to embeddable factory
Use embeddable state transfer service to redirect to editors
Added showGroups to TypeSelectionState
Fixed add panel flyout test
Fixed data test subjects
Fixed factory groupings
Removed unused import
Fixed page object
Added telemtry to dashboard toolbar
Added telemtry to editor menu
Fix ml embeddable functional tests
Fix lens dashboard test
Fix empty dashboard test
Fixed ts errors
Fixed time to visualize security test
Fixed empty dashboard test
Fixed clickAddNewEmbeddableLink in dashboardAddPanel service
Fixed agg based vis functional tests
Revert test changes
Fixed typo
Fix tests
Fix more tests
Fix ts errors
Fixed more tests
Fixed toolbar sizes and margins to align with lens
Fix tests
Fixed callbacks
Fixed button prop type
New vis modal copy updates
Added savedObjectMetaData to log stream embeddable factory
Addressed feedback
Fixed ts error
Fix more tests
Fixed ts errors
Updated dashboard empty prompt copy
Adds tooltip to log stream embeddable factory saved object meta data
Made icons monochrome in toolbar
Fixed icon colors in dark mode
Cleaned up css
Fixed ts errors
Updated snapshot
Fixed map icon color
* Added tooltips for ML embeddables
* Restored test
* Added empty dashboard panel test
* Fixed i18n id
* Fix dashboard_embedding test
* Removed unused service
* Fixed i18n error
* Added icon and description properties to embeddable factory definition
* Fixed ts errors
* Fixed expected value
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>