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

Removes duplicated RedirectAppLinks component #170304

Merged
merged 13 commits into from
Nov 13, 2023

Conversation

eokoneyo
Copy link
Contributor

@eokoneyo eokoneyo commented Nov 1, 2023

Summary

This PR removes the duplicated RedirectAppLinks component which has been marked as deprecated since 74a00fa.

All references to the previous import declaration from @kbn/kibana-react-plugin/public have been replaced with @kbn/shared-ux-link-redirect-app, this change ensures that the current app behaviour is preserved, and changes to match the expectation of the new component have been applied where necessary.

Changes relating to the new RedirectAppLinks component;

  • The component does not accept a className anymore as it is not a presentational component despite it being used as one previously, there's change to make accommodation for how it had been used.
  • The component introduces adata-test-subj attribute with the value kbnRedirectAppLink on the dom node that wraps it's children.

Checklist

@eokoneyo eokoneyo added release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) labels Nov 1, 2023
@eokoneyo eokoneyo self-assigned this Nov 1, 2023
Copy link
Contributor

github-actions bot commented Nov 1, 2023

Documentation preview:

@eokoneyo eokoneyo force-pushed the remove-dedupe-redirect-link-component branch from 9505b39 to cc4afd6 Compare November 2, 2023 10:25
@eokoneyo eokoneyo linked an issue Nov 2, 2023 that may be closed by this pull request
2 tasks
@eokoneyo eokoneyo force-pushed the remove-dedupe-redirect-link-component branch 6 times, most recently from a921aca to 86ac142 Compare November 3, 2023 10:53
@@ -9,6 +9,9 @@
import { css } from '@emotion/react';

export const redirectAppLinksStyles = css({
display: 'flex',
display: 'inherit',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change makes the redirect app link inherit the display property of it's parent element, ideally this component should not have a presentational effect because it only handles links but for historical reasons and how markup has been built around this component we'd have to support this.
The flex properties added are necessary to support existing markup that also expects that the .KbnAppWrapper class would be present on the RedirectAppLinks component, given that this component historically also accepted classNames.

@eokoneyo eokoneyo force-pushed the remove-dedupe-redirect-link-component branch 2 times, most recently from b171731 to c1464ad Compare November 3, 2023 16:02
@kibana-ci
Copy link
Collaborator

kibana-ci commented Nov 3, 2023

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #17 / NoDataCard props button
  • [job] [logs] Jest Tests #17 / NoDataCard props extends EuiCardProps
  • [job] [logs] Jest Tests #17 / NoDataCard props href
  • [job] [logs] Jest Tests #17 / NoDataCard props no access to Fleet
  • [job] [logs] Jest Tests #17 / NoDataCard renders
  • [job] [logs] Jest Tests #16 / SecurityNavControlService can render and cleanup the control via the mount() function
  • [job] [logs] Jest Tests #14 / shouldn't show indicator in case app hasn't opt-in
  • [job] [logs] Jest Tests #14 / shouldn't show indicator in case no active search session
  • [job] [logs] Jest Tests #9 / spacesManagementApp mount() works for the create space page
  • [job] [logs] Jest Tests #9 / spacesManagementApp mount() works for the edit space page
  • [job] [logs] Jest Tests #9 / spacesManagementApp mount() works for the grid page

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1505 1516 +11
data 479 490 +11
exploratoryView 158 171 +13
indexLifecycleManagement 193 206 +13
kibanaReact 305 312 +7
observabilityOnboarding 179 192 +13
savedObjectsManagement 88 101 +13
synthetics 871 882 +11
upgradeAssistant 143 156 +13
uptime 547 560 +13
ux 157 170 +13
total +131

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
kibanaReact 133 132 -1

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.7MB 3.7MB +1.8KB
canvas 1012.5KB 1012.6KB +88.0B
dashboard 375.4KB 375.5KB +88.0B
data 46.8KB 46.9KB +4.0B
dataViewManagement 119.8KB 119.9KB +88.0B
discover 587.2KB 587.3KB +88.0B
enterpriseSearch 2.6MB 2.6MB +88.0B
eventAnnotationListing 197.9KB 198.0KB +88.0B
exploratoryView 201.1KB 203.4KB +2.3KB
filesManagement 89.9KB 90.0KB +88.0B
fleet 1.2MB 1.2MB -1.6KB
graph 388.1KB 388.2KB +88.0B
home 164.1KB 164.8KB +745.0B
indexLifecycleManagement 142.5KB 144.8KB +2.3KB
indexManagement 576.0KB 576.1KB +88.0B
infra 1.9MB 1.9MB +88.0B
kibanaOverview 46.1KB 46.6KB +465.0B
lens 1.4MB 1.4MB +88.0B
management 74.0KB 74.1KB +88.0B
maps 2.7MB 2.7MB +88.0B
metricsDataAccess 59.4KB 59.5KB +88.0B
ml 3.5MB 3.5MB +269.0B
monitoring 462.4KB 462.4KB +88.0B
observability 1.1MB 1.1MB +88.0B
observabilityAIAssistant 208.3KB 208.4KB +88.0B
observabilityOnboarding 241.0KB 243.2KB +2.2KB
observabilityShared 36.2KB 36.3KB +88.0B
osquery 1.0MB 1.0MB +88.0B
profiling 359.0KB 359.1KB +88.0B
savedObjectsManagement 88.4KB 82.3KB -6.1KB
securitySolution 12.9MB 12.9MB +176.0B
securitySolutionEss 42.6KB 42.7KB +88.0B
securitySolutionServerless 336.6KB 336.6KB +88.0B
synthetics 865.5KB 867.2KB +1.7KB
upgradeAssistant 155.1KB 155.1KB -3.0B
uptime 478.5KB 480.7KB +2.3KB
ux 166.0KB 168.3KB +2.3KB
visTypeTimeseries 511.8KB 511.8KB +88.0B
visualizations 267.8KB 267.9KB +88.0B
total +10.7KB

Page load bundle

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

id before after diff
apm 36.4KB 36.5KB +68.0B
cloudDefend 8.9KB 9.0KB +88.0B
cloudSecurityPosture 14.8KB 14.9KB +88.0B
core 372.0KB 372.1KB +88.0B
data 411.2KB 413.0KB +1.8KB
esUiShared 155.2KB 155.8KB +694.0B
exploratoryView 44.2KB 44.3KB +69.0B
fleet 149.3KB 151.1KB +1.8KB
indexLifecycleManagement 26.6KB 26.6KB +68.0B
kibanaOverview 15.5KB 15.2KB -326.0B
kibanaReact 44.0KB 45.0KB +1.0KB
observabilityOnboarding 5.7KB 5.8KB +68.0B
savedObjectsManagement 19.5KB 19.6KB +68.0B
security 70.2KB 70.3KB +88.0B
spaces 24.6KB 24.7KB +88.0B
synthetics 19.6KB 19.6KB +68.0B
upgradeAssistant 20.2KB 22.4KB +2.3KB
uptime 22.8KB 22.9KB +68.0B
ux 6.7KB 6.8KB +68.0B
total +8.3KB
Unknown metric groups

API count

id before after diff
kibanaReact 168 166 -2

async chunk count

id before after diff
savedObjectsManagement 3 4 +1

ESLint disabled in files

id before after diff
kibanaReact 4 3 -1

ESLint disabled line counts

id before after diff
kibanaReact 8 7 -1

References to deprecated APIs

id before after diff
apm 32 29 -3
data 30 24 -6
esUiShared 3 0 -3
exploratoryView 11 8 -3
fleet 95 80 -15
home 21 10 -11
indexLifecycleManagement 9 5 -4
kibanaOverview 10 4 -6
ml 29 26 -3
observabilityOnboarding 7 4 -3
savedObjectsManagement 13 7 -6
synthetics 27 24 -3
upgradeAssistant 13 9 -4
uptime 19 13 -6
ux 6 3 -3
total -79

Total ESLint disabled count

id before after diff
kibanaReact 12 10 -2

History

  • 💔 Build #173100 failed 06b53ebc5b37003d68dabdb3a4a2594fdfde51eb
  • 💔 Build #173064 failed 86ac14295d9a2b292178d45c5e4d0c97b973a7e1
  • 💔 Build #173052 failed a921acaf51843cd599e1518832123714352c9fba
  • 💔 Build #173036 failed 28e0d5cdeccb3e01bc35fd7d6432dde4cf648013

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

cc @eokoneyo

@eokoneyo eokoneyo force-pushed the remove-dedupe-redirect-link-component branch 2 times, most recently from 1669bd1 to fd88f12 Compare November 3, 2023 19:51
@eokoneyo eokoneyo marked this pull request as ready for review November 6, 2023 08:41
@eokoneyo eokoneyo requested review from a team as code owners November 6, 2023 08:41
@elasticmachine
Copy link
Contributor

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

@eokoneyo eokoneyo requested a review from a team as a code owner November 6, 2023 08:41
@eokoneyo eokoneyo force-pushed the remove-dedupe-redirect-link-component branch from 450b926 to a6f8ecc Compare November 9, 2023 14:23
@eokoneyo eokoneyo requested review from a team as code owners November 9, 2023 14:23
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1507 1518 +11
data 479 490 +11
exploratoryView 158 171 +13
indexLifecycleManagement 193 206 +13
kibanaReact 315 322 +7
observabilityOnboarding 179 192 +13
savedObjectsManagement 88 101 +13
synthetics 872 883 +11
upgradeAssistant 143 156 +13
uptime 547 560 +13
ux 157 170 +13
total +131

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
kibanaReact 134 133 -1

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.7MB 3.7MB +1.8KB
canvas 1012.5KB 1012.6KB +88.0B
dashboard 375.6KB 375.6KB +88.0B
data 46.8KB 46.9KB +4.0B
dataViewManagement 119.8KB 119.9KB +88.0B
discover 588.4KB 588.5KB +88.0B
enterpriseSearch 2.6MB 2.6MB +88.0B
eventAnnotationListing 197.9KB 198.0KB +88.0B
exploratoryView 201.1KB 203.4KB +2.3KB
filesManagement 89.9KB 90.0KB +88.0B
fleet 1.2MB 1.2MB -1.6KB
graph 388.1KB 388.2KB +88.0B
home 164.1KB 164.8KB +745.0B
indexLifecycleManagement 142.5KB 144.8KB +2.3KB
indexManagement 577.5KB 577.6KB +88.0B
infra 1.9MB 1.9MB +88.0B
kibanaOverview 46.1KB 46.6KB +465.0B
lens 1.4MB 1.4MB +88.0B
management 74.1KB 74.2KB +88.0B
maps 2.9MB 2.9MB +88.0B
metricsDataAccess 59.4KB 59.5KB +88.0B
ml 3.5MB 3.5MB +269.0B
monitoring 462.4KB 462.4KB +88.0B
observability 1.1MB 1.1MB +88.0B
observabilityAIAssistant 208.3KB 208.4KB +88.0B
observabilityOnboarding 241.0KB 243.2KB +2.2KB
observabilityShared 36.2KB 36.3KB +88.0B
osquery 1.0MB 1.0MB +88.0B
profiling 359.0KB 359.1KB +88.0B
savedObjectsManagement 88.4KB 82.3KB -6.1KB
securitySolution 13.0MB 13.0MB +176.0B
securitySolutionEss 42.6KB 42.7KB +88.0B
securitySolutionServerless 336.8KB 336.9KB +88.0B
synthetics 866.5KB 868.2KB +1.7KB
upgradeAssistant 155.1KB 155.1KB -3.0B
uptime 478.5KB 480.7KB +2.3KB
ux 166.0KB 168.3KB +2.3KB
visTypeTimeseries 511.8KB 511.8KB +88.0B
visualizations 268.0KB 268.0KB +88.0B
total +10.7KB

Page load bundle

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

id before after diff
apm 36.5KB 36.6KB +68.0B
cloudDefend 8.9KB 9.0KB +88.0B
cloudSecurityPosture 14.8KB 14.9KB +88.0B
core 372.6KB 372.7KB +88.0B
data 411.4KB 413.2KB +1.8KB
esUiShared 155.2KB 155.8KB +694.0B
exploratoryView 44.2KB 44.3KB +69.0B
fleet 149.7KB 151.5KB +1.8KB
indexLifecycleManagement 26.6KB 26.6KB +68.0B
kibanaOverview 15.5KB 15.2KB -326.0B
kibanaReact 44.1KB 45.1KB +1.0KB
observabilityOnboarding 5.7KB 5.8KB +68.0B
savedObjectsManagement 19.5KB 19.6KB +68.0B
security 70.2KB 70.3KB +88.0B
spaces 24.6KB 24.7KB +88.0B
synthetics 19.6KB 19.6KB +68.0B
upgradeAssistant 20.2KB 22.4KB +2.3KB
uptime 22.8KB 22.9KB +68.0B
ux 6.7KB 6.8KB +68.0B
total +8.3KB
Unknown metric groups

API count

id before after diff
kibanaReact 169 167 -2

async chunk count

id before after diff
savedObjectsManagement 3 4 +1

ESLint disabled in files

id before after diff
kibanaReact 1 0 -1

ESLint disabled line counts

id before after diff
kibanaReact 5 4 -1

References to deprecated APIs

id before after diff
apm 32 29 -3
data 30 24 -6
esUiShared 3 0 -3
exploratoryView 11 8 -3
fleet 95 80 -15
home 21 10 -11
indexLifecycleManagement 9 5 -4
kibanaOverview 10 4 -6
ml 29 26 -3
observabilityOnboarding 7 4 -3
savedObjectsManagement 13 7 -6
synthetics 27 24 -3
upgradeAssistant 13 9 -4
uptime 19 13 -6
ux 6 3 -3
total -79

Total ESLint disabled count

id before after diff
kibanaReact 6 4 -2

History

  • 💔 Build #174082 failed 450b92693d292cf8c1b8e611d818e1eeae4971f3
  • 💔 Build #173884 failed 0bd6efb6642ddeac0a24c9f2fd9b789d59d35fd3
  • 💚 Build #173369 succeeded 851a95affd902933d28ff397f9e4b67529f1bc59
  • 💛 Build #173283 was flaky fd88f12236b908fe8059bead43edd1e31643acd2
  • 💔 Build #173253 failed 1669bd19f32242d5992950c2dd1bb344e3188f81

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

cc @eokoneyo

Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@yngrdyn yngrdyn left a comment

Choose a reason for hiding this comment

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

Observability onboarding changes LGTM

@eokoneyo eokoneyo merged commit f27427b into elastic:main Nov 13, 2023
2 checks passed
@eokoneyo eokoneyo deleted the remove-dedupe-redirect-link-component branch November 13, 2023 09:17
@kibanamachine kibanamachine added v8.12.0 backport:skip This commit does not require backporting labels Nov 13, 2023
eokoneyo added a commit that referenced this pull request Nov 14, 2023
## Summary

<!-- Summarize your PR. If it involves visual changes include a
screenshot or gif. -->

This is a follow up to #170304, it
resolves the issue with the navigation breadcrumbs in serverless;
explicitly setting height to `100%` causes an issue where when the
`RedirectAppLink` component is a child of a parent container with a
display property of `flex` with `align-items` set to `center`, content
which one would expect to be center aligned is not and this makes sense
because the value of align-items [applies to it's direct children as a
group](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items).

To resolve the issue this PR removes the declaration that explicitly
sets a height value to 100% but rather make the component inherit the
height of it's parent, this style is kept for historical reasons (see
#141656) despite the fact that the
`RedirectAppLinks` component is not a presentational component.

<!-- ### 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)
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:review backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support Team:Fleet Team label for Observability Data Collection Fleet team Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Shared UX] Remove duplicate app links components