- Issue created by @mandclu
- @mandclu opened merge request.
- Status changed to Needs review
over 1 year ago 10:00am 19 March 2023 - π¨π¦Canada mandclu
Turns out the space at the bottom was just the background showing where the node display wasn't long enough to cover, so nothing to worry about. I created a merge request that should remove the unneeded spacing at the top.
- First commit to issue fork.
- πΊπΈUnited States brianperry
Having trouble duplicating this on the latest 1.0.x. Is there anything non-default about either of these themes?
- π¨π¦Canada mandclu
I was using the default, vertical toolbar for Gin. I imagine that it would be different if you were using the horizontal toolbar for Gin it might not need this, but not sure.
Theoretically it might be possible to recode this to look for classes that start with the name of the current admin theme, but not sure how many other admin themes would follow this convention.
Certainly wouldn't hurt to leave the issue open for more feedback.
- π¨π¦Canada mandclu
Oh forgot to mention: part of this patch also removes from the render array a "node_preview" section that in my testing was empty but still had padding, and contributed half of the observed blank space at the top. Since it didn't seem to be doing anything useful (and targetting it via CSS wasn't working for me) I decided to remove it entirely.
- π¨π¦Canada mandclu
I realized that the extra padding was actually introduced by the Gin Toolbar module instead of the theme itself. So if you're using the theme without the module, that could account for not seeing the extra spacing.
I've update the MR to target the class exclusion based on the word 'toolbar' instead of looking for the 'gin--' pattern.
- πΊπΈUnited States brianperry
Also noticed that with Gin toolbar disabled the styles on the header of the new window preview are disrupted. Perhaps this could become more of a 'support Gin Toolbar' issue.
- First commit to issue fork.
- @dieterholvoet opened merge request.
- π§πͺBelgium dieterholvoet Brussels
I started a new MR targeting 2.1.x. Since this is now stripping all classes containing the word 'toolbar', including e.g. Admin Toolbar related classes, maybe we should keep this issue focused on that and open any follow-up issues for Gin incompatibilities?
- π¨π¦Canada mandclu
I don't disagree with the approach of using this issue to target Gin compatibility more broadly. On the other hand, is there ever a circumstance where having a toolbar class on the content in the preview window is likely to be useful?
- Status changed to Needs work
over 1 year ago 1:02pm 25 July 2023 - π¨π¦Canada mandclu
With this patch applied, I still see padding at the top of the page in Gin:
The culprit seems to be an empty div for the secondary toolbar, which Gin assigns a height: