GSoC 2015 : Weekly Report #5 : RFE #1594 & RFE#1060

Week #5

Task(s) completed:
RFE #1594 : More plain English config words

Tasks worked upon:

RFE #1060 : Designer settings like ‘Angular/ Direct Links’, ‘Snap to Grid’ etc. should be remembered

Scheduled Deadline: 28th  June, 2015

Completed on: 12th June, 2015

Details:

1. We have config options for Default Tabs that the navigation links and icons link to. For example, we have $cfg[‘DefaultTabTable’] that decides to what tab of the Table view like ‘Structure’, ‘Browse’, ‘Insert’ etc. is linked to by clicking on the Table Name in the Navigation.

Similarly, we have options like $cfg[‘DefaultTabDatabase’], $cfg[‘DefaultTabServer’] and $cfg[‘NavigationTreeDefaultTabTable’] and $cfg[‘NavigationTreeDefaultTabTable2’]. Perviously, we had possible value of these options as script names like ‘db_structure.php’ (for Database structure), ‘sql.php’ (For browsing Table data) etc.

The RFE#1594 mentions that we should replace this with more plain English config words like ‘structure’, ‘search’, ‘insert’ etc.

I started to understand how the possible values are added in config.values.php, the default value set in config.default.php and went on to see where I have to make changes so that nothing is broken while shifting from old values to new values.

I added a new function getScriptNameForOption($target, $location) in Util.class.php which would return the script name (generally appended in html for links and all) by providing the currently set $cfg value through the parameter $target. In this, I also took care that the old values were also working as expected and did not break the links. $location was required because the config words were not unique now. For example, $cfg[‘DefaultTabTable’] = ‘structure’ would mean ‘tbl_structure.php’ while $cfg[‘DefaultTabDatabase’] = ‘structure’ would mean ‘db_structure.php’. $location would have possible values of ‘table’, ‘database’ and ‘server’.

Then, I searched where were we just appending the $cfg value to the links and replaced it with corresponding calls to the new function getScriptNameForOption($target, $location).

Later, Isaac suggested we present these possible values to the user in a better way and thus changed the config.values.php to adjust this. (By making ‘structure’ => __(‘Structure’) etc. ).

2. The RFE#1060 suggests that the ‘Designer settings’ like ‘Angular / Direct Links’, ‘Snap to Grid’ etc. should be remembered.

The first and foremost question was ‘How’ ? I could think of 2-3 alternatives at first.

First, to store it in sessionStorage provided by HTML5 browsers.
Second, to provide a $cfg option  directive.
Third, to store it in pma configuration storage.

At first, I was aligned towards the second option but Isaac rightly pointed out that it may not be so easy to remember/ store through the UI as we can not write the new value to config.inc.php.

Then, we decided to go on with sessionStorage and I have implemented it with [0] which is currently open for discussion and review.

But today, Marc pointed out that the user may want persistent and that he thinks we should store it in the configuration storage instead. This is also seeming right to me.

Let’s see. We will discuss and close accordingly. The update will be posted here next week.

Screenshots: 

DefaultTabDatabase

DefaultTabDatabase

DefaultTabServer

DefaultTabServer

DefaultTabTable

DefaultTabTable

Navigation1

Navigation1

Navigation2

Navigation2

Implemented with: 1. RFE#1594- [0]
Also some small errors in RFE#1594’s implementation were later fixed in [1].

Links:
[0] : https://github.com/phpmyadmin/phpmyadmin/pull/1732
[1] : https://github.com/phpmyadmin/phpmyadmin/commit/cad0eda2c71b7bcb6b9c2e328a9ae63d9e3ada30
[2] : https://github.com/phpmyadmin/phpmyadmin/commit/79b43e1c8a74670f2f07d0137170907bc6537d18 

 

Advertisements

About Deven Bansod

I am a recent graduate with a dual degree in B.E.(Hons.) Computer Science Engg. and M.Sc.(Hons.) Economics from BITS Pilani, Pilani (India). I am interested in and have been contributing to development of free and open source software s (FOSS). More recently, I have been contributing to phpMyAdmin, a web interface to MySQL, written in PHP. I'm looking for opportunities to contribute to interesting open-source softwares.

Posted on June 15, 2015, in GSoC 2015, phpMyAdmin, Weekly Reports and tagged , , , . Bookmark the permalink. 3 Comments.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: