Problem/Motivation

When using the modal display with a view of elements, for example, we currently have the main submit button buried down at the very bottom of the modal contents.

UX would be improved if that button was always visible

Other similar forms in core have a bottom bar always visible, maybe we could copy some of that styling:

(Note: Settings this to 8.x-2.x, but could/should be also backported to 8.x-1.x as well, IMHO)

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

marcoscano created an issue. See original summary.

samuel.mortenson’s picture

I wonder if instead of doing this in CSS (like File Browser, floating the actions at the bottom of the iframe), we could make a custom jQuery UI dialog button that will trigger a click inside the iframe. I feel like that's the best UX.

sokru’s picture

Status: Active » Needs review
StatusFileSize
new1.06 KB

Copied the styles from file_browser module. This might not be working with all themes, so would need manual testing and change records if people have themselves fixed this issue on theme.

sokru’s picture

Earlier patch didn't contain margin for view content and left pagination behind the form-submit wrapper. The margin value is tested with Seven theme.
I agree that correct solution would be to use jQuery UI dialog buttons, but that would require much more time to spend on the patch.

Status: Needs review » Needs work
Pooja Ganjage’s picture

StatusFileSize
new1.12 KB

Hi,

I am creating a patch for issue occurs in #4 comment.

Please review the patch.

Thanks.

Pooja Ganjage’s picture

Status: Needs work » Needs review
driskell’s picture

I'm testing this out at the moment but looking at the code I wonder if this is working around a larger issue.

The Drupal dialogs normally automatically collect submit buttons into the jQuery UI - if that could be made to work it would actually then work for all admin themes as I would expect them to have all styled up that container. Issue appears to be the dialog contains an iframe. So instead of opening a dialog with a form - it is opening a dialog with the existing iframe that would have been used for iFrame display. This creates a double request where the open dialog request just returns an iframe that then needs to load.

Potentially returning the form rather than the iframe might even make things faster in the modal - but I guess I would then worry that might break some dependents if they rely on loading in an iframe. Maybe this is the best intermediate for now - but I guess code wise - a new Modal (native) display that can be chosen that actually returns the form rather than an iframe would ensure the modal implementation is fully in line with what Drupal expects (as well as faster modal displays - it would open populated rather than ending up with a second serial loader)

anybody’s picture

anybody’s picture

anybody’s picture

anybody’s picture

Status: Needs review » Needs work

I agree with #8 but also thing we should try that as follow-up.

Tests need to be fixed with the new container, as it seems.

anybody’s picture

This generally works nice, but besides the failing tests, now contents of the view are hidden, e.g. the pager. They are overlayed by the actions area and can't be reached.

thomas.frobieter made their first commit to this issue’s fork.

anybody changed the visibility of the branch 2946829-make-submit-button-always-visible to hidden.

thomas.frobieter’s picture

Status: Needs work » Needs review

Okay, the form actions are docked on the regular entity browser forms. Not the multistep forms, as this require additional work.

Thoughts on the multistep forms:

  • The selected item list shouldn't be docked because the docked section can become very tall. If it should be docked, it needs to be collapsible (collapsed by default) maybe with a counter of the selected items, so that the user can see that the selection has succeeded. Alternative ideas: Display the selected items either above the item list or as a collapsible sidebar (in this case, the modal would need to be wider)
  • The 'Use selected' and 'Hide selected' buttons should be located in the same form actions wrapper as the 'Select entities' button, so that we have one single docked bar.
anybody’s picture

Thank you @thomas.frobieter simple and effective and clear UX improvement!

RTBC+1 but I'll wait for other feedback as I also had my hands in...