-
Notifications
You must be signed in to change notification settings - Fork 3
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
Polymer 2 header migration #702
Polymer 2 header migration #702
Conversation
daniel-tabarcea
commented
Feb 14, 2018
•
edited
Loading
edited
- connects Migrate header elements to polymer 2 etools-issues#1150
- enabled profile dropdown - country selector wip - connects unicef/etools-issues#1150
- fixed country dropdowns missing dependencies
- countries selector element now working
- reworked user data elems to mixins - more updates on the header
- fixed issues with profile saving - removed useless user binding - added data refresh dialog
- fixed app-selector issues
- fixed an issue with the profile not showing available workspaces
…unicef/etools-partnership-management into feat--polymer2-header-migration
- fixed an issue with button text not being centerd
- removed todos and deprecated code
- removed comments - removed deprecated code - added anotation - fixed spacing
@@ -0,0 +1,182 @@ | |||
<link rel="import" href="../../../../bower_components/polymer/polymer.html"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong import, polymer-element.html
is used in Polymer 2
} | ||
</style> | ||
|
||
<template is="dom-if" if="[[countrySelectorVisible]]"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dom-if.html
and dom-repeat.html
import missing
<paper-dropdown-menu id="menu" label="Country" noink no-label-float> | ||
<paper-listbox slot="dropdown-content" | ||
id="countriesListbox" | ||
attr-for-selected="countryId" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be country-id
?
</template> | ||
</template> | ||
|
||
<script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'use strict';
missing
* | ||
* @polymer | ||
* @customElement | ||
* @appliedMixin CountriesDropdownMixin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@appliesMixin
... :)
|
||
_triggerCountryChangeRequest(countryId) { | ||
this.dispatchEvent(new CustomEvent('global-loading', { | ||
message: 'Please wait while country is changing...', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
event bubbles
and composed
properties missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the event should be defined like this:
this.dispatchEvent(new CustomEvent('global-loading', {detail: {message: '...', active: true, loadingSource: '...'}, bubbles: true, composed: true});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all PR events should be fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,293 @@ | |||
<link rel="import" href="../../../../bower_components/polymer/polymer.html"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong element import
/** | ||
* @polymer | ||
* @mixinFunction | ||
* @appliedMixin EtoolsLogsMixin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@appliesMixin
/** | ||
* @polymer | ||
* @customElement | ||
* @appliedMixin PageHeaderMixin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@appliesMixin
|
||
static get observers() { | ||
return [ | ||
'_singleSectionChanged(interventionsSelected, partnersSelected, agreementsSelected)', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in Polymer 2 observers run even if arguments are undefined... you might need to add some validation for this
- fixed mixin anotations - fixed events
- removed duplicated methods
- fixed issue with event firing
- moved fireEvent function to commonMixin - added commonMixin imports
- created EventHelperMixin - updated imports where fireRequest is used
- fixed import
- added 'use strict' where missing
- used wrapper function for event dispatch - connects unicef/etools-issues#1020
- updated more event handlers
- fixed missing mixin apply
…ef/etools-partnership-management into feat--polymer2-header-migration
/** | ||
* @polymer | ||
* @customElement | ||
* @appliesMixin PageHeaderMixin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update @appliesMixin PageHeaderMixin
* @mixinFunction | ||
*/ | ||
EtoolsPmpApp.Mixins.EventHelper = (baseClass) => class extends baseClass { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very likely that deduppingMixin might be needed here