[8.6] [ML] Fix caret direction for expanded state of table rows (#146451) (#146530)

# Backport

This will backport the following commits from `main` to `8.6`:
- [[ML] Fix caret direction for expanded state of table rows
(#146451)](https://github.com/elastic/kibana/pull/146451)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Pete
Harverson","email":"pete@elastic.co"},"sourceCommit":{"committedDate":"2022-11-29T11:58:23Z","message":"[ML]
Fix caret direction for expanded state of table rows (#146451)\n\n##
Summary\r\n\r\nFixes the icons used to indicate the collapsed / expanded
state of table\r\nrows in the Data Frame Analytics, Trained Models and
Explain Log Rate\r\nSpikes pages in the ML plugin, and the Transforms
list page. They are\r\nnow consistent with other tables, with a **right
caret** to indicate a\r\n**closed section** and a **down caret** for
**open sections**.\r\n\r\n### Data frame analytics jobs list\r\n<img
width=\"689\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204346940-e56436e1-2e21-4f4d-a618-2b243438a55f.png\">\r\n\r\n###
Data frame analytics results\r\n<img width=\"730\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204346993-32c600d1-f94c-4cb3-8740-e5344ecd6b4e.png\">\r\n\r\n###
Trained models list\r\n<img width=\"788\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204347063-2a50ac16-456c-4ca0-a446-b8535f5ba5cb.png\">\r\n\r\n###
Nodes list\r\n<img width=\"506\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204347215-970a07fe-062c-4c6f-bdfc-ed0f473e9681.png\">\r\n\r\n###
Explain Log Rate Spikes grouped results\r\n<img width=\"809\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204347302-10975598-5e88-42ac-a648-eae64976ed84.png\">\r\n\r\n###
Transform management\r\n<img width=\"1063\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204347393-124a366e-f5a9-44ba-8bfc-94788f334ba9.png\">\r\n\r\n\r\n\r\nFixes
#142898","sha":"3a92e247a62e0b1f181b3c2d392bb2704a8bbcf7","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["review","release_note:fix",":ml","cosmetic","Feature:Transforms","Feature:Data
Frame
Analytics","Feature:ML/AIOps","v8.6.0","v8.7.0"],"number":146451,"url":"https://github.com/elastic/kibana/pull/146451","mergeCommit":{"message":"[ML]
Fix caret direction for expanded state of table rows (#146451)\n\n##
Summary\r\n\r\nFixes the icons used to indicate the collapsed / expanded
state of table\r\nrows in the Data Frame Analytics, Trained Models and
Explain Log Rate\r\nSpikes pages in the ML plugin, and the Transforms
list page. They are\r\nnow consistent with other tables, with a **right
caret** to indicate a\r\n**closed section** and a **down caret** for
**open sections**.\r\n\r\n### Data frame analytics jobs list\r\n<img
width=\"689\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204346940-e56436e1-2e21-4f4d-a618-2b243438a55f.png\">\r\n\r\n###
Data frame analytics results\r\n<img width=\"730\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204346993-32c600d1-f94c-4cb3-8740-e5344ecd6b4e.png\">\r\n\r\n###
Trained models list\r\n<img width=\"788\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204347063-2a50ac16-456c-4ca0-a446-b8535f5ba5cb.png\">\r\n\r\n###
Nodes list\r\n<img width=\"506\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204347215-970a07fe-062c-4c6f-bdfc-ed0f473e9681.png\">\r\n\r\n###
Explain Log Rate Spikes grouped results\r\n<img width=\"809\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204347302-10975598-5e88-42ac-a648-eae64976ed84.png\">\r\n\r\n###
Transform management\r\n<img width=\"1063\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204347393-124a366e-f5a9-44ba-8bfc-94788f334ba9.png\">\r\n\r\n\r\n\r\nFixes
#142898","sha":"3a92e247a62e0b1f181b3c2d392bb2704a8bbcf7"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/146451","number":146451,"mergeCommit":{"message":"[ML]
Fix caret direction for expanded state of table rows (#146451)\n\n##
Summary\r\n\r\nFixes the icons used to indicate the collapsed / expanded
state of table\r\nrows in the Data Frame Analytics, Trained Models and
Explain Log Rate\r\nSpikes pages in the ML plugin, and the Transforms
list page. They are\r\nnow consistent with other tables, with a **right
caret** to indicate a\r\n**closed section** and a **down caret** for
**open sections**.\r\n\r\n### Data frame analytics jobs list\r\n<img
width=\"689\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204346940-e56436e1-2e21-4f4d-a618-2b243438a55f.png\">\r\n\r\n###
Data frame analytics results\r\n<img width=\"730\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204346993-32c600d1-f94c-4cb3-8740-e5344ecd6b4e.png\">\r\n\r\n###
Trained models list\r\n<img width=\"788\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204347063-2a50ac16-456c-4ca0-a446-b8535f5ba5cb.png\">\r\n\r\n###
Nodes list\r\n<img width=\"506\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204347215-970a07fe-062c-4c6f-bdfc-ed0f473e9681.png\">\r\n\r\n###
Explain Log Rate Spikes grouped results\r\n<img width=\"809\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204347302-10975598-5e88-42ac-a648-eae64976ed84.png\">\r\n\r\n###
Transform management\r\n<img width=\"1063\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/7405507/204347393-124a366e-f5a9-44ba-8bfc-94788f334ba9.png\">\r\n\r\n\r\n\r\nFixes
#142898","sha":"3a92e247a62e0b1f181b3c2d392bb2704a8bbcf7"}}]}]
BACKPORT-->

Co-authored-by: Pete Harverson <pete@elastic.co>
This commit is contained in:
Kibana Machine 2022-11-29 08:03:45 -05:00 committed by GitHub
parent 2e3606842a
commit 5589d33d09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View file

@ -221,7 +221,7 @@ export const SpikeAnalysisGroupsTable: FC<SpikeAnalysisTableProps> = ({
}
)
}
iconType={itemIdToExpandedRowMap[item.id] ? 'arrowUp' : 'arrowDown'}
iconType={itemIdToExpandedRowMap[item.id] ? 'arrowDown' : 'arrowRight'}
/>
),
valign: 'top',

View file

@ -86,7 +86,7 @@ export const ExpandableSection: FC<ExpandableSectionProps> = ({
<EuiFlexItem grow={false}>
<EuiButtonEmpty
onClick={toggleExpanded}
iconType={isExpanded ? 'arrowUp' : 'arrowDown'}
iconType={isExpanded ? 'arrowDown' : 'arrowRight'}
iconSide="right"
flush="left"
data-test-subj={`mlDFExpandableSection-${dataTestId}-toggle-button`}

View file

@ -198,7 +198,7 @@ export const useColumns = (
values: { analyticsId: item.config.id },
})
}
iconType={expandedRowItemIds.includes(item.config.id) ? 'arrowUp' : 'arrowDown'}
iconType={expandedRowItemIds.includes(item.config.id) ? 'arrowDown' : 'arrowRight'}
/>
),
'data-test-subj': 'mlAnalyticsTableRowDetailsToggle',

View file

@ -297,7 +297,7 @@ export const ModelsList: FC<Props> = ({
defaultMessage: 'Expand',
})
}
iconType={itemIdToExpandedRowMap[item.model_id] ? 'arrowUp' : 'arrowDown'}
iconType={itemIdToExpandedRowMap[item.model_id] ? 'arrowDown' : 'arrowRight'}
/>
),
'data-test-subj': 'mlModelsTableRowDetailsToggle',

View file

@ -114,7 +114,7 @@ export const NodesList: FC<NodesListProps> = ({ compactView = false }) => {
defaultMessage: 'Expand',
})
}
iconType={itemIdToExpandedRowMap[item.id] ? 'arrowUp' : 'arrowDown'}
iconType={itemIdToExpandedRowMap[item.id] ? 'arrowDown' : 'arrowRight'}
/>
),
'data-test-subj': 'mlNodesTableRowDetailsToggle',

View file

@ -133,7 +133,7 @@ export const useColumns = (
values: { transformId: item.config.id },
})
}
iconType={expandedRowItemIds.includes(item.config.id) ? 'arrowUp' : 'arrowDown'}
iconType={expandedRowItemIds.includes(item.config.id) ? 'arrowDown' : 'arrowRight'}
data-test-subj="transformListRowDetailsToggle"
/>
),