[Define New Theme] 13. All JS needs to be completely abstracted from the template files.

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.2.x. If you need support for phpBB 3.2.x please visit the 3.2.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
hanakin
Infrastructure Team
Infrastructure Team
Posts: 850
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: [Define New Theme] 13. All JS needs to be completely abstracted from the template files.

Post by hanakin » Fri Jul 04, 2014 9:58 am

Add a related Ticket to this discussion.

Basically when editing the theme currently I have to make sure that the classes are not connected to some sort of JS when making modifications that might break both JS and CSS.

This is extremely confusing and not Ideal so I proposed reference js-hook_name only in the JS and not applying any styles to them so that we can tell on the surface whats what. This should drastically speed up the development workflow for the themes

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [Define New Theme] 13. All JS needs to be completely abstracted from the template files.

Post by callumacrae » Mon Jul 07, 2014 9:04 am

hanakin wrote:Add a related Ticket to this discussion.

Basically when editing the theme currently I have to make sure that the classes are not connected to some sort of JS when making modifications that might break both JS and CSS.

This is extremely confusing and not Ideal so I proposed reference js-hook_name only in the JS and not applying any styles to them so that we can tell on the surface whats what. This should drastically speed up the development workflow for the themes
-1, if you're going to do something like that you should use data attributes.

http://csswizardry.com/2014/03/naming-u ... -in-oocss/
Made by developers, for developers!
My blog

User avatar
hanakin
Infrastructure Team
Infrastructure Team
Posts: 850
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: [Define New Theme] 13. All JS needs to be completely abstracted from the template files.

Post by hanakin » Mon Jul 07, 2014 9:14 am

callumacrae wrote:
hanakin wrote:Add a related Ticket to this discussion.

Basically when editing the theme currently I have to make sure that the classes are not connected to some sort of JS when making modifications that might break both JS and CSS.

This is extremely confusing and not Ideal so I proposed reference js-hook_name only in the JS and not applying any styles to them so that we can tell on the surface whats what. This should drastically speed up the development workflow for the themes
-1, if you're going to do something like that you should use data attributes.

http://csswizardry.com/2014/03/naming-u ... -in-oocss/
either-way is fine as long as we stop double tapping selectors!

also that article is not about hooks but about css class names not having to be semantic to the content but the function of the class

https://github.com/csswizardry/CSS-Guidelines#js-hooks

Post Reply