-
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
Add Boolean field formatter #7935
Conversation
This fixes an issue with Boolean values being displayed as 0 and 1 instead of as 'true' and 'false' in the visualizations. Also added this as the default formatter for Boolean field types.
Also trim & lowercase text input.
jenkins, test this |
|
||
Bool.id = 'boolean'; | ||
Bool.title = 'Boolean'; | ||
Bool.fieldType = ['boolean']; |
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.
thoughts on making this available for string and number fields too?
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.
OK. That makes sense if people want to display a value as boolean, but not necessarily map it as such in their index.
Looking good, two small comments above |
Improve string conversion. Objects will now be serialized.
LGTM |
LGTM |
@BigFunger thanks for reviewing! FYI, I created #7975, to discuss this issue. |
Add Boolean field formatter Former-commit-id: a33b364
`v95.5.0` ⏩ `v95.6.0` _[Questions? Please see our Kibana upgrade FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_ --- ## [`v95.6.0`](https://github.com/elastic/eui/releases/v95.6.0) - Updated `EuiIcon` with a new `crossInCircle` glyph ([#7924](elastic/eui#7924)) **Bug fixes** - Fixed `EuiEmptyPrompt` to correctly collapse and expand responsively when used with custom breakpoints larger than the default `xl` breakpoint ([#7935](elastic/eui#7935)) **Accessibility** - Improved the experience of `EuiModal` by ensuring nested `EuiPopover` closes on `Escape` keypress instead of the modal ([#7939](elastic/eui#7939)) **CSS-in-JS conversions** - Converted `EuiDatePicker` to Emotion ([#7937](elastic/eui#7937)) - Removed `$euiDatePickerCalendarWidth` - Removed `$euiDatePickerPadding` - Removed `$euiDatePickerGap` - Removed `$euiDatePickerCalendarColumns` - Removed `$euiDatePickerButtonSize` - Removed `$euiDatePickerMinControlWidth` - Removed `$euiDatePickerMaxControlWidth` - Removed `@mixin datePickerCaret` - Removed `@mixin datePickerArrow`
This addresses the issue of booleans not being displayed as
true
orfalse
in the legend or on the axes of visualizations (#7898)Note that booleans already displayed as
true
andfalse
on the Discover page. However, this was due to server-side formatting of ES.