-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Public page template response #8051
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8051 +/- ##
============================================
- Coverage 51.88% 51.75% -0.14%
- Complexity 25394 25425 +31
============================================
Files 1603 1605 +2
Lines 95214 95224 +10
Branches 1379 1377 -2
============================================
- Hits 49403 49282 -121
- Misses 45811 45942 +131
|
In general I like this idea 👍 Haven't had a look at the code. |
Awesome idea @juliushaertl! |
Make sure scrolling still works on iOS Safari when having long pages. Last time the structure was changed, performance was unacceptable. |
@oparoz Do you have any reference to the last change there, so I can have a look what should be done? Otherwise testing by any iOS user is appreciated. 😉 The only change from the HTML layout perspective is affecting the menu actions in the top right. Everything else like the rendering of the files_sharing pages should stay untouched. |
d2eb42c
to
687d7a8
Compare
Hm, acceptance tests are still failing. I'll have a look. |
687d7a8
to
63e2c0c
Compare
Is this ready for review or still in Development, @juliushaertl ? |
@pixelipo Ah forgot to mention, ready for review. 😉 |
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.
Fine by me - only have one little comment.
* @param string $id | ||
* @since 14.0.0 | ||
*/ | ||
public function setId(string $id) { |
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.
Are all those setters really needed? Isn't the stuff in the constructor fine?
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.
Hm right, there's no real need for those. Removed them.
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
6d7d0ba
to
36563d4
Compare
Awesome!! 💯 |
Hello, Here is my log using the latests commits from server.git and gallery.git :
|
@juliushaertl and to the gallery it seems ;) |
I'll prepare some follow up pull requests for other apps that use public pages. |
From a first look int seems that gallery is using 'public' as layout, which was not defined before this PR. Chaning the last argument from this line https://github.com/nextcloud/gallery/blob/2005c66ab59a9dcd66d6794834434750eabea792/lib/Controller/PageController.php#L235 to 'base' should work around the issue until I prepared a proper PR to move to the new public layout. |
This PR is a proof of concept to fix #6553
The header bar should be the same across all public pages of apps, therefore I tried to add a simple abstraction layer to that. We should stop app developers messing to much with custom HTML and therefore it is now possible to set the following parameters for the header:
Example usage is shown for files_sharing https://github.com/nextcloud/server/compare/public-template#diff-d6e103c0f5540d507d9c9b6c7ade2151R432
Actions are a simple class containing the icon, label, link and a possible details label, but apps can add their own types by implementing an IMenuAction.
I'm still not sure if that abstraction is to much, but I like having a simple interface to setup those basic things from an app developers perspective.
Maybe we need to move out the HTML from the IMenuAction implementations to some files in the template directories. I decided for now to keep the templating code inside the classes, since otherwise we would have to load a template file for each menu entry. We possibly can improve on that later. Ideally there should be some template engine providing proper caching for templates.Some feedback would be nice @rullzer @MorrisJobke @ChristophWurst @nickvergessen
maybe also from @nextcloud/designers if there are any other default components we should have for public pages.
With one action added:
With multiple actions added: