[RFC] HTML markup cleaning

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
User avatar
Sumanai
Registered User
Posts: 95
Joined: Sat Aug 31, 2013 11:12 am

[RFC] HTML markup cleaning

Post by Sumanai »

Current marking prosilver redundant contains unnecessary elements inherited from previous versions where their use was justified. For example button "Post Reply". At the moment it is presented with the following code :

Code: Select all

<div class="buttons">
<div class="reply-icon"><a title="Post a reply" href="./posting.php?mode=reply&f=хх8&t=хх"><span></span>Post Reply</a></div>
</div>
I think it's terrible. It is possible to bypass the element "<a>" with the necessary classes, clearance through styles.
This will reduce the volume of that is passed every time to the browser reduce the number of DOM elements that have a positive impact on the speed of the browser.
In this case there will be no loss in appearance in supported browsers .
Ready to take on this job, if the community agrees.

Ticket: https://tracker.phpbb.com/browse/PHPBB3-12571
PR: https://github.com/phpbb/phpbb/pull/2479
Last edited by Sumanai on Tue May 20, 2014 7:02 pm, edited 1 time in total.
Sorry for my English.
User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: HTML markup cleaning

Post by EXreaction »

I think it would definitely be good; but I think we still want to mostly support IE8, so keep that in mind for any changes.

If you start working on this, please do split the changes into multiple pull requests for different types of changes (e.g. one just for posting buttons). That will make it much easier on everyone when it comes time to review and merge them.
User avatar
PayBas
Registered User
Posts: 305
Joined: Tue Jul 29, 2008 6:08 pm
Contact:

Re: HTML markup cleaning

Post by PayBas »

User avatar
Sumanai
Registered User
Posts: 95
Joined: Sat Aug 31, 2013 11:12 am

Re: HTML markup cleaning

Post by Sumanai »

EXreaction wrote:I think it would definitely be good; but I think we still want to mostly support IE8, so keep that in mind for any changes.
Yes, for ie8 nothing will change.
PayBas wrote:Keep an eye on this: https://github.com/phpbb/phpbb/pull/2469
Yes, conflict is inevitable. When will the completion and merge the main branch that I started after that?
Sorry for my English.
User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 943
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: HTML markup cleaning

Post by hanakin »

agree but also keep in mind that their are other items that utilize similar if not the same styling and could or should eventually me simplified to use the same if not slitghly modified class

I already mocked something up along these lines but have not had time to finish/clean it up https://area51.phpbb.com/phpBB/viewtopi ... 08&t=45569
Donations welcome via Paypal Image
User avatar
Sumanai
Registered User
Posts: 95
Joined: Sat Aug 31, 2013 11:12 am

Re: HTML markup cleaning

Post by Sumanai »

hanakin wrote:agree but also keep in mind that their are other items that utilize similar if not the same styling and could or should eventually me simplified to use the same if not slitghly modified class
I understand.
Sorry for my English.
User avatar
Sumanai
Registered User
Posts: 95
Joined: Sat Aug 31, 2013 11:12 am

Re: [RFC] HTML markup cleaning

Post by Sumanai »

EXreaction, send first pull requests. Do I understand correctly that this should be done on every single change?
Sorry for my English.
User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] HTML markup cleaning

Post by EXreaction »

I would try to fix one type of issue at a time; so that PR you sent may be fine, but I do not know the extent of the changes required.

As an example, say we had 100 instances of <div><span></span>message</div>. Removing that span on every single page should be one pull request.
User avatar
PayBas
Registered User
Posts: 305
Joined: Tue Jul 29, 2008 6:08 pm
Contact:

Re: [RFC] HTML markup cleaning

Post by PayBas »

EXreaction wrote:As an example, say we had 100 instances of <div><span></span>message</div>. Removing that span on every single page should be one pull request.
This is assuming that every instance has been converted to a :before or :after CSS method already. Since IE6 & IE7 have been dropped, it would be safe to do this, but I'm not sure everything has already been converted.
User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] HTML markup cleaning

Post by EXreaction »

It would be fine to address that in the same pr if it's related.
Post Reply