[RFC|Merged] Javascript Coding Style

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
User avatar
naderman
Product Manager
Product Manager
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC] Javascript Coding Style

Post by naderman » Sun Apr 29, 2012 12:48 pm

Anyone going to make a pull request for the coding guidelines to add a section about javascript with what is proposed here?

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

Re: [RFC] Javascript Coding Style

Post by callumacrae » Sun Apr 29, 2012 5:59 pm

naderman wrote:Anyone going to make a pull request for the coding guidelines to add a section about javascript with what is proposed here?
Doing it now.
Made by developers, for developers!
My blog

_hsr
Registered User
Posts: 42
Joined: Mon Mar 26, 2012 7:06 am

Re: [RFC] Javascript Coding Style

Post by _hsr » Fri May 04, 2012 11:43 am

@callum, I'd like to work on writing the guidelines too, enlighten me with the source :p
There is a text here !

User avatar
Fyorl
Google Summer of Code Student
Posts: 27
Joined: Mon Apr 02, 2012 4:51 am
Location: UK
Contact:

[RFC] Coding guidelines - JavaScript braces

Post by Fyorl » Sun Jun 17, 2012 10:30 pm

I'd like to revisit the discussion on curly braces in Javascript since it didn't seem to get resolved in the previous pages. It was already established that braces on their own line looked ugly for anonymous functions and also caused bugs/errors when attempting to return an object. In this case, it feels inconsistent to have one style of curly braces for objects and lambdas but another for named functions and block statements. Would it not be simpler to just say that, in Javascript files, the opening curly brace should be on the same line?

User avatar
naderman
Product Manager
Product Manager
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC|Accepted] Coding Guideline Modifications

Post by naderman » Sun Jun 17, 2012 11:01 pm

I think we really should stop adding more things to this RFC and just start new ones whenever new things come up. Does someone feel like splitting up recent posts into separate discussions?

User avatar
brunoais
Registered User
Posts: 958
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC|Accepted] Coding Guideline Modifications

Post by brunoais » Mon Jun 18, 2012 6:50 am

naderman wrote:Does someone feel like splitting up recent posts into separate discussions?
I do.

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

Re: [RFC|Accepted] Coding Guideline Modifications

Post by callumacrae » Mon Jun 18, 2012 7:15 am

Fyorl wrote:I'd like to revisit the discussion on curly braces in Javascript since it didn't seem to get resolved in the previous pages. It was already established that braces on their own line looked ugly for anonymous functions and also caused bugs/errors when attempting to return an object. In this case, it feels inconsistent to have one style of curly braces for objects and lambdas but another for named functions and block statements. Would it not be simpler to just say that, in Javascript files, the opening curly brace should be on the same line?
That's what was decided, and I have an open pull request for it here: https://github.com/phpbb/phpbb3/pull/779
naderman wrote:I think we really should stop adding more things to this RFC and just start new ones whenever new things come up. Does someone feel like splitting up recent posts into separate discussions?
Done (ish).
Made by developers, for developers!
My blog

User avatar
naderman
Product Manager
Product Manager
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC|Merged] Javascript Coding Style

Post by naderman » Mon Jun 18, 2012 10:19 am

The PR has been merged.

Post Reply