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

Add Boolean field formatter #7935

Merged
merged 4 commits into from
Aug 10, 2016
Merged

Conversation

thomasneirynck
Copy link
Contributor

@thomasneirynck thomasneirynck commented Aug 4, 2016

  • adds the boolean field formatter
  • set this formatter as the default for boolean fields

This addresses the issue of booleans not being displayed as true or false in the legend or on the axes of visualizations (#7898)

Note that booleans already displayed as true and false on the Discover page. However, this was due to server-side formatting of ES.

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.
@thomasneirynck
Copy link
Contributor Author

jenkins, test this


Bool.id = 'boolean';
Bool.title = 'Boolean';
Bool.fieldType = ['boolean'];
Copy link
Member

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?

Copy link
Contributor Author

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.

@jbudz
Copy link
Member

jbudz commented Aug 5, 2016

Looking good, two small comments above

@jbudz
Copy link
Member

jbudz commented Aug 5, 2016

LGTM

@jbudz jbudz removed their assignment Aug 8, 2016
@BigFunger
Copy link
Contributor

LGTM
Thanks for humoring me, Thomas!

@thomasneirynck
Copy link
Contributor Author

@BigFunger thanks for reviewing! FYI, I created #7975, to discuss this issue.

@thomasneirynck thomasneirynck merged commit a33b364 into elastic:master Aug 10, 2016
@thomasneirynck thomasneirynck deleted the fix/7898 branch August 10, 2016 23:11
airow pushed a commit to airow/kibana that referenced this pull request Feb 16, 2017
Add Boolean field formatter

Former-commit-id: a33b364
cee-chen added a commit that referenced this pull request Aug 5, 2024
`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`
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.

3 participants