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

[Stable12] fix scss webroot and url rewrite #7688

Merged
merged 15 commits into from Jan 5, 2018

Conversation

@skjnldsv
Member

skjnldsv commented Jan 3, 2018

Backport of #7631

Allow scss to proberly work and cache file whatever situation they're in:

  • Sub-directory nc installation
  • Sub-directory nc installation with a non-root app_path
  • Basic nc installation with a non-root path

skjnldsv added some commits Dec 27, 2017

Fixed scss url rewriting
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Fixed webroot for scss files
Fixed tests

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
getWebDir function
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Use OC_Util function for app web path
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Fixup! getWebdir return
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Added tests for various installations types
- With root installation
 - Core css
 - App inside server root
 - Secondary apps directory outside server root
- With an installation in a sub directory
 - Core css
 - App inside server root
 - Secondary apps directory outside server root

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Correctly remove temp test directory tree
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@codecov

This comment has been minimized.

codecov bot commented Jan 4, 2018

Codecov Report

Merging #7688 into stable12 will decrease coverage by 16.66%.
The diff coverage is 0%.

@@               Coverage Diff               @@
##             stable12    #7688       +/-   ##
===============================================
- Coverage       53.92%   37.26%   -16.67%     
  Complexity      22712    22712               
===============================================
  Files            1385     1385               
  Lines           86996    86998        +2     
  Branches         1330     1330               
===============================================
- Hits            46913    32416    -14497     
- Misses          40083    54582    +14499
Impacted Files Coverage Δ Complexity Δ
lib/private/Template/CSSResourceLocator.php 0% <0%> (-72.14%) 26 <0> (ø)
lib/private/Template/SCSSCacher.php 6.29% <0%> (-63.31%) 35 <3> (ø)
...yption/Exceptions/ModuleAlreadyExistsException.php 0% <0%> (-100%) 1% <0%> (ø)
lib/private/App/CodeChecker/EmptyCheck.php 0% <0%> (-100%) 6% <0%> (ø)
...pps/files/lib/Activity/Settings/FavoriteAction.php 0% <0%> (-100%) 8% <0%> (ø)
...mments/tests/Unit/Controller/NotificationsTest.php 0% <0%> (-100%) 4% <0%> (ø)
apps/systemtags/lib/Settings/Admin.php 0% <0%> (-100%) 3% <0%> (ø)
...ddleware/Security/Exceptions/NotAdminException.php 0% <0%> (-100%) 1% <0%> (ø)
apps/dav/lib/CalDAV/Activity/Setting/Calendar.php 0% <0%> (-100%) 8% <0%> (ø)
.../Exceptions/EncryptionHeaderKeyExistsException.php 0% <0%> (-100%) 1% <0%> (ø)
... and 481 more
@rullzer

rullzer approved these changes Jan 4, 2018

@juliushaertl

This comment has been minimized.

Member

juliushaertl commented Jan 4, 2018

@skjnldsv This breaks core icons after changing the color value in the theming app (what triggers rebuilding the core scss):

.icon-settings {
    background-image: url('//core/css/../img/actions/settings.svg?v=1');
}

Also happens on master after #7631 🙈

@juliushaertl

See comment.

Fixed url rebase with theming
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@skjnldsv

This comment has been minimized.

Member

skjnldsv commented Jan 4, 2018

@juliushaertl Hum, strange, I fixed it though. I don't get why there was this error.
Could you check again?

@juliushaertl

This comment has been minimized.

Member

juliushaertl commented Jan 4, 2018

Opened #7704 so we don't forget to fix that on master as well.

@kyrofa

kyrofa approved these changes Jan 4, 2018 edited

I see what @juliushaertl is saying on the snap as well (but not in 12.0.4). Assuming that wasn't introduced in this PR (was it?), +1 from me. I see no behavioral change other than that.

@kyrofa

Oh wait, #7631 was this PR to master, huh. Doh! That means this PR does introduce this behavior.

@skjnldsv

This comment has been minimized.

Member

skjnldsv commented Jan 4, 2018

@kyrofa yes! :p
Let me check

Proberly detect variable changes
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@skjnldsv

This comment has been minimized.

Member

skjnldsv commented Jan 4, 2018

@juliushaertl can you check again, Maybe we could get rid of the cache reset now that it will proberly erase the files when compiling again? :)

skjnldsv and others added some commits Jan 4, 2018

Fixup! Proberly detect variable changes
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Fix faulty path in theming scss generation
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliushaertl

This comment has been minimized.

Member

juliushaertl commented Jan 5, 2018

@kyrofa Please have another look :)

Maybe we could get rid of the cache reset now that it will proberly erase the files when compiling again? :)

I don't think so, since we only detect changed variables globally and not per file, we need to make sure that all scss files are invalidated when variables change.

skjnldsv added some commits Jan 5, 2018

Rollback caching fix
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Revert rebaseurl function edit
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@skjnldsv

This comment has been minimized.

Member

skjnldsv commented Jan 5, 2018

@juliushaertl Okay here for me! :)

@kyrofa

kyrofa approved these changes Jan 5, 2018

There we go, that seems to work perfectly, even when changing the theme color.

@MorrisJobke MorrisJobke merged commit 28d77ef into stable12 Jan 5, 2018

0 of 2 checks passed

continuous-integration/drone/pr the build failed
Details
continuous-integration/drone/push the build failed
Details

@MorrisJobke MorrisJobke deleted the stable12-fix-scss-webroot-and-url-rewrite branch Jan 5, 2018

@MorrisJobke MorrisJobke referenced this pull request Jan 8, 2018

Merged

12.0.5 RC1 #7740

13 of 13 tasks complete

@pachulo pachulo referenced this pull request Jan 28, 2018

Closed

Update to nextcloud 12.0.5 #431

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