-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ML] DF Analytics: Collapsable sections on results pages #76641
[ML] DF Analytics: Collapsable sections on results pages #76641
Conversation
Design looks great! 🙌 Happy to have you push on with this @walterra. 🎉 Excited for the new layout! |
32d1e09
to
cdd66b4
Compare
Pinging @elastic/ml-ui (:ml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works well! Just left a couple of comments.
expandedRowItem !== undefined && <ExpandedRow item={expandedRowItem} />} | ||
</> | ||
} | ||
headerContent={ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth adding description into the collapsed header (if it is non-blank), especially as there is normally a lot of available space in this section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion, I revisit it in the follow up that will also add the same section to regression and classification results pages.
{ | ||
defaultMessage: 'Feature influence score', | ||
} | ||
<ExplorationQueryBar indexPattern={indexPattern} setSearchQuery={setSearchQuery} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you consider moving the query bar below the Analysis section? I can't decide where it fits best - on the one hand most views place the query bar at the top, but on the other hand the query bar would sit well directly above the panels on which it has an effect (in this view just the result table for now).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it during design phase and had a look at other plugin/kibana pages, most have them at the very top, even if some sections below it might not be in complete context of the search bar. There are also other plugins that keep the search bar pinned at the top when you scroll down the page which is an idea I'd like to explore but seemed overkill for this iteration. With these considerations I went for having it at the top for this PR.
checkpointing: {}, | ||
config, | ||
id: config.id, | ||
job_type: Object.keys(config.analysis)[0] as DataFrameAnalysisConfigType, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion to use getAnalysisType
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 819cf7d.
Loving the new changes to this page. Code LGTM! Just left a minor suggestion. |
}; | ||
|
||
return ( | ||
<EuiPanel paddingSize="none" data-test-subj="mlDFAnalyticsOutlierExplorationTablePanel"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this data-test-subject accurate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Fixed in 486511a. ExpandableSection
now takes in an ID to create a dynamic data-test-subj
.
@@ -55,57 +69,182 @@ export const OutlierExploration: FC<ExplorationProps> = React.memo(({ jobId }) = | |||
jobConfig !== undefined ? getFeatureCount(jobConfig.dest.results_field, tableItems) : 1 | |||
); | |||
|
|||
const [expandedRowItem, setExpandedRowItem] = useState<DataFrameAnalyticsListRow | undefined>( | |||
undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to pass undefined explicitly here, I don't think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in b228018.
expandedRowItem !== undefined && <ExpandedRow item={expandedRowItem} />} | ||
</> | ||
} | ||
headerContent={ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Might be worth breaking out the headerContent
into a separate component to keep this cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion, refactored in 819cf7d.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple of small suggestions but other than that LGTM ⚡
💚 Build SucceededMetrics [docs]@kbn/optimizer bundle module count
async chunks size
History
To update your PR or re-run it, just comment with: |
- Fixes cell color coding based on influence score for outlier detection results page data grid. (Part of elastic#77046) - Introduces expandable sections (<ExpandableSection />). In contrast to plain accordions, the main idea of this component is that it should also provide some sort of useful summary when collapsed instead of just being an expandable title. For example, the "Analysis" section is collapsed by default, but still offers information like analysis type, source and destination index. This concept should allow us to keep the analytics results pages usable with more content (additional results, evaluations, visualizations) being added over time. - The "Analysis" section is a reuse of the expandable row from the analytics jobs list. Some design adjustments have been made to make it usable in both places.
…aly-detection-partition-field * 'master' of github.com:elastic/kibana: (76 commits) Fix z-index of KQL Suggestions dropdown (elastic#79184) [babel] remove unused/unneeded babel plugins (elastic#79173) [Search] Fix timeout upgrade link (elastic#79045) Always Show Embeddable Panel Header in Edit Mode (elastic#79152) [Ingest]: add more test for transform index (elastic#79154) [ML] DF Analytics: Collapsable sections on results pages (elastic#76641) [Fleet] Fix agent policy change action migration (elastic#79046) [Ingest Manager] Match package spec `dataset`->`data_stream` and `config_templates`->`policy_templates` renaming (elastic#78699) Revert "[Metrics UI] Add ability to override datafeeds and job config for partition field (elastic#78875)" [ML] Update transform cloning to include description and new fields (elastic#78364) chore(NA): remove non existing plugin paths from case api integration tests (elastic#79127) [Ingest Manager] Ensure we trigger agent policy updated event when we bump revision. (elastic#78836) [Metrics UI] Display No Data context.values as [NO DATA] (elastic#78038) [Monitoring] Missing data alert (elastic#78208) [Lens] Fix embeddable title and description for reporting and dashboard tooltip (elastic#78767) [Lens] Consistent Drag and Drop styles (elastic#78674) [ML] Model management UI fixes and enhancements (elastic#79072) [Metrics UI] Add ability to override datafeeds and job config for partition field (elastic#78875) [Security Solution]Fix basepath used by endpoint telemetry tests (elastic#79027) update rum agent version which contains longtasks (elastic#79105) ...
…9188) - Fixes cell color coding based on influence score for outlier detection results page data grid. (Part of #77046) - Introduces expandable sections (<ExpandableSection />). In contrast to plain accordions, the main idea of this component is that it should also provide some sort of useful summary when collapsed instead of just being an expandable title. For example, the "Analysis" section is collapsed by default, but still offers information like analysis type, source and destination index. This concept should allow us to keep the analytics results pages usable with more content (additional results, evaluations, visualizations) being added over time. - The "Analysis" section is a reuse of the expandable row from the analytics jobs list. Some design adjustments have been made to make it usable in both places.
Summary
<ExpandableSection />
). In contrast to plain accordions, the main idea of this component is that it should also provide some sort of useful summary when collapsed instead of just being an expandable title. For example, the "Analysis" section is collapsed by default, but still offers information like analysis type, source and destination index. This concept should allow us to keep the analytics results pages usable with more content (additional results, evaluations, visualizations) being added over time.Checklist