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

Initial my-area layout update #617

Closed
wants to merge 20 commits into from
Closed

Initial my-area layout update #617

wants to merge 20 commits into from

Conversation

elarb
Copy link
Member

@elarb elarb commented Feb 17, 2018

  • Used custom icon set project-wide
  • Added info boxes to lancie-area:
    info-boxes
  • Fixed an issue with gender edit field sometimes being empty
  • Refactored the profile edit form and slightly changed the layout:
    profile-edit-form

Closes #582

@elarb elarb requested a review from martijnjanssen February 17, 2018 15:07
Copy link
Member

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

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

Statically looks okay. I think we should start removing all layout usages from the project. Could you remove them from this PR already? Then we can make these incremental changes as well.

@@ -15,43 +17,126 @@
--card-min-width: 300px;
}

.card {
.cards-container {
@apply --layout-horizontal;
Copy link
Member

Choose a reason for hiding this comment

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

I think we should impose a rule to deprecate all these usages of layout. Both in mixins and in classes. We should use the regular display: flex instead.


_fireToast(text) {
this.dispatchEvent(new CustomEvent('toast', {
detail: {text: text},
Copy link
Member

Choose a reason for hiding this comment

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

Can be just {text}

},
pwPlaceholder: {
type: String,
value: () => { return '●'.repeat(12);}
Copy link
Member

Choose a reason for hiding this comment

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

😭

Copy link
Contributor

@martijnjanssen martijnjanssen left a comment

Choose a reason for hiding this comment

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

A lot of comments, but no mayor issues.

}

.heading {
font-size: 1.2em;
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the benefit of using em as a measure of size?

Copy link
Member Author

Choose a reason for hiding this comment

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

Its the same as saying: current font size x1.2

Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be wise to do this to all font font sizes where it would be logical? Not in this PR, but from now on?

Copy link
Member Author

Choose a reason for hiding this comment

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

I would say that it slightly improves readability in case of font sizes (vs. using px)


iron-icon {
display: block;
margin-right: 15px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't it tidier to only use multiplications of 4px to keep the magic numbers to a minimal?


customElements.define(LancieInfoBox.is, LancieInfoBox);
</script>

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove this

--icon-fill-color: var(--paper-grey-800);
}

.discord:hover {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm having some difficulty seeing that this is actually clickable. Isn't it a good idea to make it a link or something? Maybe add a slot and put a button in there? I think that the current representation doesn't communicate that it is going somewhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

True, I experimented with a label showing on hover, but that was pretty ugly :P. Will take a second look at it

Copy link
Member

Choose a reason for hiding this comment

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

A "Join" button or something should make it pretty clear. I guess a <slot> in lancie-info is a good idea for that

last-response="{{discordWidget}}">
</lancie-ajax>

<lancie-section type="primary full" header="My Area - [[user.profile.displayName]]">
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't even know why this is a lancie-section, this makes no sense 💩. We can also change this later though.

if (request.succeeded) {
this.fire('toast', {text: 'Password updated.'});
this.dispatchEvent(new CustomEvent('toast', {
detail: 'Password updated.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove the periods at the end. I'm fairly sure the material docs only recommends adding them with complete sentences.

<paper-tooltip for="checkIcon" offset="0" animation-delay="1">Save changes</paper-tooltip>
</div>
</paper-card>

</template>
<script>
'use strict';

(function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it not longer needed to encapsulate the js in a function?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure, why was that needed before?

Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC this was to ensure that no variables were leaking. I think @TimvdLippe can shed some more light on this.

@@ -65,7 +67,8 @@
type: Array,
value: function() {
return [];
}
},
notify: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here for the this.set('seats', someVar)

@@ -119,7 +119,10 @@ <h2>Your personal invites</h2>
Polymer({
is: 'my-area-teams',
properties: {
teams: Array,
teams: {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's smart to add a default assignment here, too.

@@ -131,7 +131,7 @@

<div>
<h2>Fill in your profile</h2>
<profile-edit-form id="profileForm" user="{{user}}" on-profile-submitted="profileConfirmed"></profile-edit-form>
<lancie-profile-edit id="profileForm" user="{{user}}" on-profile-submitted="profileConfirmed"></lancie-profile-edit>
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure, but it looks odd to the left side. Centering looks like an improvement over having it on the left side. A margin: 0 auto; on the lancie-profile-edit does the trick.

@elarb
Copy link
Member Author

elarb commented Feb 17, 2018

Todo:

Copy link
Member

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

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

Looks good! Needs some more testing, but I would rather merge this sooner rather than later. It is quite a lot of changes. Next time, it would be better to split up the various improvements that are included in this 1 PR.

@TimvdLippe
Copy link
Member

Per our internal discussion: we are holding off this PR until after the LAN. There are no major fixes included in this PR, mostly quality of life improvements. Therefore we rather hold off to not incorporate unnecessary risk so close before the event.

@elarb
Copy link
Member Author

elarb commented Feb 24, 2018

@TimvdLippe Agreed, especially since we are pretty close to the event. Also agreeing with splitting up these kind of changes in the feature.

@elarb
Copy link
Member Author

elarb commented Mar 13, 2018

Do we continue to work on my-area in this PR, or merge this and continue the rework in other PR's? I'd suggest the latter.

@TimvdLippe
Copy link
Member

Sure, but we have to address the comments of @martijnjanssen in that PR. Maybe we can split up this PR and do the small steps one at a time? E.g. close this and then create a PR for each commit (or small set of commits)

@elarb elarb closed this Mar 21, 2018
@elarb elarb deleted the refactor_elements branch October 19, 2018 11:38
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.

4 participants