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

Regen snapshots | Fixes #571 #587

Merged
merged 4 commits into from
Feb 20, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ describe('ClayDatasetDisplay', function() {
const spy = jest.spyOn(component, 'emit');

let filtersDropdown =
component.refs.managementToolbar.refs.filters.refs.dropdown;
component.refs.managementToolbar.refs.filters;
filtersDropdown.refs.portal.refs.dropdownButton.element.click();

jest.runAllTimers();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,19 @@ exports[`ClayDatasetDisplay should render a ClayDatasetDisplay and change view o
</li>
<li class="dropdown nav-item">
<div class="dropdown">
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link navbar-breakpoint-down-d-none btn-unstyled" type="button">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link btn-unstyled" type="button">
<span class="navbar-breakpoint-down-d-none">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
</span>
<span class="navbar-breakpoint-d-none">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-filter" focusable="false">
<title>filter</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#filter"></use>
</svg>
</span>
</button>
</div>
</li>
Expand Down Expand Up @@ -696,11 +704,19 @@ exports[`ClayDatasetDisplay should render a ClayDatasetDisplay and change view o
</li>
<li class="dropdown nav-item">
<div class="dropdown">
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link navbar-breakpoint-down-d-none btn-unstyled" type="button">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link btn-unstyled" type="button">
<span class="navbar-breakpoint-down-d-none">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
</span>
<span class="navbar-breakpoint-d-none">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-filter" focusable="false">
<title>filter</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#filter"></use>
</svg>
</span>
</button>
</div>
</li>
Expand Down Expand Up @@ -1375,11 +1391,19 @@ exports[`ClayDatasetDisplay should render a ClayDatasetDisplay and change view o
</li>
<li class="dropdown nav-item">
<div class="dropdown">
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link navbar-breakpoint-down-d-none btn-unstyled" type="button">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link btn-unstyled" type="button">
<span class="navbar-breakpoint-down-d-none">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
</span>
<span class="navbar-breakpoint-d-none">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-filter" focusable="false">
<title>filter</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#filter"></use>
</svg>
</span>
</button>
</div>
</li>
Expand Down Expand Up @@ -2230,11 +2254,19 @@ exports[`ClayDatasetDisplay should render a ClayDatasetDisplay with grouped item
</li>
<li class="dropdown nav-item">
<div class="dropdown">
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link navbar-breakpoint-down-d-none btn-unstyled" type="button">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link btn-unstyled" type="button">
<span class="navbar-breakpoint-down-d-none">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
</span>
<span class="navbar-breakpoint-d-none">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-filter" focusable="false">
<title>filter</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#filter"></use>
</svg>
</span>
</button>
</div>
</li>
Expand Down Expand Up @@ -2749,11 +2781,19 @@ exports[`ClayDatasetDisplay should render a ClayDatasetDisplay with items and li
</li>
<li class="dropdown nav-item">
<div class="dropdown">
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link navbar-breakpoint-down-d-none btn-unstyled" type="button">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link btn-unstyled" type="button">
<span class="navbar-breakpoint-down-d-none">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
</span>
<span class="navbar-breakpoint-d-none">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-filter" focusable="false">
<title>filter</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#filter"></use>
</svg>
</span>
</button>
</div>
</li>
Expand Down Expand Up @@ -3598,11 +3638,19 @@ exports[`ClayDatasetDisplay should render a ClayDatasetDisplay with items and li
</li>
<li class="dropdown nav-item">
<div class="dropdown">
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link navbar-breakpoint-down-d-none btn-unstyled" type="button">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link btn-unstyled" type="button">
<span class="navbar-breakpoint-down-d-none">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
</span>
<span class="navbar-breakpoint-d-none">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-filter" focusable="false">
<title>filter</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#filter"></use>
</svg>
</span>
</button>
</div>
</li>
Expand Down Expand Up @@ -4585,11 +4633,19 @@ exports[`ClayDatasetDisplay should render a ClayDatasetDisplay with items and li
</li>
<li class="dropdown nav-item">
<div class="dropdown">
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link navbar-breakpoint-down-d-none btn-unstyled" type="button">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link btn-unstyled" type="button">
<span class="navbar-breakpoint-down-d-none">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
</span>
<span class="navbar-breakpoint-d-none">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-filter" focusable="false">
<title>filter</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#filter"></use>
</svg>
</span>
</button>
</div>
</li>
Expand Down Expand Up @@ -5264,11 +5320,19 @@ exports[`ClayDatasetDisplay should render a ClayDatasetDisplay with items and se
</li>
<li class="dropdown nav-item">
<div class="dropdown">
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link navbar-breakpoint-down-d-none btn-unstyled" type="button">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link btn-unstyled" type="button">
<span class="navbar-breakpoint-down-d-none">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
</span>
<span class="navbar-breakpoint-d-none">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-filter" focusable="false">
<title>filter</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#filter"></use>
</svg>
</span>
</button>
</div>
</li>
Expand Down Expand Up @@ -6437,11 +6501,19 @@ exports[`ClayDatasetDisplay should render a ClayDatasetDisplay with ungrouped it
</li>
<li class="dropdown nav-item">
<div class="dropdown">
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link navbar-breakpoint-down-d-none btn-unstyled" type="button">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
<button aria-expanded="false" aria-haspopup="true" aria-label="toggle" class="dropdown-toggle btn nav-link btn-unstyled" type="button">
<span class="navbar-breakpoint-down-d-none">Filter and Order
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom" focusable="false">
<title>caret-bottom</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#caret-bottom"></use>
</svg>
</span>
<span class="navbar-breakpoint-d-none">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-filter" focusable="false">
<title>filter</title>
<use xlink:href="../../../node_modules/clay/lib/images/icons/icons.svg#filter"></use>
</svg>
</span>
</button>
</div>
</li>
Expand Down
23 changes: 20 additions & 3 deletions packages/clay-management-toolbar/src/ClayManagementToolbar.soy
Original file line number Diff line number Diff line change
Expand Up @@ -334,18 +334,35 @@
{/if}

{if $filterItems}
{let $filtersTrigger kind="html"}
<span class="navbar-breakpoint-down-d-none">
Filter and Order
{call ClayIcon.render}
{param spritemap: $spritemap /}
{param symbol: 'caret-bottom' /}
{/call}
</span>

<span class="navbar-breakpoint-d-none">
{call ClayIcon.render}
{param spritemap: $spritemap /}
{param symbol: 'filter' /}
{/call}
</span>
{/let}

<li class="dropdown nav-item">
{call ClayDropdown.render}
{call ClayDropdownBase.render}
{param button: $hideFiltersDoneButton ? null : [
'label': 'Done'
] /}
{param disabled: $disabled /}
{param events: ['buttonClicked': $_handleFilterDoneButtonClick] /}
{param items: $filterItems /}
{param label: 'Filter and Order' /}
{param label: $filtersTrigger /}
{param ref: 'filters' /}
{param spritemap: $spritemap /}
{param triggerClasses: 'nav-link navbar-breakpoint-down-d-none' /}
{param triggerClasses: 'nav-link' /}
{/call}
</li>
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ describe('ClayManagementToolbar', function() {
const spy = jest.spyOn(managementToolbar, 'emit');

let filters = managementToolbar.refs.filters;
filters.refs.dropdown.refs.portal.refs.dropdownButton.element.click();
filters.refs.portal.refs.dropdownButton.element.click();

expect(spy).toHaveBeenCalled();
expect(spy).toHaveBeenCalledWith(
Expand Down
Loading