-
Notifications
You must be signed in to change notification settings - Fork 2.1k
extended theme service #27746
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
extended theme service #27746
Conversation
ee58be4 to
74e6e41
Compare
|
Is this done ? If yes, please set the "3 - To Review" label and summon reviewers. |
|
Since the changes are used in an app, should i move this to the public api? |
| $this->setDefaultThemeDirectory($defaultThemeDirectory); | ||
| $this->createTheme($themeName); | ||
|
|
||
| if ($themeName === '' && $this->defaultThemeExists()) { |
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.
weird, why does Github show && in red now ?
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.
Github had a syntax highlighting hickup. (<- just for the history)
If some functions need to be called by apps, please make these public. The code checker would complain when scanning the app if you're using private APIs |
|
Ok, going to update. |
DeepDiver1975
left a comment
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.
public api is required
|
@phisch any update ? |
|
@DeepDiver1975 please give me feedback if this is okay. Updating the TemplateEditor regardingly, and checking if this is being used somewhere else. |
OCP shall only hold interfaces - no classes. the idea here is to separate the public interface declaration from its implementation. |
|
setting back to '2 - developing' because of missing proper public interfaces |
|
Without this it will not be possible to theme the setup page as it was before, which is a regression. Not sure how bad this is and whether it can wait for 10.0.2 @felixboehm ... |
|
@phisch or is that only needed for the email template app? |
cf2f8e4 to
74e6e41
Compare
lib/private/Server.php
Outdated
| $this->registerService('ThemeService', function ($c) { | ||
| return new ThemeService($this->getSystemConfig()->getValue('theme')); | ||
| }); | ||
| $this->registerAlias('IThemeService', 'ThemeService'); |
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.
Try 'OCP\Theme\IThemeService'
|
@phisch how much work is missing to have this working ? |
|
@PVince81 ups, i just forgot to switch to review label again. It should be done. |
|
It's still a huge thing, looks a bit risk to merge now. |
|
moving to 10.0.2 |
|
@phisch phinisch this ? |
|
@PVince81 this has been complete the whole time, we just did not want to merge because it was too close to a release. |
|
translation have been tested? php as well as js translations? I don't see any related change in the code which could make it possible - see #28167 (comment) |
|
I tested the JS translations which could be affected by this. And yes they work as expected. This should not affect existing behavior. And to make sure it doesn't i re-tested all the points mentioned in the first comment. |
|
@phisch can you rebase to refresh CI ? @DeepDiver1975 so this can be merged ? |
…eme, refactored theme object so it can also set the web path through constructor, added setters to manipulate the current theme, removed unnecessary slash, added/modified tests
…locks, implemented interfaces
c14cdc0 to
1f25c61
Compare
|
rebased |
|
@DeepDiver1975 no feedback from you, assuming you don't have any comment to add |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
This adds the functionality to get a list of all available themes or search for one through the ThemeService.
Related Issue
Templateditor PR owncloud/templateeditor#52, which fixes #27628, has a hard dependency on this extension
Motivation and Context
The mail template editor needs to know which themes there are, and i don't want too much theme logic it its repository, this way we can keep it clean.
How Has This Been Tested?
Partially tested through unittests. Fully tested by hand.
The usual overwrites: css, js, img, templates, translations, mimetype icons all work for legacy and app themes, for subdir and normal deployments.
Tested the following overwrites:
app theme - regular deployment:
app theme - subdir deployment:
legacy theme - regular deployment:
legacy theme - sub dir deployment:
Types of changes
Checklist: