User tests: Successful: Unsuccessful:
Pull Request in favour of #10932
This PR adds a preview button to the toolbar, which upon clicking, reveals a modal, showing the user a preview of the article in the frontend.
None
I've put the function to get the URL in a new helper file rather than the view.html.php
. Is this the correct approach?
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Category | ⇒ | Administration Components |
Title |
|
Title |
|
Removing the max-height (400px) on the '.modal-body' appears to resolve the issue.
Only when the preview modal is closed and then opened again is the inline styling added (max-height: initial; overflow-y: initial;) and the preview appears correctly.
@ciar4n it's way easier to just pass some parameters:
$type = 'Modal', $name = '', $text = '', $url = '', $width = 640, $height = 480, $top = 0, $left = 0,
$onClose = '', $title = '', $footer = null
in this line
$bar->appendButton('Popup', $icon, 'Preview', $url . '&task=preview');
Feature is cool.
Maybe instead of modal use link with target="_blank"
or target="joomla-article-preview"
?
it will be more easy, and will work a lot better, especially on a small screens and mobile
Yup, could do a link opening a new tab if it's preferred. I don't care either way so you guys make up your mind and I'll implement whichever.
Personally I like the modal box however I think it should fill the screen. The reduced size in the current modal may trigger some media queries on responsive sites. Filling the screen would ensure an accurate representation of the article on the device it is been worked on.
IMHO you need to change the base branch to 3.7.x as it is a new feature
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-10-23 18:00:55 |
Closed_By | ⇒ | C-Lodder |
Is there a continuation of this on the J 3.7 branch? A preview button would be pretty cool to see in the future of Joomla.
@JoshuaLewis I'm adding it to the J4 template repo
Too short of notice for J3.7? Or perhaps there is a code reason for this?
Staging should be targeted now as 3.7 was merged in staging.
@JoshuaLewis - So that I don't wait on decisions and can just get stuff done :)
Fair enough. Well some would argue if that's fair, but I do trust that increasing the odds of this coming in is a good thing.
Nice!
On larger screens the article iframe appears to extend out beyond the modal box...
Edit: Not a screen size issue. Issue noted on windows in both Chrome and FF.