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

Adding defaults and fixing unit tests #8096

Merged
merged 3 commits into from
Aug 25, 2016

Conversation

ycombinator
Copy link
Contributor

@ycombinator ycombinator commented Aug 25, 2016

Follow up to PR #8084. This PR contains the unit tests and default values that should've been part of #8084 😞

@@ -65,8 +65,8 @@ export default function ($compile) {
run: (item) => this.toggle(item.key)
}, opt);

defaultedOpt.hideButton = isFunction(opt.hideButton) ? opt.hideButton : () => opt.hideButton;
defaultedOpt.disableButton = isFunction(opt.disableButton) ? opt.disableButton : () => opt.disableButton;
defaultedOpt.hideButton = isFunction(opt.hideButton) ? opt.hideButton : () => !!opt.hideButton || false;
Copy link
Contributor

Choose a reason for hiding this comment

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

These defaults are not necessary because the !! forces the value to be either true or false.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes, of course. Removing.

@epixa
Copy link
Contributor

epixa commented Aug 25, 2016

LGTM

@ycombinator ycombinator merged commit 78cc0d9 into elastic:master Aug 25, 2016
@ycombinator ycombinator deleted the disable-button-for-real branch August 25, 2016 23:43
airow pushed a commit to airow/kibana that referenced this pull request Feb 16, 2017
Adding defaults and fixing unit tests

Former-commit-id: 78cc0d9
cee-chen added a commit that referenced this pull request Oct 31, 2024
`v97.2.0`⏩`v97.3.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)_

---

## [`v97.3.0`](https://github.com/elastic/eui/releases/v97.3.0)

- `EuiDataGrid` now supports a new
`toolbarVisibility.showDisplaySelector.customRender` function that
allows completely customizing the rendering of the display selector
popover ([#8080](elastic/eui#8080))
- `EuiDataGrid`'s row height/lines per row setting has been streamlined
in both UI and UX ([#8080](elastic/eui#8080))
- `EuiDataGrid` now accepts consumer-passed display setting updates even
after users have changed their display preferences via UI
([#8080](elastic/eui#8080))
- Updated `EuiDataGrid` to vertically center all
`toolbarVisibility.additionalControls` nodes
([#8085](elastic/eui#8085))
- Updated `EuiDataGrid` with a beta
`rowHeightsOptions.autoBelowLineCount` feature flag
([#8096](elastic/eui#8096))
- Updated `EuiContextMenuPanel` to allow disabling initial focus via
`initialFocusedItemIndex={-1}`
([#8101](elastic/eui#8101))

**Bug fixes**

- Fixed `EuiComment`'s typing to correctly reflect all accepted props
([#8089](elastic/eui#8089))
- Fixed `EuiSelectableTemplateSitewide`s within dark-themed `EuiHeader`s
missing input borders
([#8100](elastic/eui#8100))
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 31, 2024
`v97.2.0`⏩`v97.3.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)_

---

## [`v97.3.0`](https://github.com/elastic/eui/releases/v97.3.0)

