[RFC|Merged] AJAX

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.
Post Reply
User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] AJAX

Post by callumacrae »

hanakin wrote:
callumacrae wrote:
Oleg wrote:
callumacrae wrote: What do you mean by the giant switch statement?
https://github.com/callumacrae/phpbb3/b ... le/ajax.js would be an example.
That's a horrible piece of code, but there is no way around it without rewriting the buttons / removing support for users with js disabled. I still don't understand what you mean by giant switch statement.
That could totaly be cleaned up, I agree with oleg take another look at this if i ever manage to get my computer back up and running I will attempt to provide some alternatives
It has already been cleaned up: https://github.com/igorw/phpbb3/blob/fe ... le/ajax.js
Made by developers, for developers!
My blog

User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 968
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: [RFC] AJAX

Post by hanakin »

ahh looks much better, one note though please use strict naming convention for all variables/functions, something that is very descriptive as that is a huge issue with the JS we currently have like the "DE" function WTF?

specifically el and tr wtf? I am guessing el is supposed to be element and tr is maybe row? Thr code needs to be istantly understandable by the devs or contributors to the software making us take the time to analyse all the code and piece together what the hell those are or do is not fun for anyone

plus the end result should be a minified anyway so the added few bytes for descriptive names will not really increase the file size in the long run, also not to be nit piccky but check the english for your comments lol
Donations welcome via Paypal Image

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] AJAX

Post by imkingdavid »

hanakin wrote:ahh looks much better, one note though please use strict naming convention for all variables/functions, something that is very descriptive as that is a huge issue with the JS we currently have like the "DE" function WTF?
IIRC, de() is for toggling display, although I didn't know what it was for at first either until I actually looked to see. Probably short for "display element" or something. But I agree that we should not be lazy in naming functions. In the PHP portion we don't have functions like de(), so we shouldn't do so in Javascript either.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 968
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: [RFC] AJAX

Post by hanakin »

Also not sure what alll is using ajax but the editing of a post could be a huge benifit if it were via ajax
Donations welcome via Paypal Image

igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC] AJAX

Post by igorw »

Yes, 'dE' is quite bad. 'el' and 'tr' are pretty obvious in context I think.

Anyway, we should not add any more ajaxified things before the ajax PR is merged. It is more important that we have some infrastructure for adding ajaxification. The stuff provided by the AJAX PR plus hooks will make it really easy for extensions to add that kind of behaviour.

User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 968
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: [RFC] AJAX

Post by hanakin »

igorw wrote:Yes, 'dE' is quite bad. 'el' and 'tr' are pretty obvious in context I think.

Anyway, we should not add any more ajaxified things before the ajax PR is merged. It is more important that we have some infrastructure for adding ajaxification. The stuff provided by the AJAX PR plus hooks will make it really easy for extensions to add that kind of behaviour.
el possibly but tr is still a little obscure and I still say that we should use a strict naming convention for everything the only exception would be for iterators
Donations welcome via Paypal Image

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

Re: [RFC] AJAX

Post by callumacrae »

I would guess that tr = <tr>?

>_<
Made by developers, for developers!
My blog

User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 968
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: [RFC] AJAX

Post by hanakin »

callumacrae wrote:I would guess that tr = <tr>?

>_<
ok then is it storing to a tr, what if that tr changes? then the name has to change lol
Donations welcome via Paypal Image

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

Re: [RFC|Merged] AJAX

Post by _hsr »

Regarding the quickedit feature, how would it best be implemented, a pop up text editor or an inline version?
There is a text here !

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

Re: [RFC|Merged] AJAX

Post by callumacrae »

_hsr wrote:Regarding the quickedit feature, how would it best be implemented, a pop up text editor or an inline version?
I would prefer inline.
Made by developers, for developers!
My blog

Post Reply