Skip to content

Commit

Permalink
[8.13] Change key for Select Connector component from serviceType to …
Browse files Browse the repository at this point in the history
…name (#177729) (#177737)

# Backport

This will backport the following commits from `main` to `8.13`:
- [Change key for Select Connector component from serviceType to name
(#177729)](#177729)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Artem
Shelkovnikov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-02-23T16:28:30Z","message":"Change
key for Select Connector component from serviceType to name
(#177729)\n\n## Summary\r\n\r\nFixing a problem with Select Connector
component being broken due to\r\nelements with duplicate
ids.\r\n\r\nConfluence Data Center and Jira Data Center tiles were added
with\r\nduplicate service_type (by design). Because of that, the
component\r\nbroke, as it uses service_type as an unique key when
rendering the\r\ntable.\r\n\r\nSee for example this log message with an
error:\r\n\r\n```\r\n2react-dom.development.js:67 Warning: Encountered
two children with the same key, `confluence`. Keys should be unique so
that components maintain their identity across updates. Non-unique keys
may cause children to be duplicated and/or omitted — the behavior is
unsupported and could change in a future version.\r\n```\r\n\r\nThis PR
changes the unique key field from `service_type` to `name` -\r\nthis way
the table is rendered correctly and works as expected.\r\n\r\nBefore:
\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/12238374/81da28b6-06b6-46de-80ac-ba4c529ffd97\r\n\r\n\r\nAfter:\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/12238374/447ad868-b296-4eef-8813-46cc65bddf7c\r\n\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"982a3eeb59492c28102cac3ab3e100be3a73e1b3","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v8.13.0","v8.14.0"],"title":"Change
key for Select Connector component from serviceType to
name","number":177729,"url":"https://github.com/elastic/kibana/pull/177729","mergeCommit":{"message":"Change
key for Select Connector component from serviceType to name
(#177729)\n\n## Summary\r\n\r\nFixing a problem with Select Connector
component being broken due to\r\nelements with duplicate
ids.\r\n\r\nConfluence Data Center and Jira Data Center tiles were added
with\r\nduplicate service_type (by design). Because of that, the
component\r\nbroke, as it uses service_type as an unique key when
rendering the\r\ntable.\r\n\r\nSee for example this log message with an
error:\r\n\r\n```\r\n2react-dom.development.js:67 Warning: Encountered
two children with the same key, `confluence`. Keys should be unique so
that components maintain their identity across updates. Non-unique keys
may cause children to be duplicated and/or omitted — the behavior is
unsupported and could change in a future version.\r\n```\r\n\r\nThis PR
changes the unique key field from `service_type` to `name` -\r\nthis way
the table is rendered correctly and works as expected.\r\n\r\nBefore:
\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/12238374/81da28b6-06b6-46de-80ac-ba4c529ffd97\r\n\r\n\r\nAfter:\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/12238374/447ad868-b296-4eef-8813-46cc65bddf7c\r\n\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"982a3eeb59492c28102cac3ab3e100be3a73e1b3"}},"sourceBranch":"main","suggestedTargetBranches":["8.13"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/177729","number":177729,"mergeCommit":{"message":"Change
key for Select Connector component from serviceType to name
(#177729)\n\n## Summary\r\n\r\nFixing a problem with Select Connector
component being broken due to\r\nelements with duplicate
ids.\r\n\r\nConfluence Data Center and Jira Data Center tiles were added
with\r\nduplicate service_type (by design). Because of that, the
component\r\nbroke, as it uses service_type as an unique key when
rendering the\r\ntable.\r\n\r\nSee for example this log message with an
error:\r\n\r\n```\r\n2react-dom.development.js:67 Warning: Encountered
two children with the same key, `confluence`. Keys should be unique so
that components maintain their identity across updates. Non-unique keys
may cause children to be duplicated and/or omitted — the behavior is
unsupported and could change in a future version.\r\n```\r\n\r\nThis PR
changes the unique key field from `service_type` to `name` -\r\nthis way
the table is rendered correctly and works as expected.\r\n\r\nBefore:
\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/12238374/81da28b6-06b6-46de-80ac-ba4c529ffd97\r\n\r\n\r\nAfter:\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/12238374/447ad868-b296-4eef-8813-46cc65bddf7c\r\n\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"982a3eeb59492c28102cac3ab3e100be3a73e1b3"}}]}]
BACKPORT-->

Co-authored-by: Artem Shelkovnikov <[email protected]>
  • Loading branch information
kibanamachine and artem-shelkovnikov authored Feb 23, 2024
1 parent f3bc120 commit 308c9b8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ export const SelectConnector: React.FC = () => {
<EuiSpacer size="s" />
<EuiFlexGrid columns={3}>
{filteredConnectors.map((connector) => (
<EuiFlexItem key={connector.serviceType} grow>
<EuiFlexItem key={connector.name} grow>
<ConnectorCheckable
showNativePopover={(!hasNativeAccess && useNativeFilter) ?? false}
showLicensePopover={connector.platinumOnly && !hasPlatinumLicense && !isCloud}
Expand Down

0 comments on commit 308c9b8

Please sign in to comment.