-
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
Make (empty) value subdued #103833
Make (empty) value subdued #103833
Conversation
Pinging @elastic/kibana-app-services (Team:AppServices) |
import { shortenDottedString } from '../../utils'; | ||
|
||
export const emptyLabel = i18n.translate('data.fieldFormats.string.emptyLabel', { | ||
const emptyLabel = i18n.translate('data.fieldFormats.string.emptyLabel', { |
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.
ℹ️ Removed the export
, since we're not using this outside this file.
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.
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.
@timroes tested locally and this looks good!
What do you think about adding test cases for string.convert(value, 'html'...
to string.test.ts
too?
[EDIT]
For the empty val and non empty val cases
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Any counts in public APIs
Page load bundle
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.
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.
Thanks for adding those test cases!
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.
LGTM
* Make empty value subdued * Fix highlighting in values * Fix test failures * Add unit tests
* Make empty value subdued * Fix highlighting in values * Fix test failures * Add unit tests
Summary
Fixes #103802
This makes the new (empty) value of the string field formatter use the subdued text color (in contexts where it renders as HTML, i.e. Discover, table visualizations).
Note: when searching for a value (i.e. a highlight appears) the formatting won't happen (as you might figure out in the code). This behavior was already present before this PR with the pure text converter, and I opened #103854 to discuss and track that.