silverstripe / silverstripe-userforms

UserForms module provides a visual form builder for the Silverstripe CMS. No coding required to build forms such as contact pages.
BSD 3-Clause "New" or "Revised" License
135 stars 225 forks source link

Make sticky button not limited to Pages section #1294

Closed satrun77 closed 4 months ago

satrun77 commented 4 months ago

Description

The issue is within the elemental block. The CSS and JS for the sticky button expect the form fields to be displayed within the page's site tree view only. The top part of the fields is overlayed with the buttons bar and in mobile the buttons are visible and if you add many fields there is a big gap at the bottom of the page.

Screenshot 2024-05-24 at 11 05 46 PM

Manual testing steps

Issues

Pull request checklist

satrun77 commented 4 months ago

FYI. Assets build failing with this error. Looking into fixing it, any tip would be appreciated :)

Screenshot 2024-05-27 at 9 35 47 AM
michalkleiner commented 4 months ago

I think that you basically need to have a kitchen sink setup with the admin module that provides these dependencies. It's always a black magic to me how to get the front-end assets compiled. @GuySartorelli will surely know better :)

GuySartorelli commented 4 months ago

There is documentation about that - in particular the yellow callout block on that page should help.

satrun77 commented 4 months ago

I have sorted out the assets build, I removed the yarn lint from the the build command

satrun77 commented 4 months ago

Thanks @GuySartorelli That yellow box is what I needed to make it work without removing yarn lint

satrun77 commented 4 months ago

Looks generally okay, except there's a weird 'hiccup' whenever I add a new field: Screencast from 28-05-24 12:12:43.webm Note how the fields start in the overlapped style, but then push down to where they should be.

Weirdly enough, this (or something like it) used to happen with userforms that aren't in an elemental form, but this PR fixes that.

If you can find a way to resolve that for both scenarios that would be awesome - if not just say so and I'll let it go as is, since this is overall an improvement. Looks like this only happens in firefox, and it's only a very temporary blip, so if you can't figure out a clean solution for it quickly I'd say it's probably okay to leave in.

I will have a look at it and let you know tomorrow. 👌

satrun77 commented 4 months ago

@GuySartorelli Replaced the stick button with CSS implementation for better performance. I have tested that briefly, and it looks good.

GuySartorelli commented 4 months ago

Looks like CI is getting a different css file output than what you've committed - can you please try running yarn build again?

satrun77 commented 4 months ago

yarn build

Fixed that