Hi Marc,
It was a great gsoc session with PMA last time. I could not contribute it for last few months(after gsoc) because I had my final year exam at university. I'm willing to continue my contribution to phpMyadmin as a non gsoccer. Are there any remaining ideas to continue with ajaxification of the PMA. If so I like to open a discussion on them and continue with them. Thank you.
Regards, Thilanka.
Le 2011-12-17 01:00, Thilanka Kaushalya a écrit :
Hi Thilanka, some items are listed on [0], please pick one and discuss it on this list.
[0] http://wiki.phpmyadmin.net/pma/AJAXify_Interface
On 17/12/11 13:53, Marc Delisle wrote:
Hi Thilanka,
off the top of my head I can think of an issue that can be solved with some ajaxification. On tbl_structure page, if you use the "Add * index" actions that are available in the "More" dropdown corresponding to a column in the top table. You will be dropped to sql.php, which will show the table structure page, but it will not include "tbl_structure.js", so all the ajax actions on this page will be broken. Of course, if the "Add * index" links would be ajaxified, this would no longer be a problem, because we would not leave the tbl_structure page.
Please do not take the following badly, but rather as constructive criticism and as a way to learn from your mistakes. I find that some of the ajaxification work that you did this summer was less then optimal. As an example, let's look at some issues with the work that you did on the index editor.
First of all, you create a custom slider to hide the indexes table. This was unnecessary, because we already have a PHP function that takes care of this, which also respects the $cfg['InitialSlidersState'] configuration setting.
Another issue was that in every ajax reply the top menu was included and then removed from the reply via jQuery. This, of course, causes transfer of waste data and it's better not to send it in PHP altogether.
Then there was an issue when a user requested to add a column to the index editor: the browser fired an HTTP request of the form to the server, just to get the same form back with an extra empty field. Of course, this action can be done on the client side by just cloning a row from the table.
So, I fixed all of the above and I also cleaned up the layout of the editor in order to use less horizontal space and appear more user-firendly. I invite you to look at these changes so that you can learn from them. It's commit 863819cbdd759 and the following 10 commits after that.
By the way, if you need a mentor or just some guidance, please feel free to contact me at any time. I would be glad to help you with any issues you may have and/or review your code.
Bye, Rouslan
Hi Marc and Rouslan,
Thanks for the quick reply you gave.
@Marc - I'll refer the feature list and start working with them @Rouslan - I'll go through those commits to learn them. Thank you.
Regards, Thilanka.
On Sat, Dec 17, 2011 at 8:05 PM, Rouslan Placella rouslan@placella.comwrote:
Hi Marc,
The Ajaxification wiki page contains only old ideas and most of them are done. There are only two ideas at the todo state. I think it will be better if we can update the page. It will be helpful for future gsoc students also.
If it okay I can suggest some new features to be ajaxify and we can discuss on them and add it to the page.
Regards, Thilanka.
Le 2012-02-26 09:38, Thilanka Kaushalya a écrit :
Hi Thilanka, you are welcome to update this page, but there won't be further Ajaxfication done this summer.
Hi Marc,
you are welcome to update this page, but there won't be further
Ajaxfication done this summer.
Okay I'll update it.
Regards, Thillanka.
Hi Rouslan,
I went through the first part of your comment. Currently when I followed the following steps as you mentioned, it do not raise such a problem.
1. Go to table -> structure tab. 2. Go to column -> More -> Add Index. 3. Then it redirect to the structure tab again. 4. Click on coumn - > Change option. 5. It pops up the jquery dialog for change.
So at that the js functionality has not break as well as when I check it with inspect element option in the browser it shows as tbl_structure.js is available.
Can you please clarify more on this issue so I can work on that. Thanks.
Regards, Thilanka.
Hi Rouslan,
The email that you are replying to is about 3 month old by now and the
issue has meanwhile been fixed (by Marc, I think) by adding tbl_structure.js to sql.php :)
Sorry for the delay. I was unable to focus on that.
I dropped a mail saying that I'll update the Ajaxify page [0] with new ideas. But I cannot find any important features which should ajaxify immediately. That's why I moved to your idea of optimizing ajaxify implementations which were completed last summer. I'll go through your ideas and continue with them.
Thanks for the help you gave and expecting more in future. :)
Regards, Thilanka.
[0] - http://wiki.phpmyadmin.net/pma/AJAXify_Interface
Regards, Thilanka.
Hi Rouslan,
Hi Thilanka,
Sorry for the delayed reply I'm sending. I went through your above mentioned commits and observed how was it implemented. Now I realize that some of the previous work I did have optimization problems. I'll go through the list of functionality I have implemented and come up with a optimized solution for them. Thanks for the guidance you gave.
Regards, Thilanka.
Hi Rouslan,
My first task of the gsoc session was ajaxifying the "Create Table" option. So I went through the functionality and refactored the code. I have submitted the patch with the id 3507868 [0].
With this option I see some issues.
1. Cancel button is configured with the "$(this).dialog('close').remove();" option and I think "remove()" is necessary because if not it will duplicate the dialog options. You can check it by using the create table option more than once without reloading the page. At that case second time the "Cancel" button will not display if you keep only the "$(this).dialog('close')" part. 2. The style of the Save button and Cancel button seems different. It is effecting to the consistency of the UI.
Can yo check with this patch can comment on the changes. Thank you.
Regards, Thilanka.
[0] - https://sourceforge.net/tracker/?func=detail&aid=3507868&group_id=23...
On Sun, Mar 18, 2012 at 5:06 PM, Rouslan Placella rouslan@placella.comwrote:
On 18/03/12 15:14, Thilanka Kaushalya wrote:
Hi Rouslan,
Hi Thilanka,
We have internally agreed that we will use bottom-posting [0] on this mailing list, please follow this.
I personally wouldn't call that refactoring, but yeah, the clean-up looks pretty OK. Just one thing: when you are calling PMA_ajaxShowMessage() to display an error, you need to pass a second parameter with a false value. For example:
PMA_ajaxShowMessage(data.error, false);
More info at [1].
I never said that you should not remove the dialog, you're just doing it wrong. The correct way to do this is by defining a callback that gets fired when the dialog is closed (this may happen in more than one way) and remove the dialog there. See example below.
That because the buttons are not where they belong. They should go into the bottom pane of the dialog. For example:
// Define some buttons that will go into the bottom pane // of the dialog and bind some callbacks to them var buttonOptions = {}; buttonOptions[PMA_messages['strGo']] = function () { // do something useful here }; buttonOptions[PMA_messages['strClose']] = function () { $(this).dialog("close"); }; // Create the dialog $someDiv.dialog({ buttons: buttonOptions, close: function () { // This is a callback that gets fired when the user // or the system try to close the dialog $(this).remove(); } });
Bye, Rouslan
[0]: http://en.wikipedia.org/wiki/Posting_style#Bottom-posting [1]: https://github.com/phpmyadmin/phpmyadmin/blob/QA_3_5/js/functions.js#L1250
Hi Rouslan,
I personally wouldn't call that refactoring, but yeah, the clean-up
okay.
Thanks for the clarification. Now I got the point and will update the patch.
Regards, Thilanka.