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

Polymer 2 header migration #702

Merged
merged 42 commits into from
Feb 26, 2018

Conversation

daniel-tabarcea
Copy link
Contributor

@daniel-tabarcea daniel-tabarcea commented Feb 14, 2018

- enabled profile dropdown
- country selector wip
- connects unicef/etools-issues#1150
- fixed country dropdowns missing dependencies
@daniel-tabarcea daniel-tabarcea added READY and removed WIP labels Feb 21, 2018
- 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">
Copy link
Collaborator

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]]">
Copy link
Collaborator

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"
Copy link
Collaborator

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>
Copy link
Collaborator

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
Copy link
Collaborator

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...',
Copy link
Collaborator

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

Copy link
Collaborator

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});

Copy link
Collaborator

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

Copy link
Collaborator

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">
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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)',
Copy link
Collaborator

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

@daniel-tabarcea daniel-tabarcea added WIP and removed READY labels Feb 22, 2018
- 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
- added 'use strict' where missing
/**
* @polymer
* @customElement
* @appliesMixin PageHeaderMixin
Copy link
Collaborator

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 {

Copy link
Collaborator

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

@acory acory merged commit 3eb17f6 into feature--polymer2-migration Feb 26, 2018
@daniel-tabarcea daniel-tabarcea deleted the feat--polymer2-header-migration branch March 28, 2018 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants