-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
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.
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; |
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.
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}, |
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.
Can be just {text}
}, | ||
pwPlaceholder: { | ||
type: String, | ||
value: () => { return '●'.repeat(12);} |
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.
😭
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.
A lot of comments, but no mayor issues.
} | ||
|
||
.heading { | ||
font-size: 1.2em; |
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.
What is the benefit of using em
as a measure of size?
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.
Its the same as saying: current font size x1.2
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.
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?
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.
I would say that it slightly improves readability in case of font sizes (vs. using px)
|
||
iron-icon { | ||
display: block; | ||
margin-right: 15px; |
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.
Isn't it tidier to only use multiplications of 4px
to keep the magic numbers to a minimal?
|
||
customElements.define(LancieInfoBox.is, LancieInfoBox); | ||
</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.
Let's remove this
--icon-fill-color: var(--paper-grey-800); | ||
} | ||
|
||
.discord:hover { |
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.
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.
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.
True, I experimented with a label showing on hover, but that was pretty ugly :P. Will take a second look at it
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.
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]]"> |
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.
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.', |
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.
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() { |
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.
Is it not longer needed to encapsulate the js in a function?
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.
Not sure, why was that needed before?
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.
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, |
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.
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: { |
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.
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> |
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.
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.
Todo:
|
…le, improve mobile responsiveness
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.
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.
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. |
@TimvdLippe Agreed, especially since we are pretty close to the event. Also agreeing with splitting up these kind of changes in the feature. |
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. |
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) |
Closes #582