? Success
Related to # 2657

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
16 Jul 2015

Move the Pull Request by @nternetinspired here: #2657 to the staging branche.

@committer kudos goes to @nternetinspired


Overview

Following the Google Group discussion regarding jCaption https://groups.google.com/forum/#!topic/joomla-dev-general/vW--mTtuaaw this PR implements semantic figure and captioning elements.

Joomla ships with the html5 doctype, so it is my opinion that we should be using the correct elements wherever possible. Article images and their captions are what and are made for.

This change not only improves the document semantics, and therefore accessibility, it also removes the need for caption.js, which calls the entire Mootools stack whenever it is loaded.

Changes

This PR makes several changes, namely:

  1. Disabling calls to jCaption and marking as deprecated.
  2. Updating markup surrounding article intro and article full text images to implement html5s figure and figcaption elements.
  3. Updates the featured layout to use the JLayout intro image helper, as the category blog layout already does.

Testing

  1. Insert article images (intro and full-text) using the 'images and links' fields.
  2. Insert image captions using the 'images and links' Caption field, one for intro image, one for full-text.
  3. Set the article to 'featured' status.
  4. Check that the image caption appears in article, category blog and featured blog view.
  5. Check that the 'Image float' option is honored in these views.
  6. Check that caption.js is no longer loaded in these views.

@nternetinspired can your review and let us know if it still works as indent?

@Bakual @betweenbrain @designbengel can you test / review here again?

Additional to the code by @nternetinspired I have add the @deprecated tag to the behavior.php

avatar zero-24 zero-24 - open - 16 Jul 2015
avatar zero-24 zero-24 - change - 16 Jul 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Jul 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 16 Jul 2015
Easy No Yes
avatar zero-24 zero-24 - change - 16 Jul 2015
Category Front End JavaScript Libraries
avatar zero-24 zero-24 - change - 16 Jul 2015
Rel_Number 0 2657
Relation Type Related to
avatar Bakual
Bakual - comment - 16 Jul 2015

:+1:
Haven't tested yet this iteration (tested the orignal one). Still like it.

avatar nternetinspired
nternetinspired - comment - 17 Jul 2015

Thanks for re-animating this one @zero-24 :bow:

Tested, but an issue found. I'll make line notes…

avatar nternetinspired
nternetinspired - comment - 17 Jul 2015

Apart from the noted issue, everything checks out fine :)

avatar nternetinspired
nternetinspired - comment - 17 Jul 2015

Looking good!
Tests: :white_check_mark:

:shipit:

avatar nternetinspired
nternetinspired - comment - 17 Jul 2015

Thanks again for bringing this back to life @zero-24, I'd kinda forgotten about it since my overrides had me covered already and I experienced so much resistance previously! :)

avatar infograf768
infograf768 - comment - 17 Jul 2015

Displaying single article

( ! ) Notice: Undefined variable: imgfloat in /Applications/MAMP/htdocs/trunkgitnew/components/com_content/views/article/tmpl/default.php on line 97 Call Stack #TimeMemoryFunctionLocation 10.0009237536{main}( )../index.php:0 20.07303219512JApplicationCms->execute( )../index.php:45 30.07303219680JApplicationSite->doExecute( )../cms.php:252 40.36537625224JApplicationSite->dispatch( )../site.php:230 50.37957694560JComponentHelper::renderComponent( )../site.php:191 60.38297726360JComponentHelper::executeComponent( )../helper.php:372 70.38307747792require_once( '/Applications/MAMP/htdocs/trunkgitnew/components/com_content/content.php' )../helper.php:392 80.39148083544JControllerLegacy->execute( )../content.php:16 90.39148083768ContentController->display( )../legacy.php:728 100.39178086752JControllerLegacy->display( )../controller.php:104 110.40498654768ContentViewArticle->display( )../legacy.php:690 120.528510486264JViewLegacy->display( )../view.html.php:184 130.528510486304JViewLegacy->loadTemplate( )../legacy.php:209 140.530110582528include( '/Applications/MAMP/htdocs/trunkgitnew/components/com_content/views/article/tmpl/default.php' )../legacy.php:670 item-image">
avatar zero-24
zero-24 - comment - 17 Jul 2015

Thanks @infograf768 fixed with: zero-24@f7b36bc It was a copy and paste issue :smile:

avatar tessamero
tessamero - comment - 19 Jul 2015

@test Unsuccessful. code being displayed on frontend view. New PR being submitted.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7450.

avatar tessamero tessamero - test_item - 19 Jul 2015 - Tested unsuccessfully
avatar zero-24
zero-24 - comment - 3 Aug 2015

@tessamero I don't understand you comment can you give us some more info what failed?

avatar zero-24
zero-24 - comment - 17 Oct 2015

Tessa do you have any new infos?

avatar a-fusion
a-fusion - comment - 24 Oct 2015

Successfully tested:
Caption appears in article, category blog and featured blog view.
Float right & left is working.
No caption.js is show in sourcecode.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7450.

avatar a-fusion
a-fusion - comment - 24 Oct 2015

figcaption elements are showing in sourcecode.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7450.

avatar a-fusion
a-fusion - comment - 24 Oct 2015

But: In Blog View the caption text is no more linked to the articel. Is this intended?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7450.

avatar nternetinspired
nternetinspired - comment - 25 Oct 2015

But: In Blog View the caption text is no more linked to the articel. Is this intended?

Good spot @a-fusion no I don't think that is intentional, thanks for testing.

The current layout has linked images, but these were added after my original PR, so linked image should also be included here to maintain that fucntionality. Would you drop in the image linking from https://github.com/joomla/joomla-cms/blob/staging/layouts/joomla/content/intro_image.php please @zero-24 ?

avatar nternetinspired
nternetinspired - comment - 25 Oct 2015

:dart: Thanks @zero-24

avatar joomla-cms-bot
joomla-cms-bot - comment - 25 Oct 2015

This PR has received new commits.

CC: @tessamero


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7450.

avatar zero-24
zero-24 - comment - 25 Oct 2015

@a-fusion @nternetinspired with the last commit i have finaly add the image linking back to the layout (as well syncing to staging ;)) Can you retest?

avatar zero-24 zero-24 - change - 4 Dec 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-12-04 22:38:36
Closed_By zero-24
avatar zero-24 zero-24 - close - 4 Dec 2015

Add a Comment

Login with GitHub to post a comment