- 🇨🇦Canada man-1982
The patch in #17 functions as expected. It was tested with the following configurations:
Drupal version: 10.1.6
PHP version: 8.1.25
Additionally, the latest development version of the module was used: composer require 'drupal/focal_point:2.x-dev@dev'.Suggest to add this patch into main branch.
Thank you.
- Status changed to Needs review
8 months ago 8:03am 13 March 2024 - 🇳🇿New Zealand siramsay
Switching this back to review, as maybe this is a better solution?
By using a dialog
OpenDialogCommand
instead of a modal window,OpenModalDialogCommand
the dialog opens on top of the Media window.
( https://www.drupal.org/node/1989646 → Ajax commands for opening and closing Dialogs and generic Dialog Controller added to core)We need to name the new dialog with an ID such as "#focal-point-preview" but this doesn't really matter except we need to pass the argument.
$response->addCommand( - new OpenModalDialogCommand($this->t('Images preview'), $output, $options) + new OpenDialogCommand('#focal-point-preview',$this->t('Images preview'), $output, $options) );
I've also added a wrapper to the original image, so the size is known before the image is loaded. This fixes the modal so it does centre strangely on first load.
<div class="focal-point-original-image">{{ original_image }}</div>
.focal-point-original-image { height: 500px; }
- First commit to issue fork.
- last update
7 months ago 158 pass - last update
7 months ago Patch Failed to Apply - 🇺🇸United States dwisnousky
I can verify that what @siramsay suggests works flawlessly
- Status changed to RTBC
7 months ago 3:29pm 10 April 2024 - 🇺🇸United States dasginganinja Bethlehem, PA
I've tested the code by @dwisnousky in the MR as well as the patch in #33.
I can confirm the preview modal shows over the existing modal and does not close it out.
Closing out the preview modal allows the modal behind it to be selected again and doesn't lose the data changes that were present.Tested with
- Field Group @ 3.4
- Gin @ 3.0RC10
- Drupal 10.2.5 - 🇮🇳India rajeshreeputra Pune
Setting the height to 500px results in blank or white space appearing below the image when using smaller image styles in preview, hence removing.
.focal-point-original-image { height: 500px; }
- last update
6 months ago 159 pass - last update
6 months ago 159 pass -
Rajeshreeputra →
committed f81b6974 on 2.x authored by
dwisnousky →
Issue #3162210 by phenaproxima, chandu7929, dwisnousky, matthiasm11,...
-
Rajeshreeputra →
committed f81b6974 on 2.x authored by
dwisnousky →
- Status changed to RTBC
6 months ago 10:10am 10 May 2024 - 🇺🇸United States DamienMcKenna NH, USA
This one was accidentally reopened by the commit bot.
- Status changed to Fixed
6 months ago 1:31pm 22 May 2024 Automatically closed - issue fixed for 2 weeks with no activity.