- `EuiDataGrid` now supports a new
`toolbarVisibility.showDisplaySelector.customRender` function that
allows completely customizing the rendering of the display selector
popover ([elastic#8080](elastic/eui#8080))
- `EuiDataGrid`'s row height/lines per row setting has been streamlined
in both UI and UX ([elastic#8080](elastic/eui#8080))
- `EuiDataGrid` now accepts consumer-passed display setting updates even
after users have changed their display preferences via UI
([elastic#8080](elastic/eui#8080))
- Updated `EuiDataGrid` to vertically center all
`toolbarVisibility.additionalControls` nodes
([elastic#8085](elastic/eui#8085))
- Updated `EuiDataGrid` with a beta
`rowHeightsOptions.autoBelowLineCount` feature flag
([elastic#8096](elastic/eui#8096))
- Updated `EuiContextMenuPanel` to allow disabling initial focus via
`initialFocusedItemIndex={-1}`
([elastic#8101](elastic/eui#8101))

**Bug fixes**

- Fixed `EuiComment`'s typing to correctly reflect all accepted props
([elastic#8089](elastic/eui#8089))
- Fixed `EuiSelectableTemplateSitewide`s within dark-themed `EuiHeader`s
missing input borders
([elastic#8100](elastic/eui#8100))

(cherry picked from commit 4e7d43a)
kibanamachine added a commit that referenced this pull request Oct 31, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [Upgrade EUI to v97.3.0
(#198087)](#198087)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Cee
Chen","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-31T02:41:45Z","message":"Upgrade
EUI to v97.3.0 (#198087)\n\n`v97.2.0`⏩`v97.3.0`\r\n\r\n_[Questions?
Please see our Kibana
upgrade\r\nFAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_\r\n\r\n---\r\n\r\n##
[`v97.3.0`](https://github.com/elastic/eui/releases/v97.3.0)\r\n\r\n-
`EuiDataGrid` now supports a
new\r\n`toolbarVisibility.showDisplaySelector.customRender` function
that\r\nallows completely customizing the rendering of the display
selector\r\npopover
([#8080](https://github.com/elastic/eui/pull/8080))\r\n- `EuiDataGrid`'s
row height/lines per row setting has been streamlined\r\nin both UI and
UX ([#8080](https://github.com/elastic/eui/pull/8080))\r\n-
`EuiDataGrid` now accepts consumer-passed display setting updates
even\r\nafter users have changed their display preferences via
UI\r\n([#8080](https://github.com/elastic/eui/pull/8080))\r\n- Updated
`EuiDataGrid` to vertically center
all\r\n`toolbarVisibility.additionalControls`
nodes\r\n([#8085](https://github.com/elastic/eui/pull/8085))\r\n-
Updated `EuiDataGrid` with a
beta\r\n`rowHeightsOptions.autoBelowLineCount` feature
flag\r\n([#8096](https://github.com/elastic/eui/pull/8096))\r\n- Updated
`EuiContextMenuPanel` to allow disabling initial focus
via\r\n`initialFocusedItemIndex={-1}`\r\n([#8101](https://github.com/elastic/eui/pull/8101))\r\n\r\n**Bug
fixes**\r\n\r\n- Fixed `EuiComment`'s typing to correctly reflect all
accepted
props\r\n([#8089](https://github.com/elastic/eui/pull/8089))\r\n- Fixed
`EuiSelectableTemplateSitewide`s within dark-themed
`EuiHeader`s\r\nmissing input
borders\r\n([#8100](https://github.com/elastic/eui/pull/8100))","sha":"4e7d43a03181ab95719733cc0a44d4896481841f","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","EUI","v9.0.0","backport:version","v8.17.0"],"title":"Upgrade
EUI to
v97.3.0","number":198087,"url":"https://github.com/elastic/kibana/pull/198087","mergeCommit":{"message":"Upgrade
EUI to v97.3.0 (#198087)\n\n`v97.2.0`⏩`v97.3.0`\r\n\r\n_[Questions?
Please see our Kibana
upgrade\r\nFAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_\r\n\r\n---\r\n\r\n##
[`v97.3.0`](https://github.com/elastic/eui/releases/v97.3.0)\r\n\r\n-
`EuiDataGrid` now supports a
new\r\n`toolbarVisibility.showDisplaySelector.customRender` function
that\r\nallows completely customizing the rendering of the display
selector\r\npopover
([#8080](https://github.com/elastic/eui/pull/8080))\r\n- `EuiDataGrid`'s
row height/lines per row setting has been streamlined\r\nin both UI and
UX ([#8080](https://github.com/elastic/eui/pull/8080))\r\n-
`EuiDataGrid` now accepts consumer-passed display setting updates
even\r\nafter users have changed their display preferences via
UI\r\n([#8080](https://github.com/elastic/eui/pull/8080))\r\n- Updated
`EuiDataGrid` to vertically center
all\r\n`toolbarVisibility.additionalControls`
nodes\r\n([#8085](https://github.com/elastic/eui/pull/8085))\r\n-
Updated `EuiDataGrid` with a
beta\r\n`rowHeightsOptions.autoBelowLineCount` feature
flag\r\n([#8096](https://github.com/elastic/eui/pull/8096))\r\n- Updated
`EuiContextMenuPanel` to allow disabling initial focus
via\r\n`initialFocusedItemIndex={-1}`\r\n([#8101](https://github.com/elastic/eui/pull/8101))\r\n\r\n**Bug
fixes**\r\n\r\n- Fixed `EuiComment`'s typing to correctly reflect all
accepted
props\r\n([#8089](https://github.com/elastic/eui/pull/8089))\r\n- Fixed
`EuiSelectableTemplateSitewide`s within dark-themed
`EuiHeader`s\r\nmissing input
borders\r\n([#8100](https://github.com/elastic/eui/pull/8100))","sha":"4e7d43a03181ab95719733cc0a44d4896481841f"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198087","number":198087,"mergeCommit":{"message":"Upgrade
EUI to v97.3.0 (#198087)\n\n`v97.2.0`⏩`v97.3.0`\r\n\r\n_[Questions?
Please see our Kibana
upgrade\r\nFAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_\r\n\r\n---\r\n\r\n##
[`v97.3.0`](https://github.com/elastic/eui/releases/v97.3.0)\r\n\r\n-
`EuiDataGrid` now supports a
new\r\n`toolbarVisibility.showDisplaySelector.customRender` function
that\r\nallows completely customizing the rendering of the display
selector\r\npopover
([#8080](https://github.com/elastic/eui/pull/8080))\r\n- `EuiDataGrid`'s
row height/lines per row setting has been streamlined\r\nin both UI and
UX ([#8080](https://github.com/elastic/eui/pull/8080))\r\n-
`EuiDataGrid` now accepts consumer-passed display setting updates
even\r\nafter users have changed their display preferences via
UI\r\n([#8080](https://github.com/elastic/eui/pull/8080))\r\n- Updated
`EuiDataGrid` to vertically center
all\r\n`toolbarVisibility.additionalControls`
nodes\r\n([#8085](https://github.com/elastic/eui/pull/8085))\r\n-
Updated `EuiDataGrid` with a
beta\r\n`rowHeightsOptions.autoBelowLineCount` feature
flag\r\n([#8096](https://github.com/elastic/eui/pull/8096))\r\n- Updated
`EuiContextMenuPanel` to allow disabling initial focus
via\r\n`initialFocusedItemIndex={-1}`\r\n([#8101](https://github.com/elastic/eui/pull/8101))\r\n\r\n**Bug
fixes**\r\n\r\n- Fixed `EuiComment`'s typing to correctly reflect all
accepted
props\r\n([#8089](https://github.com/elastic/eui/pull/8089))\r\n- Fixed
`EuiSelectableTemplateSitewide`s within dark-themed
`EuiHeader`s\r\nmissing input
borders\r\n([#8100](https://github.com/elastic/eui/pull/8100))","sha":"4e7d43a03181ab95719733cc0a44d4896481841f"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Cee Chen <[email protected]>
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.

2 participants