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

Theming: Add preview and hide undo buttons #770

Closed
wants to merge 5 commits into from

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Aug 8, 2016

This pull requests adds the following to the theming app:

2016-08-08-183349_959x530_scrot

@mention-bot
Copy link

@juliushaertl, thanks for your PR! By analyzing the annotation information on this pull request, we identified @schiessle, @LukasReschke and @nickvergessen to be potential reviewers

@juliusknorr juliusknorr mentioned this pull request Aug 8, 2016
5 tasks
@juliusknorr juliusknorr added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Aug 8, 2016
@juliusknorr
Copy link
Member Author

juliusknorr commented Aug 8, 2016

OK, CI seems to be happy, please review.

cc @jancborchardt @nextcloud/theming

public function getLogo() {
$logo = $this->config->getAppValue('theming', 'logoMime');
$pathToLogo = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data/') . '/themedinstancelogo';
if(!$logo || !file_exists($pathToLogo)) {
Copy link
Member

Choose a reason for hiding this comment

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

Can you use IRootFolder for that? @schiessle told me about some object store magic and so on that otherwise would not be compatible.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, always use the Nextcloud file system abstraction to make sure that it works with all underlying storages.

@LukasReschke
Copy link
Member

I like it 👍

@schiessle Mind taking a look at my remarks? Same as we had in the ThemingController itself

@MorrisJobke MorrisJobke mentioned this pull request Aug 9, 2016
67 tasks
@MorrisJobke
Copy link
Member

I tested this and it works 👍 (only for translated slogans this doesn't work, because somehow the lib translation files aren't loaded -> but this is not caused by the code in here)

@schiessle
Copy link
Member

As soon as the comments by @LukasReschke are addressed this can be merged.

@juliusknorr
Copy link
Member Author

I've just pushed another commit. Please check if it is ok like this @LukasReschke @schiessle 😃

@juliusknorr
Copy link
Member Author

Hmm tests are failing, but I don't have any idea why:

There were 3 errors:

1) Test\Files\ViewTest::testLockBasicOperation with data set #4 ('rmdir', array('dir'), 'dir', 'delete', 1, 2, 1)
OCP\Lock\LockedException: "dir" is locked

/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1956
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1142
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:342
/drone/src/github.com/nextcloud/server/tests/lib/Files/ViewTest.php:1793

Caused by
OCP\Lock\LockedException: "files/a2e47ee39f947ec3961ccd7c88e6472b" is locked

/drone/src/github.com/nextcloud/server/lib/private/Lock/MemcacheLockingProvider.php:117
/drone/src/github.com/nextcloud/server/lib/private/Files/Storage/Common.php:669
/drone/src/github.com/nextcloud/server/lib/private/Files/Storage/Wrapper/Wrapper.php:606
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1952
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1142
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:342
/drone/src/github.com/nextcloud/server/tests/lib/Files/ViewTest.php:1793

2) Test\Files\ViewTest::testLockBasicOperation with data set #5 ('unlink', array('test.txt'), 'test.txt', 'delete', 1, 2, 1)
OCP\Lock\LockedException: "test.txt" is locked

/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1956
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1142
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:691
/drone/src/github.com/nextcloud/server/tests/lib/Files/ViewTest.php:1793

Caused by
OCP\Lock\LockedException: "files/c56e89314d7862aaf193d5ef7e8fa32a" is locked

/drone/src/github.com/nextcloud/server/lib/private/Lock/MemcacheLockingProvider.php:117
/drone/src/github.com/nextcloud/server/lib/private/Files/Storage/Common.php:669
/drone/src/github.com/nextcloud/server/lib/private/Files/Storage/Wrapper/Wrapper.php:606
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1952
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1142
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:691
/drone/src/github.com/nextcloud/server/tests/lib/Files/ViewTest.php:1793

3) OCA\Files\Tests\Command\DeleteOrphanedFilesTest::testClearFiles
OCP\Files\NotFoundException: test not found while trying to get owner

/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1644
/drone/src/github.com/nextcloud/server/lib/private/Files/Filesystem.php:890
/drone/src/github.com/nextcloud/server/apps/files_trashbin/lib/Trashbin.php:83
/drone/src/github.com/nextcloud/server/apps/files_trashbin/lib/Trashbin.php:205
/drone/src/github.com/nextcloud/server/apps/files_trashbin/lib/Storage.php:161
/drone/src/github.com/nextcloud/server/apps/files_trashbin/lib/Storage.php:96
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1120
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:691
/drone/src/github.com/nextcloud/server/apps/files/tests/Command/DeleteOrphanedFilesTest.php:126

