-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Discover] Deangularization context error message refactoring #70090
[Discover] Deangularization context error message refactoring #70090
Conversation
d057fbb
to
41fb803
Compare
@elasticmachine merge upstream |
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.
Code LGTM 👍 , let's check because of the redundant message before merging it
{reason === FAILURE_REASONS.INVALID_TIEBREAKER && ( | ||
<FormattedMessage | ||
id="discover.context.noSearchableTiebreakerFieldDescription" | ||
defaultMessage="No searchable tiebreaker field could be found in the index pattern {indexPatternId}. Please change the advanced setting {tieBreakerFields} to include a valid field for this index pattern." | ||
values={{ | ||
indexPatternId: queryParameters.indexPatternId, | ||
tieBreakerFields: <code>context:tieBreakerFields</code>, | ||
}} | ||
/> | ||
)} |
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 think this error message is redundant, legacy, might have been useful in recent time. I tried to set the tieBreakerFields
to an invalid value, but I that case _doc
is used as tiebreaker. And I think this is fine this way. So unless you find a way to break this to have this message displayed, I'd suggest to remove it.
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 tried some ideas but didn't work. I'll remove it.
*/ | ||
reason?: string; | ||
/** | ||
* parameters used for invalid tieBreakerFields realted errors |
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: "realted" sounds bit like Spanish ⚽, I think it's "related"
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.
Given the removal of the error above I guess I can remove also this prop?
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.
Yes, pls clean up dead code, thx
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
History
To update your PR or re-run it, just comment with: |
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.
Code LGTM 👨🎨, thx for taking care of another brick in the Discover wall. Useful PR description + images (you can skip the part of the tiebreaker failure or convert it into info that it was removed), tested locally in Chrome, Firefox, Safari, Mac OS 10.14.6, works 👍
Pinging @elastic/kibana-app (Team:KibanaApp) |
…c#70090) Co-authored-by: Elastic Machine <[email protected]>
…c#70090) Co-authored-by: Elastic Machine <[email protected]>
…70090) (#70406) Co-authored-by: Elastic Machine <[email protected]>
…-based-rbac * upstream/master: (38 commits) Move logger configuration integration test to jest (elastic#70378) Changes observability plugin codeowner (elastic#70439) update (elastic#70424) [Logs UI] Avoid CCS-incompatible index name resolution (elastic#70179) Enable "Explore underlying data" actions for Lens visualizations (elastic#70047) Initial work on uptime homepage API (elastic#70135) expressions indexPattern function (elastic#70315) [Discover] Deangularization context error message refactoring (elastic#70090) [Lens] Add "no data" popover (elastic#69147) [Lens] Move chart switcher over (elastic#70182) chore: add missing mjs extension (elastic#70326) [Lens] Multiple y axes (elastic#69911) skip flaky suite (elastic#70386) fix bug to add timeline to case (elastic#70343) [QA][Code Coverage] Drop catchError and use try / catch instead, (elastic#69198) [QA] [Code Coverage] Integrate with Team Assignment Pipeline and Add Research and Development Indexes and Cluster (elastic#69348) [Metrics UI] Add context.reason and alertOnNoData to Inventory alerts (elastic#70260) Resolver refactoring (elastic#70312) [Ingest Manager] Fix agent ack after input format change (elastic#70335) [eslint][ts] Enable prefer-ts-expect-error (elastic#70022) ...
Summary
This PR contains a deangularization of the Context Error Message component, re-implemented with the new EUI package.
ContextErrorMessage
component in ReactEUI Callout
component for the error messageNo error scenario:
Title only error scenario:
Unknown error scenario:
Updated
In the original version there was a
tiebreaker
special error handling which has been removed in this version, due to impossibility to reproduce the error. Therefore the conditional handler branch has been removed in this implementation.Checklist
Delete any items that are not applicable to this PR.