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

Clear button element instead of iron-icon with class #117

Merged
merged 6 commits into from
Jan 10, 2018

Conversation

JaySunSyn
Copy link
Contributor

@JaySunSyn JaySunSyn commented Dec 29, 2017

Currently needed to display the clear button in the filters-dialog (PR #90) without having to include the styles into the template.

width: 16px !important;
min-height: 16px;
height: 16px;
position: absolute;
Copy link
Contributor

Choose a reason for hiding this comment

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

position:absolute specifiies position from the edges of the closest relative ancestor.
In the filter dialog context, this ancestor is the paper-dialog-scrollable element, so the clear icon will always be on the top right of the dialog.
I guess it should be fixed with something like:

:host {
   display: block;
   position: relative

@@ -33,8 +35,7 @@ <h3 style="margin: 0;">[[ title ]]</h3>
</paper-input>
</div>
</paper-dropdown-menu>
<iron-icon icon="clear" class="header-clear-filter"
on-tap="resetFilter" visible$="[[ hasFilter(filter.*) ]]"></iron-icon>
<cosmoz-clear-button on-tap="resetFilter" hidden$="[[ !hasFilter(filter.*) ]]"></cosmoz-clear-button>
Copy link
Contributor

Choose a reason for hiding this comment

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

We can use click instead of tap event. See https://www.polymer-project.org/2.0/docs/devguide/gesture-events

@@ -34,8 +35,7 @@ <h3 style="margin: 0;">[[ title ]]</h3>
</paper-input>
</div>
</paper-dropdown-menu>
<iron-icon icon="clear" class="header-clear-filter"
on-tap="resetFilter" visible$="[[ hasFilter(filter.*) ]]"></iron-icon>
<cosmoz-clear-button on-tap="resetFilter" hidden$="[[ !hasFilter(filter.*) ]]"></cosmoz-clear-button>
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer click event

@@ -33,8 +34,7 @@ <h3 style="margin: 0;">[[ title ]]</h3>
</datetime-local>
</div>
</paper-dropdown-menu>
<iron-icon icon="clear" class="header-clear-filter"
on-tap="resetFilter" visible$="[[ hasFilter(filter.*) ]]"></iron-icon>
<cosmoz-clear-button on-tap="resetFilter" hidden$="[[ !hasFilter(filter.*) ]]"></cosmoz-clear-button>
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer click event

@@ -28,8 +32,7 @@ <h3 style="margin: 0;">[[ title ]]</h3>
</paper-input>
</div>
</paper-dropdown-menu>
<iron-icon icon="clear" class="header-clear-filter"
on-tap="resetFilter" visible$="[[ hasFilter(filter.*) ]]"></iron-icon>
<cosmoz-clear-button on-tap="resetFilter" hidden$="[[ !hasFilter(filter.*) ]]"></cosmoz-clear-button>
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer click event

@@ -30,8 +31,7 @@ <h3 style="margin: 0;">[[ title ]]</h3>
</paper-input>
</div>
</paper-dropdown-menu>
<iron-icon icon="clear" class="header-clear-filter"
on-tap="resetFilter" visible$="[[ hasFilter(filter.*) ]]"></iron-icon>
<cosmoz-clear-button on-tap="resetFilter" hidden$="[[ !hasFilter(filter.*) ]]"></cosmoz-clear-button>
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer click event

Copy link
Contributor

@plequang plequang left a comment

Choose a reason for hiding this comment

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

Could also please rebase, to ease merging of PR

@plequang plequang merged commit d8787fe into Neovici:master Jan 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants