Pending

User tests: Successful: Unsuccessful:

avatar CristinaSolana
CristinaSolana
29 Dec 2012

Protostar classes layout and task output incomplete if not layout or task. If no layout or task assigned, outputs: layout- and task- respectively. Also outputs itemid- on views that are not a menu item.

Added if/else to output 'layout-' or if not available 'no-layout'. Same for 'task-'. For itemid, if not a menu item, itemid- should not show up.

<body class="site <?php echo $option . " view-" . $view . ($layout ? " layout-" . $layout : " no-layout") . ($task ? " task-" . $task : " no-task") . ($itemid ? " itemid-" . $itemid : ""); ?> <?php if ($this->params->get('fluidContainer')) { echo "fluid"; } ?>">

Tracker item created at: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=29858

avatar CristinaSolana CristinaSolana - open - 29 Dec 2012
avatar CristinaSolana
CristinaSolana - comment - 29 Dec 2012

Hi Nikolai,

I agree the style and readability there could be improved. I would do this in a separate pull request for two reasons:

  1. It is unrelated to the issue I was fixing with incomplete class names.

  2. There are others, for example, on lines 139 and 183. A PR that changes all of these so that readability is improved, but also consistency is maintained throughout the file.

I will gladly do that tomorrow and put in another PR. Will also look around and see if it is present in any other files within the template. :)

avatar elkuku
elkuku - comment - 29 Dec 2012

Hi Cristina,
that's perfectly fine with me.

Of course one should try to separate the issues - not mixing code style changes with bug fixes..
But since this is what the current maintainers are practicing, we should take the chance whenever someone is willing to commit something..

Hopefully we will have a "coding style fun and pizza event" or something in the near future since we have such nice coding styles and automated checkers that are able to tell us that there are currently over 50.000 violations.

Cheers ;)

avatar CristinaSolana
CristinaSolana - comment - 29 Dec 2012

Thanks Nikolai,

You're right, I added a second commit that brought a bit of consistency across the board.

  1. Added params variable to index file.
  2. Made fluid class statement consistent throughout
  3. Fixed the issue with invalid class name output for itemid, layout and task

Made new tracker item: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=29875

avatar elkuku
elkuku - comment - 29 Dec 2012

That looks pretty cool :)

avatar phproberto
phproberto - comment - 3 Jan 2013

The patch works fine but contains some trailing spaces:

error-trailing

I have the patch test ready. Ping me when fixed and I'll post the test and mark the issue as ready to commit :)

avatar mbabker mbabker - close - 4 Jan 2013
avatar mbabker
mbabker - comment - 4 Jan 2013

Merged at b0ec110

Add a Comment

Login with GitHub to post a comment