no refresh ucp and mcp tabs

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.2/Rhea followed by 3.3.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.1. If you need support for phpBB 3.1 please visit the 3.1.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
Meis2M
Registered User
Posts: 411
Joined: Fri Apr 23, 2010 10:18 am
Contact:

no refresh ucp and mcp tabs

Post by Meis2M » Wed May 28, 2014 7:12 am

Hello
what is your idea about no refresh ucp and mcp tabs?
use jquery like tabs ( option , attachment , poll creation ) in posting area.

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

Re: no refresh ucp and mcp tabs

Post by brunoais » Wed May 28, 2014 11:45 am

I like the idea and it is, actually, something I've been thinking for quite a while. I'm just not sure about how to execute it.
For starters, just swapping "tabs" without any animation or something like that should suffice.

For me, I'd start right away making something useful for tabs system for MCP and UCP so that switching does not require a full page reload.

I think that we shouldn't read all tabs in a single page load. I think, when loading, getting 1 tab with some useful templates (to generate the other tabs) should be the best choice. Then the communication between it and the forum resumes to simple JSON objects with the relevant content.
Anyway, if they let me do it, I'd have to take a nice look at it before I even start.

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

Re: no refresh ucp and mcp tabs

Post by hanakin » Wed May 28, 2014 3:05 pm

not sure about the new template system but when I brought this up last year it was pointed out that due to the way the template system works in relation to modifications at that time it was not fully possible. But its a discussion that needs to be addressed and its one of the ones on my list coming up for a new theme. Especially since we have extensions now.

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

Re: no refresh ucp and mcp tabs

Post by brunoais » Wed May 28, 2014 4:24 pm

Maybe. It can be a PITA, though. I'll see what I can find. Thanks for the headsup.

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: no refresh ucp and mcp tabs

Post by nickvergessen » Thu May 29, 2014 7:35 pm

This means we need to generate quite a lot of pages instead of just one for each request, although most of them are not used.
Posting is different, as they all are part of the same form
Member of the Development-TeamNo Support via PM

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

Re: no refresh ucp and mcp tabs

Post by brunoais » Fri May 30, 2014 9:54 am

@nickvergessen
My idea was to use AJAX wisely.
When the page loads, 1 page is loaded from the server.
For starters, The idea is as follows:
As the user clicks on the top tabs or the left tabs, the relevant content is received from the server in order to display the content for the user.

That content is cached in the DOM itself by placing and removing DOM nodes using javascript.
My main idea would be to store the nodes in a javascript object. To which I switch to to change tabs. Animations are not possible with that but I'll make it such that adapting so that animations can be made should be an easy adaptation.
I think I'll need to change some of phpBB's inside in order to jump over processing that relates to the header, footer, etc... and only get the tabs content but it feels like it should be a fun challenge.
Oh! This also means that, inside each tab, even if you cahnge tabs, the context is maintained (I think that's a plus).

I may, later, make preloading of pages based on the user navigation and how we thing the user will probably navigate but that's for a later version is that requires a nice time thinking (waiting time vs resources expended with it).

BTW, for now, I won't be doing AJAX submit. If I do it, it is for a later version.

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

Re: no refresh ucp and mcp tabs

Post by hanakin » Fri May 30, 2014 10:14 am

Sounds good to me by the way so I do not have remake this topic it's what I wanted to cover here https://area51.phpbb.com/phpBB/viewtopi ... 81&t=45539

Topic #11 Proper use of ajax calls to render specific content.
Last edited by hanakin on Tue Jun 03, 2014 7:19 am, edited 1 time in total.

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: no refresh ucp and mcp tabs

Post by nickvergessen » Fri May 30, 2014 10:16 am

Sounds like you can run into race conditions when you have multiple tabs with the settings page.
So I guess this is not going to happen
Member of the Development-TeamNo Support via PM

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

Re: no refresh ucp and mcp tabs

Post by brunoais » Fri May 30, 2014 10:52 am

What kind of race condition?
Is the race condition In the server?
Where is the race condition?

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: no refresh ucp and mcp tabs

Post by nickvergessen » Fri May 30, 2014 11:59 am

Open a page in tab A and tab B.
In tab A you change the setting, you close it.
Tab B still shows the the data from before tab A's action.
Member of the Development-TeamNo Support via PM

Post Reply