Skip to content

Header scss optimisation - #3050

Merged
LukasReschke merged 2 commits into
masterfrom
header-scss-optimisation
Jan 19, 2017
Merged

Header scss optimisation#3050
LukasReschke merged 2 commits into
masterfrom
header-scss-optimisation

Conversation

@skjnldsv

Copy link
Copy Markdown
Member

Optimisation and simplification of the header.scss file

@nextcloud/designers

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@skjnldsvskjnldsv added 3. to review Waiting for reviews design Design, UI, UX, etc. feature: scss labels Jan 12, 2017
@skjnldsvskjnldsv added this to the Nextcloud 12.0 milestone Jan 12, 2017
@skjnldsvskjnldsv self-assigned this Jan 12, 2017
Comment threadcore/css/header.scss
@@ -1,3 +1,10 @@
/**
* @copyright Copyright (c) 2017, John Molakvoæ (skjnldsv@protonmail.com)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We also need to include the original authors of the original file ;)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I included the most active ones.
There is 16, should I include all of them? Or should we remove the copyright header entirely?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

it's not about most active ones: it's about actual contributors to this file

Comment threadcore/css/header.scss Outdated

/* prevent ugly selection effect on accidental selection */

#header, #navigation, #expanddiv {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code-style wise these should be on separate lines, one per selector.

Comment threadcore/css/header.scss Outdated

/* HEADERS ------------------------------------------------------------------ */

#body-user #header, #body-settings #header, #body-public #header {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same here, separate lines per selector for readability please. :)

Comment threadcore/css/header.scss
@@ -39,7 +45,6 @@
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also if you want to do this in the right way, please don't use "magical" values you should assign variables like this to z-index.
screen shot 2017-01-12 at 16 42 15

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Variables will come after @Espina2
Please see the main scss pr!

Comment threadcore/css/header.scss
}
}

/* hover effect for app switcher label */

@Espina2Espina2Jan 12, 2017

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In here instead of repeating the code you why you don't use @extend?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

What do you wish to extend exactly? There isn't that much similarity.

And extend is great amongst similar properties, but since we generate the css, we need to aim for a balance between readability and optimisation.

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Comment threadcore/css/header.scss
* @copyright Copyright (c) 2017, John Molakvoæ (skjnldsv@protonmail.com)
* @copyright Copyright (c) 2016, Lukas Reschke (lukas@statuscode.ch)
* @copyright Copyright (c) 2016, Julius Härtl (jus@bitgrid.net)
* @copyright Copyright (c) 2016, Jos Poortvliet (jospoortvliet@gmail.com)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@skjnldsv I wrote the original file in 2014, that’s what I meant ;)
https://github.com/nextcloud/server/blame/stable11/core/css/header.css

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I created a script to output the original copyrights from the commits.
I will create a special pr to put all the copyrights correctly :)

@skjnldsv
skjnldsv dismissed jancborchardt’s stale reviewJanuary 17, 2017 08:51

Can you review the css only? I will update all the copyrights on a different pr :)

@jancborchardt

Copy link
Copy Markdown
Member

By the way, this might conflict with #2924 by @ChristophWurst depending on what work is done further. Could you coordinate here @ChristophWurst@skjnldsv, maybe merging this one into #2924?

@skjnldsv

Copy link
Copy Markdown
MemberAuthor

@jancborchardt We should merge this one first since #2924 doesn't modify header.scss as much as this pr :)

@codecov-io

Copy link
Copy Markdown

Current coverage is 53.99% (diff: 100%)

Merging #3050 into master will increase coverage by 0.07%

@@ master #3050 diff @@
==========================================
Files 1302 1302 Lines 80061 80766 +705 Methods 7902 8006 +104 Messages 0 0 Branches 1245 1303 +58 ==========================================
+ Hits 43170 43611 +441 - Misses 36891 37154 +263 - Partials 0 1 +1 

Powered by Codecov. Last update 00c3f80...0ec6ea5

@jancborchardt

Copy link
Copy Markdown
Member

@ChristophWurst can you also check this then to make sure it kinda is in line with what you are doing? Or that there’s no duplicate work or conflicts?

@ChristophWurst

Copy link
Copy Markdown
Member

@jancborchardt We should merge this one first since #2924 doesn't modify header.scss as much as this pr :)

I'd way we merge mine first then @skjnldsv has to do the merge conflict resolution fun 😉

@skjnldsv

Copy link
Copy Markdown
MemberAuthor

Please don't! 😭

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Clicked a bit around and looks good 👍

@LukasReschke
LukasReschke merged commit 5809164 into masterJan 19, 2017
@LukasReschke
LukasReschke deleted the header-scss-optimisation branch January 19, 2017 01:25
@LukasReschke

Copy link
Copy Markdown
Member

Sorry @ChristophWurst 😉

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsdesignDesign, UI, UX, etc.feature: scss

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@skjnldsv@jancborchardt@codecov-io@ChristophWurst@LukasReschke@MorrisJobke@Espina2