? ? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
30 Apr 2021

Summary of Changes

Removes a space in the default HTML output for the cassiopeia template

Testing Instructions

Visit Joomla 4 home page after a default install with no sample data

View source

Actual result BEFORE applying this Pull Request

NOTE THE SPACE at the end of the classes "header container-header full-width"

Screenshot 2021-04-30 at 23 27 35

Also removes space here (before has-side-bar-right):

<body class="site-grid site com_content wrapper-static view-featured no-layout no-task itemid-101  has-sidebar-right">

Expected result AFTER applying this Pull Request

Screenshot 2021-04-30 at 23 30 46

<body class="site-grid site com_content wrapper-static view-featured no-layout no-task itemid-101 has-sidebar-right">

Documentation Changes Required

avatar PhilETaylor PhilETaylor - open - 30 Apr 2021
avatar PhilETaylor PhilETaylor - change - 30 Apr 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 Apr 2021
Category Front End Templates (site)
avatar PhilETaylor PhilETaylor - change - 30 Apr 2021
Labels Added: ?
avatar PhilETaylor PhilETaylor - change - 30 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 30 Apr 2021
avatar PhilETaylor PhilETaylor - change - 30 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 30 Apr 2021
avatar brianteeman
brianteeman - comment - 30 Apr 2021

Sorry this is not correct as it results in $pageclass.$hasclass

avatar brianteeman brianteeman - test_item - 30 Apr 2021 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 30 Apr 2021

I have tested this item ? unsuccessfully on 30e1e16


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

avatar PhilETaylor
PhilETaylor - comment - 30 Apr 2021

ok try again now - improved it.

avatar brianteeman
brianteeman - comment - 30 Apr 2021

honestly as long as there is a space between classes who cares if its one or two

avatar PhilETaylor
PhilETaylor - comment - 30 Apr 2021

I care enough to fix it. It makes the output look amateurish. We can do better.

avatar brianteeman
brianteeman - comment - 30 Apr 2021

better to be maintainable and understandable

avatar PhilETaylor
PhilETaylor - comment - 30 Apr 2021

And on that note Im going to bed. There is nothing non-maintainable or non-understandable about this PR or trying to do better...

avatar PhilETaylor
PhilETaylor - comment - 30 Apr 2021

For example - this sucks as output!

</div>
	<div class="controls">
		<input
	type="email"
	inputmode="email"
	name="jform[email]"
	 class="form-control validate-email required"	id="jform_email"
	value=""
	 size="30"     autocomplete="email"    required  >			</div>
</div>
avatar Quy
Quy - comment - 1 May 2021

Here is one way and then implode.

avatar PhilETaylor
PhilETaylor - comment - 1 May 2021

Imploding on $attributes actually GIVES double empty spaces :) unless you first filter out the blank array entries.

avatar PhilETaylor
PhilETaylor - comment - 1 May 2021

@richard67 added the Updates Requested label 6 hours ago

This PR is ready for testing, no further updates are needed, it produces maintainable and understandable output.

The commentary was on other improvements around output that can be made to the email fields (Which is on my todo list)

avatar richard67
richard67 - comment - 1 May 2021

@PhilETaylor I don't think that this is right: $hasClass .= 'has-sidebar-left';. I think the space which was there before was right.

avatar PhilETaylor
PhilETaylor - comment - 1 May 2021

Dont think - test :) you will see the final output code it correct. Line 117 correctly outputs the space that was removed from 84/89

avatar richard67
richard67 - comment - 1 May 2021

Dont think - test :) you will see the final output code it correct. Line 117 correctly outputs the space that was removed from 84/89

No need to test if reading the code shows it's wrong. If in line 84 the variable has a value, let's say 'gaga', you append 'has-sidebar-left' to it when there is a module on the left sidebar, which results in 'gagahas-sidebar-left', and that's wrong.

And if there was no value in line 84 so it ends in 'has-sidebar-left', you append later in line 'has-sidebar-right' to it when there is a module on the right sidebar, and the ends in 'has-sidebar-lefthas-sidebar-right'. How shall line 117 clean that up? I don't see how it can do that.

avatar PhilETaylor
PhilETaylor - comment - 1 May 2021

r_1475504_PEFNR

avatar PhilETaylor PhilETaylor - change - 1 May 2021
Labels Added: ?
avatar PhilETaylor
PhilETaylor - comment - 1 May 2021

added back one space - its so ugly having strings that start with a space like " this" - just makes code so ugly

avatar brianteeman
brianteeman - comment - 1 May 2021

just makes code so ugly

or makes it work

avatar PhilETaylor
PhilETaylor - comment - 1 May 2021

Thanks for your helpful insight once again - I wish I can be like you when I grow up.

avatar richard67
richard67 - comment - 1 May 2021

Thanks @PhilETaylor .

avatar PhilETaylor PhilETaylor - change - 2 May 2021
Labels Removed: ?
avatar Quy Quy - test_item - 2 May 2021 - Tested successfully
avatar Quy
Quy - comment - 2 May 2021

I have tested this item successfully on acc7384


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

avatar ChristineWk ChristineWk - test_item - 2 May 2021 - Tested successfully
avatar ChristineWk
ChristineWk - comment - 2 May 2021

I have tested this item successfully on acc7384


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

avatar richard67 richard67 - change - 2 May 2021
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 2 May 2021

RTC


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

avatar richard67
richard67 - comment - 2 May 2021

Drone failure is not related to this PR, see issue #33477 .

avatar richard67 richard67 - change - 2 May 2021
Labels Added: ?
avatar richard67 richard67 - alter_testresult - 2 May 2021 - Quy: Tested successfully
avatar richard67 richard67 - alter_testresult - 2 May 2021 - ChristineWk: Tested successfully
avatar richard67
richard67 - comment - 2 May 2021

I've updated the branch to latest 4.0-dev to get rid of the unrelated javascript-cs error in drone and restored the previous test results in the issue tracker.

avatar chmst chmst - close - 2 May 2021
avatar chmst chmst - merge - 2 May 2021
avatar chmst chmst - change - 2 May 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-05-02 19:48:50
Closed_By chmst
Labels Added: ?
Removed: ?
avatar chmst
chmst - comment - 2 May 2021

Thanks!

Add a Comment

Login with GitHub to post a comment