@LukasReschke
Copy link
Member

cc @icewind1991 any idea? 🚀

@@ -32,3 +32,17 @@
div#theming_settings_msg {
margin-left: 10px;
}

#theming-preview {
width:230px;
Copy link
Member

Choose a reason for hiding this comment

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

Just a nitpick, but coding style here and below: Always a space after the : colon. ;)

@schiessle
Copy link
Member

any news here... @icewind1991 did you had a chance to look at the failing tests?

@juliusknorr
Copy link
Member Author

Ok, i've just rebased this to fix the conflicts with the new admin panel. Tests are still failing, but when I run "drone exec" locally everything works fine. Could there be an issue with the CI server?

cc @icewind1991 @MorrisJobke

@MorrisJobke
Copy link
Member

It's in $ NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite

There were 3 errors:

1) Test\Files\ViewTest::testLockBasicOperation with data set #4 ('rmdir', array('dir'), 'dir', 'delete', 1, 2, 1)
OCP\Lock\LockedException: "dir" is locked

/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1956
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1142
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:342
/drone/src/github.com/nextcloud/server/tests/lib/Files/ViewTest.php:1793

Caused by
OCP\Lock\LockedException: "files/a2e47ee39f947ec3961ccd7c88e6472b" is locked

/drone/src/github.com/nextcloud/server/lib/private/Lock/MemcacheLockingProvider.php:117
/drone/src/github.com/nextcloud/server/lib/private/Files/Storage/Common.php:669
/drone/src/github.com/nextcloud/server/lib/private/Files/Storage/Wrapper/Wrapper.php:606
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1952
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1142
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:342
/drone/src/github.com/nextcloud/server/tests/lib/Files/ViewTest.php:1793

2) Test\Files\ViewTest::testLockBasicOperation with data set #5 ('unlink', array('test.txt'), 'test.txt', 'delete', 1, 2, 1)
OCP\Lock\LockedException: "test.txt" is locked

/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1956
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1142
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:691
/drone/src/github.com/nextcloud/server/tests/lib/Files/ViewTest.php:1793

Caused by
OCP\Lock\LockedException: "files/c56e89314d7862aaf193d5ef7e8fa32a" is locked

/drone/src/github.com/nextcloud/server/lib/private/Lock/MemcacheLockingProvider.php:117
/drone/src/github.com/nextcloud/server/lib/private/Files/Storage/Common.php:669
/drone/src/github.com/nextcloud/server/lib/private/Files/Storage/Wrapper/Wrapper.php:606
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1952
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1142
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:691
/drone/src/github.com/nextcloud/server/tests/lib/Files/ViewTest.php:1793

3) OCA\Files\Tests\Command\DeleteOrphanedFilesTest::testClearFiles
OCP\Files\NotFoundException: test not found while trying to get owner

/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1644
/drone/src/github.com/nextcloud/server/lib/private/Files/Filesystem.php:890
/drone/src/github.com/nextcloud/server/apps/files_trashbin/lib/Trashbin.php:83
/drone/src/github.com/nextcloud/server/apps/files_trashbin/lib/Trashbin.php:205
/drone/src/github.com/nextcloud/server/apps/files_trashbin/lib/Storage.php:161
/drone/src/github.com/nextcloud/server/apps/files_trashbin/lib/Storage.php:96
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:1120
/drone/src/github.com/nextcloud/server/lib/private/Files/View.php:691
/drone/src/github.com/nextcloud/server/apps/files/tests/Command/DeleteOrphanedFilesTest.php:126

Tests are still failing, but when I run "drone exec" locally everything works fine. Could there be an issue with the CI server?

usually not, because it also doesn't do anything different 😕 Let me try it locally too.

@MorrisJobke
Copy link
Member

Works here too ... I restarted the job at the drone instance ... maybe it was a bad race condition due to load.

@nickvergessen
Copy link
Member

I guess it's related to the loading order

max-width: 20%;
max-height: 20%;
margin-top: 20px;
}
Copy link
Member

Choose a reason for hiding this comment

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

new line missing

@juliusknorr
Copy link
Member Author

OK, I'll close this PR and try to split it up and resubmit.
Maybe that will help, I've no idea why these tests are just failing for this PR.

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.

8 participants