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

EuiSelectableTemplateSitewide for Elastic's global search #3800

Merged
merged 36 commits into from
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9250ec4
Very basic start of a selectable template for sitewide search
Jul 19, 2020
9fdcf7b
Very basic start of a selectable template for sitewide search
Jul 19, 2020
9e2e44a
Finishing basic implementation without option rendering
Jul 19, 2020
d50fca9
Finishing basic implementation without option rendering
Jul 19, 2020
7340f2e
[EuiSelectableListItem] Added `onFocusBadgeContent` prop for visible …
Jul 19, 2020
1226c87
Fixing alignment of new li elements that used to be buttons
Jul 19, 2020
eba64bc
First step towards custom option renders
Jul 21, 2020
0181ac8
Better rendering of the options
Jul 21, 2020
5bab4c0
Added `searchableLabel` to EuiSelectableOption`
Jul 22, 2020
0fe7b68
Better data
Jul 24, 2020
55c291d
Fixed up metadata styling by type
Jul 24, 2020
721a6e9
EuiHighlight as the span
Jul 24, 2020
a9dfd1f
Changing EuiSelectableItem’s `onFocusBadgeContent` to `onFocusBadge` …
Jul 24, 2020
e35aeed
Fix some types
Jul 24, 2020
dcdc567
Trying to fix inputRef;
Jul 24, 2020
d231689
Added ability to change empty messages directly on EuiSelectable to m…
Jul 24, 2020
26eef7c
Simulating loading
Jul 24, 2020
8bc6a93
A few fixes based on consumption
Jul 24, 2020
066a2a9
Change example name
Jul 27, 2020
32b9ca6
[EuiSelectableMessage] Added `bordered` prop
Aug 10, 2020
c796f1c
[EuiBadge] Fix layout when only an icon is provided
Aug 10, 2020
3408282
Background color for EuiMark only in Amsterdam
Aug 11, 2020
323d113
Changed the way meta data styling is handled
Aug 11, 2020
ebda517
Moved option rendering to it’s own file
Aug 11, 2020
12e988b
Added documentation
Aug 11, 2020
1e94ebf
More fixes including dark header version
Aug 11, 2020
de7d74b
Couple more fixes including `onBlur` when option is clicked
Aug 11, 2020
3d14809
Fixing a few a11y issues
Aug 11, 2020
82cecb1
introduce EuiSelectableOption generic; use generic extension in EuiSe…
thompsongl Aug 12, 2020
9122cdf
[EuiPopover] and [EuiSelectable] Fix some axe issues
Aug 13, 2020
a614732
cl
Aug 13, 2020
1d57232
Fixing `esc` key by showing popover `onInput`
Aug 17, 2020
f75027a
Re-fix refs
Aug 17, 2020
5e21ad3
Merge branch 'master' into k8/search
cchaos Aug 17, 2020
b72b73d
Apply suggestions from code review
cchaos Aug 18, 2020
c63b137
Only display the append wrapper if append exists or isFocused
Aug 18, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@

- Added `isLoading` and `isLoadingMessage` props to `EuiAccordion` ([#3879](https://github.com/elastic/eui/pull/3879))
- Added `testenv` mock for `EuiFocusTrap` ([#3930](https://github.com/elastic/eui/pull/3930))
- Added `EuiSelectableTemplateSitewide` as wrapper of `EuiSelectable` for Elastic's global search component ([#3800](https://github.com/elastic/eui/pull/3800))
- Updated styles of `EuiMark` to override browser default ([#3800](https://github.com/elastic/eui/pull/3800))
- Updated `EuiHighlight` to use `EuiMark` as matching element wrapper ([#3800](https://github.com/elastic/eui/pull/3800))
- Enhanced `EuiSelectable`'s `option` type to allow for a separate `searchableLabel` and any generic keys ([#3800](https://github.com/elastic/eui/pull/3800))
- Added `listProps.onFocusBadge`, `loadingMessage`, `noMatchesMessage`, and `emptyMessage` props to `EuiSelectable` ([#3800](https://github.com/elastic/eui/pull/3800))
- Added `bordered` prop to `EuiSelectableMessage` ([#3800](https://github.com/elastic/eui/pull/3800))

**Bug fixes**

- Fixed bug in `EuiCodeBlock` content overlapping with control buttons when `whiteSpace` was set to `"pre"` ([#3853](https://github.com/elastic/eui/pull/3853))
- Fixed `EuiFocusTrap` not applying provided `style` prop ([#3916](https://github.com/elastic/eui/pull/3916))
- Fixed bug in `EuiDataGrid` when a new pagination object would cause every cell to render ([#3919](https://github.com/elastic/eui/pull/3919))
- Fixed display of `EuiBadge` if only the `iconType` is passed ([#3800](https://github.com/elastic/eui/pull/3800))
- Fixed accesssibility error in `EuiSelectable` when the `list` isn't on the page ([#3800](https://github.com/elastic/eui/pull/3800))
- Fixed accesssibility error in `EuiPopover` when `ownFocus = false` ([#3800](https://github.com/elastic/eui/pull/3800))

## [`28.0.0`](https://github.com/elastic/eui/tree/v28.0.0)

Expand Down
5 changes: 5 additions & 0 deletions src-docs/src/components/guide_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ $guideZLevelHighest: $euiZLevel9 + 1000;
font-weight: $euiFontWeightBold;
}

.euiSelectableTemplateSitewide__optionMeta--PINK {
font-weight: $euiFontWeightMedium;
color: $euiColorAccentText;
}

@import '../views/guidelines/index';
@import 'guide_section/index';
@import 'guide_rule/index';
Expand Down
2 changes: 2 additions & 0 deletions src-docs/src/views/badge/badge_with_icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ export default () => (
</EuiBadge>

<EuiBadge iconType="check">Default</EuiBadge>

<EuiBadge iconType="returnKey" />
</div>
);
25 changes: 25 additions & 0 deletions src-docs/src/views/header/header_elastic_pattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import {
EuiShowFor,
EuiText,
EuiTitle,
EuiSelectableTemplateSitewide,
EuiSelectableMessage,
} from '../../../../src/components';

export default ({ theme }) => {
Expand Down Expand Up @@ -256,6 +258,29 @@ export default ({ theme }) => {
],
borders: 'none',
},
{
items: [
<EuiSelectableTemplateSitewide
options={[]}
searchProps={{
append: '⌘K',
compressed: true,
}}
emptyMessage={
<EuiSelectableMessage style={{ minHeight: 300 }}>
<p>
Please see the component page for{' '}
<Link to="/forms/selectable">
<strong>EuiSelectableTemplateSitewide</strong>
</Link>{' '}
on how to configure your sitewide search.
</p>
</EuiSelectableMessage>
}
/>,
],
borders: 'none',
},
{
items: [
deploymentMenu,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const HighlightAndMarkExample = {
],
text: (
<p>
Use <strong>EuiMark</strong> to wrap a string in an
Use <strong>EuiMark</strong> to wrap a string in a{' '}
<EuiCode>mark</EuiCode> element.
</p>
),
Expand Down
4 changes: 1 addition & 3 deletions src-docs/src/views/highlight_and_mark/mark.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import { EuiMark } from '../../../../src/components';
export function Mark() {
return (
<Fragment>
The quick brown fox
<EuiMark>jumped over</EuiMark>
the lazy dog
The quick brown fox <EuiMark>jumped over</EuiMark> the lazy dog
</Fragment>
);
}
13 changes: 13 additions & 0 deletions src-docs/src/views/selectable/props.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,23 @@ import {
EuiSelectableOptionsListProps,
} from '../../../../src/components/selectable';

import {
EuiSelectableTemplateSitewideOption,
EuiSelectableTemplateSitewideMetaData,
} from '../../../../src/components/selectable/selectable_templates/selectable_template_sitewide_option';

export const EuiSelectableOptionProps: FunctionComponent<EuiSelectableOption> = () => (
<div />
);

export const EuiSelectableOptionsList: FunctionComponent<EuiSelectableOptionsListProps> = () => (
<div />
);

export const Options: FunctionComponent<EuiSelectableTemplateSitewideOption> = () => (
<div />
);

export const MetaData: FunctionComponent<EuiSelectableTemplateSitewideMetaData> = () => (
<div />
);
Loading