kibana icon indicating copy to clipboard operation
kibana copied to clipboard

[Tests] Share Modal Redesign clean up and tests

Open rshen91 opened this issue 10 months ago • 10 comments

Summary

This PR makes the share redesign modal work the primary share context paradigm (excluding Canvas) by removing the share plugin config that had share.new_version.enabled for testing and implementation. This PR cleans up the FTRs.

Closes #151523 As a result of defaulting to short urls, some tests were removed since they are now obsolete. One fix in this PR to avoid customer known issues is to allow reporting (if license is permitted) for watcher users. Refer to https://github.com/elastic/sdh-kibana/issues/4481#issuecomment-2012969470.

I've opened a separate issue to track any skipped or deleted tests as a result of short urls by default here https://github.com/elastic/kibana/issues/181066

Checklist

Release Note

The share menu is updated for a more streamlined user experience. Users can navigate through a tabbed modal to copy links for discover, dashboard, and lens.

rshen91 avatar Apr 09 '24 16:04 rshen91

/ci

rshen91 avatar Apr 17 '24 16:04 rshen91

/ci

rshen91 avatar Apr 17 '24 18:04 rshen91

/ci

rshen91 avatar Apr 17 '24 19:04 rshen91

Pinging @elastic/appex-sharedux (Team:SharedUX)

elasticmachine avatar Apr 17 '24 19:04 elasticmachine

Pinging @elastic/fleet (Team:Fleet)

elasticmachine avatar Apr 17 '24 19:04 elasticmachine

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

elasticmachine avatar Apr 17 '24 19:04 elasticmachine

Thanks for restoring some of the tests! I notice there are still some removed tests that haven't been restored or tracked separately, and I'd like to make sure we don't lose the coverage.

Also, it doesn't look like the help icon a11y issue or read only report export issue have been addressed or tracked in separate issues. The a11y one is more minor (although should still be fixed IMO), but I think there should be a plan to address the export issue.

I believe the export issue is working as expected. We don't want read-only users to be able to create reports/exports. We need them to be able to see the copy url link for cases where they are using Watcher/other external APIs to generate a report (https://github.com/elastic/sdh-kibana/issues/4481#issuecomment-2012969470). Just to make sure this is correct -@tsullivan am I understanding this correctly?

rshen91 avatar May 06 '24 14:05 rshen91

@davismcphee I zoomed with @tsullivan and I understand better the behavior you noticed. So, you will need to add in your kibana.dev.yml xpack.reporting.roles.enabled: false. And then you can create a sub permission for reporting for a read-only user. When you then try to generate a CSV, it works as expected. The behavior you noted is similar to the demo.elastic.co environment. Thank you for pointing out this issue because I think the toast message should include the helpful error that happens in demo.elastic.co.

rshen91 avatar May 06 '24 18:05 rshen91

We don't want read-only users to be able to create reports/exports

I think @rshen91 clarified this in the followup-comment, but just to put it in my words: the read-only attribute is separate from the privilege to create reports. Privileges are additive in nature, so the privilege to create reports can be added on top of other privileges. It's possible to configure a read-only user to have the privilege to create reports, and also it's possible to configure them to not have the privilege.

privileges: [
  feature_discover.read,              # can access and view data in Discover.
  feature_discover.generate_report,   # can create CSV report in Discover.
]

tsullivan avatar May 06 '24 19:05 tsullivan

:yellow_heart: Build succeeded, but was flaky

  • Buildkite Build
  • Commit: b07e2d1dd803bbc3784845b0c60b902bb44b53a9
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-180406-b07e2d1dd803
  • Observability Deployment

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #57 / dashboard Reporting Dashboard Reporting Screenshots Preserve Layout downloads a PDF file with saved search given EuiDataGrid enabled

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
lens 1473 1471 -2
reporting 120 117 -3
share 94 92 -2
total -7

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/reporting-public 104 107 +3
share 77 59 -18
total -15

Async chunks

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

id before after diff
apm 3.3MB 3.3MB +95.0B
dashboard 493.1KB 493.3KB +116.0B
discover 722.4KB 722.5KB +112.0B
lens 1.5MB 1.5MB -1.2KB
reporting 68.6KB 60.9KB -7.7KB
share 3.6KB 4.2KB +581.0B
visualizations 285.6KB 285.8KB +125.0B
total -7.9KB

Canvas Sharable Runtime

The Canvas "shareable runtime" is an bundle produced to enable running Canvas workpads outside of Kibana. This bundle is included in third-party webpages that embed canvas and therefor should be as slim as possible.

id before after diff
module count - 5405 +5405
total size - 8.8MB +8.8MB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
share 11 12 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
lens 50.0KB 49.3KB -705.0B
reporting 56.0KB 52.8KB -3.2KB
share 71.1KB 55.9KB -15.2KB
total -19.1KB
Unknown metric groups

API count

id before after diff
@kbn/reporting-public 110 113 +3
share 136 120 -16
total -13

async chunk count

id before after diff
lens 25 24 -1
reporting 4 3 -1
total -2

ESLint disabled line counts

id before after diff
@kbn/reporting-public 2 3 +1

References to deprecated APIs

id before after diff
@kbn/reporting-public 0 2 +2
discover 16 17 +1
total +3

Total ESLint disabled count

id before after diff
@kbn/reporting-public 2 3 +1

History

  • :broken_heart: Build #210209 failed 09a1d19bf3c0ec16038ef57e9e0f4fcba4fd33b4
  • :green_heart: Build #209916 succeeded 009f105da8f66626865694387e87e37a88221dcb
  • :green_heart: Build #209861 succeeded 27ec6e8f55a8d1453875656782846d5da2ee252f
  • :green_heart: Build #209718 succeeded 1c6cc615f1578c53ab98dfbcc0322baa32795c9e

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

cc @eokoneyo @rshen91

kibana-ci avatar May 15 '24 18:05 kibana-ci