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

[ML] DF Analytics: Collapsable sections on results pages #76641

Merged
merged 11 commits into from
Oct 1, 2020

Conversation

walterra
Copy link
Contributor

@walterra walterra commented Sep 3, 2020

Summary

  • Fixes cell color coding based on influence score for outlier detection results page data grid. (Part of [ML] Dataframe Analytics: Update feature_influence format #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.
  • This PR updates the outlier detection results page. Regression and Classification will be done in follow-ups.

image

Checklist

@alvarezmelissa87
Copy link
Contributor

alvarezmelissa87 commented Sep 10, 2020

Design looks great! 🙌 Happy to have you push on with this @walterra. 🎉 Excited for the new layout!
The evaluate panel for regression/classification can be a separate, collapsed section (initially) as well. 🤔

@walterra walterra force-pushed the ml-analytics-collapsable-sections branch from 32d1e09 to cdd66b4 Compare September 29, 2020 13:41
@walterra walterra marked this pull request as ready for review September 30, 2020 15:14
@walterra walterra requested review from a team as code owners September 30, 2020 15:14
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

Copy link
Contributor

@peteharverson peteharverson left a 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={
Copy link
Contributor

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.

Copy link
Contributor Author

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} />
Copy link
Contributor

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).

Copy link
Contributor Author

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,
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 819cf7d.

@qn895
Copy link
Member

qn895 commented Oct 1, 2020

Loving the new changes to this page. Code LGTM! Just left a minor suggestion.

};

return (
<EuiPanel paddingSize="none" data-test-subj="mlDFAnalyticsOutlierExplorationTablePanel">
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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.

Copy link
Contributor Author

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={
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a 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 ⚡

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

@kbn/optimizer bundle module count

id before after diff
ml 1186 1215 +29

async chunks size

id before after diff
ml 10.5MB 10.5MB +43.2KB

History

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

@walterra walterra merged commit bad6eab into elastic:master Oct 1, 2020
@walterra walterra deleted the ml-analytics-collapsable-sections branch October 1, 2020 18:27
walterra added a commit to walterra/kibana that referenced this pull request Oct 1, 2020
- 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.
phillipb added a commit to phillipb/kibana that referenced this pull request Oct 1, 2020
…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)
  ...
walterra added a commit that referenced this pull request Oct 2, 2020
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants