Repository navigation
Conversation
5b8b084 to
d11100e
Compare
d11100e to
9b6b7c3
Compare
Tabler's header-to-content spacing comes from .page-body's top margin against its .page-header sibling. The create/update pages render no .page-body, so the form card sits glued to the sticky header. BC break: form_error_alert and form move from …content.* to …content.body.*.
9b6b7c3 to
bca6861
Compare
|
CI failures are unrelated: |
|
@vvasiloi Thx for your proposal, on Sylius E-commerce how is it done? |
|
@loic425 In Sylius e-commrece it's not done at all, at least not structurally. The shared Sylius proper fixes the visual bug via CSS in plus the sticky-header script that toggles So the header-to-content gap comes from the header's own The only places Sylius emits …that opens the wrapper itself: So the two fixes are alternatives, not complements. There are two ways forward:
I lean towards the structural change beacuse it also makes more sense semantically. |
|
Thanks for tackling this and for documenting the BC break so carefully! We're closing this one in favor of #413, which fixes the same gap without renaming any hook. The Sylius admin solves it in CSS: its We'd like to keep BootstrapAdminUi as close as possible to the Sylius admin templates and hooks, since we'll probably merge them at some point. |
| Q | A |-----------------|----- | Branch? | main | Bug fix? | yes | New feature? | no | BC breaks? | no | License | MIT On create and update pages, the form card is glued to the page header: the "Cancel" / "Update" buttons touch the card. The header has no bottom padding, and only the index pages render a `.page-body` with a top margin. The Sylius admin solves it in CSS, with the same templates. This PR ports its `_layout.scss` and `sticky-header.js` as is (a follow-up listed in #404): - `.page-header` gets the page vertical padding, `.page-body` no longer adds its own margin: same 24px gap on every page; - the header sticks to the top while scrolling (border and shadow once stuck), so the form buttons stay visible. The header template already had the `data-sticky-header` attribute; - no template or hook change. Measured on the demo, talk edit page: header → card 0px before, 24px after. Invalid form: header → alert 24px, alert → card 16px, as in Sylius. Index pages are unchanged (24px). It keeps BootstrapAdminUi closer to the Sylius admin templates and styles, which should be merged at some point. It is an alternative to #401 and #375, which fix the same gap by changing the markup or the hooks. `public/` assets were rebuilt with `yarn build`. ### Screenshots Talk edit page of the demo application, default theme. #### Valid form <img width="1640" height="433" alt="valid-form" src="https://github.com/user-attachments/assets/63444b42-6050-4d73-aebc-d4bfb032ac34" /> #### Invalid form <img width="1640" height="433" alt="invalid-form" src="https://github.com/user-attachments/assets/de5810fa-b79c-4451-ae83-a896b8850430" /> #### Sticky header, after scrolling <img width="800" height="387" alt="sticky-header" src="https://github.com/user-attachments/assets/4c8c125e-53aa-4a27-855e-a12df9ee5c01" />
Create/update pages render no
.page-body, so the form card sits glued to the sticky page header — the header-to-content spacing in Tabler comes from.page-body's top margin against its.page-headersibling.This adds a
bodyhookable (rendering.page-body) to the create/update content composition;form_error_alertandformmove under it.BC break: hook customizations targeting
sylius_admin.common.{create,update}.content.form*must retarget…content.body.form*— documented in the newUPGRADE.md.