Skip to content

Migrate filter bar to React, EUI, and Typescript - #25563

Merged
Bargs merged 104 commits into
elastic:masterfrom
Bargs:euifyFilterBar
Jan 30, 2019
Merged

Bargs merged 104 commits into
elastic:masterfrom
Bargs:euifyFilterBar

Conversation

@Bargs

@Bargs Bargs commented Nov 12, 2018 •

Copy link
Copy Markdown
Contributor

Summary

Rewrites the filter bar in React, EUI, and Typescript. Updates the look and feel of the filter bar and makes it consistent with the rest of K7.

image

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@Bargs Bargs added Feature:Filters Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// labels Nov 12, 2018
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-app

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@Bargs
Bargs requested a review from a team as a code owner December 19, 2018 17:03
@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@cchaos

cchaos commented Jan 28, 2019

Copy link
Copy Markdown
Contributor

You need to add some title attributes. The below examples are how they're setup in the EUI docs:

Filter trigger button

const filterButtonTitle = `${this.state.filters.length} filters applied. Select to ${this.state.isFiltersVisible ? 'hide' : 'show'}.`;

    const filterTriggerButton = (
      <EuiFilterButton
        ...
        title={filterButtonTitle}
      >
        Filters
      </EuiFilterButton>
    );

EuiGlobalFilterItem

let title = `Filter: ${prefix} ${field}: "${value}". Select for more filter actions.`;
    if (isPinned) {
      title = `Pinned ${title}`;
    } else if (isDisabled) {
      title = `Disabled ${title}`;
    }

    const badge = (
      <EuiBadge
        ...
        title={title}
        iconOnClick={this.deleteFilter}
        iconOnClickAriaLabel={`Delete filter`}
        onClick={this.togglePopover}
        onClickAriaLabel="Filter actions"
      >
        {prefix}
        <span>{field}: </span>
        <span>&quot;{value}&quot;</span>
      </EuiBadge>
    );

@ppisljar ppisljar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

tested it on windows with edge, seems to work fine (except that whole kibana performs super slow there and our sample dashboards are pretty much unusable)
tested also in IE11, works fine as well (performance is actually way better than in edge, there is some weird flickering happening when selecting dropdown values, but everything is usable.

LGTM

@Bargs
Bargs dismissed Bamieh’s stale review January 30, 2019 00:49

Made requested updates

@Bargs

Bargs commented Jan 30, 2019

Copy link
Copy Markdown
Contributor Author

Thanks @cchaos, I added titles the badges. Could you take a look at the custom label switch as well? As far as I can tell we're passing in the exact same props as in the demo, but the label is not getting read out by the screenreader, even though it's working in the demo.

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@cchaos

cchaos commented Jan 30, 2019

Copy link
Copy Markdown
Contributor

It's actually not working in the EUI docs either because it requires an id to be passed so that it can create the necessary connection between the hidden checkbox and label via the htmlFor prop.

@timroes timroes mentioned this pull request Jan 30, 2019
2 of 5 tasks
to it and screenreaders will be able to read the text
@Bargs

Bargs commented Jan 30, 2019

Copy link
Copy Markdown
Contributor Author

@cchaos hmmm weird, you're right, adding an id fixed it in this PR. The global header demo doesn't pass an ID though and it was working for me in MacOS's VoiceOver. Strange.

Comment thread src/ui/public/filter_bar/filter_view/base_filter_view.tsx Outdated
@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

text so that it can be used in the filter apply modal as well
Comment thread src/ui/public/filter_bar/filter_view/index.tsx
@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@Bargs
Bargs merged commit 410c094 into elastic:master Jan 30, 2019
Bargs added a commit to Bargs/kibana that referenced this pull request Jan 30, 2019
Bargs added a commit that referenced this pull request Jan 30, 2019
Bargs added a commit to Bargs/kibana that referenced this pull request Jan 31, 2019
Bargs added a commit that referenced this pull request Jan 31, 2019
Fixes the build issues introduced in #25563 and re-introduces the new react/eui/typescript filter bar, essentially reverting the revert in #29662. I did have to resolve one merge conflict in query_bar.tsx, and re-deleted all of the old filter bar code where translation code had been added.
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
Rewrites the filter bar in React, EUI, and Typescript. Updates the look and feel of the filter bar and makes it consistent with the rest of K7.
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
Fixes the build issues introduced in elastic#25563 and re-introduces the new react/eui/typescript filter bar, essentially reverting the revert in elastic#29662. I did have to resolve one merge conflict in query_bar.tsx, and re-deleted all of the old filter bar code where translation code had been added.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Filters release_note:enhancement Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants