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

[Dashboard][Content Editor] Edit title, description, and tags from dashboard listing page #161399

Merged
merged 22 commits into from
Aug 7, 2023

Conversation

cqliu1
Copy link
Contributor

@cqliu1 cqliu1 commented Jul 6, 2023

Summary

Closes #144481.
Closes #160256.

This enables content editor in dashboard to allow users to edit the title, description, and tags from the listing page.

Jul-06-2023.14-10-00.mp4

The only validation added to this flyout is the duplicate title check. I used the same warning message as the visualize listing page.

Screenshot 2023-07-06 at 2 11 38 PM

Checklist

Delete any items that are not applicable to this PR.

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

For maintainers

@cqliu1 cqliu1 added Feature:Dashboard Dashboard related features Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:medium Medium Level of Effort impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. v8.10.0 labels Jul 6, 2023
@cqliu1 cqliu1 force-pushed the dashboard/save-from-listing-page branch from 6ff1991 to 44cc092 Compare July 12, 2023 20:45
@cqliu1
Copy link
Contributor Author

cqliu1 commented Jul 20, 2023

Per the discussions in #160256 (comment), I've changed the inspect icon to an iInCircle icon.

Screenshot 2023-07-18 at 1 38 17 PM

Screenshot 2023-07-18 at 1 54 08 PM

I've also added a tooltip when the user has read only permissions.
Screenshot 2023-07-18 at 2 17 36 PM

@cqliu1 cqliu1 force-pushed the dashboard/save-from-listing-page branch from 3843945 to 9c70164 Compare July 20, 2023 19:35
@cqliu1 cqliu1 force-pushed the dashboard/save-from-listing-page branch from 2293cb2 to 6ff19a6 Compare July 24, 2023 22:45
@cqliu1 cqliu1 marked this pull request as ready for review July 24, 2023 22:46
@cqliu1 cqliu1 requested review from a team as code owners July 24, 2023 22:46
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

Copy link
Contributor

@rshen91 rshen91 left a comment

Choose a reason for hiding this comment

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

tested locally changes lgtm!!!

Copy link
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

Nice work! I tested this out in chrome and everything works as expected! As a bonus this also works on the Dashboard listing page in security, nice!

Not necessary to fix in this PR, but it looks like both the Visualizations and the Dashboards details viewer stays open on navigation to a different app.

Added one nit.


if (!validTitle) {
throw new Error(
i18n.translate('dashboard.dashboardListingEditErrorTitle.duplicateWarning', {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Can we add this to the strings file src/plugins/dashboard/public/dashboard_listing/_dashboard_listing_strings.ts just to be consistent?

@@ -200,5 +204,35 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expect(onDashboardLandingPage).to.equal(false);
});
});

describe('edit meta data', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice functional test addition!

@@ -347,7 +347,7 @@ export interface ContentManagementCrudTypes<
/**
* Update item params
*/
UpdateIn: UpdateIn<ContentType, Attributes, UpdateOptions>;
UpdateIn: UpdateIn<ContentType, Partial<Attributes>, UpdateOptions>;
Copy link
Contributor Author

@cqliu1 cqliu1 Jul 26, 2023

Choose a reason for hiding this comment

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

@elastic/kibana-data-discovery I believe this is the only line under your ownership that needs review. I made this a Partial type because updates allow for partial saved object attributes

Copy link
Contributor

Choose a reason for hiding this comment

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

This LGTM, but @mattkime can you do the final approval since you're most familiar with this?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll take a look in a bit. At first glance this should be fine but I need to refresh my memory. I started out overly strict with the idea we could loosen things if needed.

@jughosta jughosta requested a review from mattkime July 31, 2023 09:25
@sebelga sebelga self-requested a review July 31, 2023 11:53
Copy link
Contributor

@sebelga sebelga left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! 👍

I wonder why our team didn't get set as required reviewers for the code changes under packages/content-management 🤔

Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

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

content management changes look good to me.

@cqliu1 cqliu1 enabled auto-merge (squash) August 2, 2023 18:49
@cqliu1 cqliu1 merged commit dbe8852 into elastic:main Aug 7, 2023
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
dashboard 386 387 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dashboard 358.5KB 360.1KB +1.6KB
eventAnnotation 176.3KB 176.7KB +405.0B
filesManagement 89.3KB 89.7KB +405.0B
graph 407.5KB 407.9KB +405.0B
maps 2.8MB 2.8MB +405.0B
visualizations 262.5KB 262.9KB +405.0B
total +3.5KB

History

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

@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Aug 7, 2023
crespocarlos pushed a commit to crespocarlos/kibana that referenced this pull request Aug 8, 2023
…shboard listing page (elastic#161399)

## Summary

Closes elastic#144481.
Closes elastic#160256.

This enables content editor in dashboard to allow users to edit the
title, description, and tags from the listing page.


https://github.com/elastic/kibana/assets/1697105/c2212882-43e3-45cb-83fc-493860857019

The only validation added to this flyout is the duplicate title check. I
used the same warning message as the visualize listing page.

<img width="600" alt="Screenshot 2023-07-06 at 2 11 38 PM"
src="https://github.com/elastic/kibana/assets/1697105/42f7244a-1c4d-47ec-8f66-a98a63eff473">

### 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
- [ ] 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&mdash;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&mdash;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>
bryce-b pushed a commit to bryce-b/kibana that referenced this pull request Aug 9, 2023
…shboard listing page (elastic#161399)

## Summary

Closes elastic#144481.
Closes elastic#160256.

This enables content editor in dashboard to allow users to edit the
title, description, and tags from the listing page.


https://github.com/elastic/kibana/assets/1697105/c2212882-43e3-45cb-83fc-493860857019

The only validation added to this flyout is the duplicate title check. I
used the same warning message as the visualize listing page.

<img width="600" alt="Screenshot 2023-07-06 at 2 11 38 PM"
src="https://github.com/elastic/kibana/assets/1697105/42f7244a-1c4d-47ec-8f66-a98a63eff473">

### 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
- [ ] 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&mdash;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&mdash;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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Dashboard Dashboard related features impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:medium Medium Level of Effort release_note:enhancement Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.10.0
Projects
None yet
9 participants