Conversation
|
@danxuliu, thanks for your PR! By analyzing the history of the files in this pull request, we identified @juliushaertl, @schiessle and @LukasReschke to be potential reviewers. |
1a29af6 to
af494e1
Compare
Codecov Report
@@ Coverage Diff @@
## master #5981 +/- ##
=============================================
- Coverage 52.87% 37.02% -15.86%
+ Complexity 22770 22768 -2
=============================================
Files 1404 1404
Lines 88177 88159 -18
Branches 1327 1327
=============================================
- Hits 46627 32639 -13988
- Misses 41550 55520 +13970
|
|
Oops, I had forgotten to add the acceptance tests for the Theming app to Drone; it is fixed now. |
|
You are awesome!!!! 🚀 😍 Thanks again for helping that much 👍 |
apps/theming/js/settings-admin.js
Outdated
| // Ensure that the URL starts by '/' to prevent "stylesheet.load" from | ||
| // prepending the URL of the current page. | ||
| if (serverCssUrl[0] !== '/') { | ||
| serverCssUrl = '/' + serverCssUrl; |
There was a problem hiding this comment.
This doesn't work for instances that are in a subfolder. It needs to be the full URL. linkToAbsolute or something like that should exist, which prepends you the webroot.
There was a problem hiding this comment.
This doesn't work for instances that are in a subfolder. It needs to be the full URL.
Totally right; getCachedSCSS removes the webroot.
linkToAbsolute or something like that should exist, which prepends you the webroot.
I have used Util::linkTo instead, as Util::linkToAbsolute adds the webroot, but also the protocol and server host.
af494e1 to
9613575
Compare
|
Tests fail: |
|
And please rebase on master - we updated the drone config 🙈 |
In some cases the acceptance tests have to explicitly wait for something to happen without using the "find" method from the actor; in those cases the timeout multiplier needs to be taken into account too, so the test cases must be able to retrieve it from the actor. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This is a preparatory step for a following commit in which the properties present in the response will change depending on whether the request was successful or not. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Pull request #5429 made cached SCSS files depend on a hash of the base URL, so the "/css/core/server.css" file does no longer exist. The "server.css" URL must be known by the Theming app in order to update the stylesheets when previewing the changes to the theme, so the DataResponse from the controller now provides the full URL to the "server.css" file that has to be reloaded (if any). The "server.css" URL provided by the response will be taken into account by the JavaScript front-end in a following commit. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This is a preparatory step for a following change in which reloadStylesheets will have to be able to receive absolute URLs. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Pull request #5429 made cached SCSS files depend on a hash of the base URL, so the "/css/core/server.css" file does no longer exist; as the file can not be loaded the "Loading preview" message is never removed and the "Saved" message is never shown. As it now depends on the hash of the base URL the file to be reloaded can no longer be hardcoded, so the full URL to the "server.css" file that has to be reloaded (if any) is now got from the DataResponse provided by the controller. Fixes #5975 Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
9613575 to
b16ce1b
Compare
🤦 Yes, I forgot to check the tests. And not only that, I also used a deprecated method (
Done. Edit: By the way, I have noticed that the commit order in the GitHub interface is messed up (as it is ordered chronologically instead of parent->child); I can change their timestamp and push again so they are showed in the right order for easier review if you want. |
No - just leave it as it is :) That's fine :) |
MorrisJobke
left a comment
There was a problem hiding this comment.
Tested again and works 👍 Code looks good
|
Huge thanks again @danxuliu for this awesome help here 👍 Could I ask you to open the backport to stable12? That would be nice :) |
Pull request #5429 made cached SCSS files depend on a hash of the base URL, so the /css/core/server.css file does no longer exist; as the file can not be loaded the "Loading preview" message is never removed and the "Saved" message is never shown.
As it now depends on the hash of the base URL the file to be reloaded can no longer be hardcoded, so the DataResponse from the controller now provides the full URL to the server.css file that has to be reloaded (if any).
Fixes #5975
Acceptance tests for the preview after setting and resetting the color in the Theming app are also included in this pull request.