Just want to have some suggestions on the way we can show the warning messages:
following are the ways in which a column is created withig PMA
on table structure page add a new column : in this case we can show the notice message on table structure page after columns are added. Or before submitting th form we show a confirm dialog.
on table structure page, change existing column : again show the notice on table structure page after column is chnaged (if changes column is reserved word)
During create a table : It returns to db structure page. so on db structure page, is it fine to show a notice message about a column in last created table ? wont it look out of context ?
what about before submiting create table form (on click of Save) we can pop a confirm message (if it has any reserved word column).
On sql tab (sql query box) using various sql commands: In this case, we stay on same page if in case of create, alter queries. question is do we need to show the warning in this case also? we can have the warning above the sql query box or may be as popup warning message.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Smita,
here are my views. For 1, 2 and 3, if you have an easy way to call the reserved word logic and show a confirm dialog when submitting the form, go for it.
For 4, it would be more complex IMO to do, as you would have to use our parser. phpMyAdmin is a web interface and we hope that users prefer the UI way of changing the table structure. So I would skip the warning in this case.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For all 1, 2 and 3, the same interface is used for entering/modifying the column name. So showing a notice/popup (I prefer the former) should cover all the 3 cases.
I agree with Marc that 4 is not worth the effort and the complexity it brings to the code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks. yeah, I have shown confirm dialog for 1,2,3 if a column name is reserved keyword. skipping 4.
Now the question is, so do we remove the configuration option cfg_ReservedWordDisableWarning or make this default to be true so that if anyone wants to see the warning later can set it to false ?
Last edit: Smita Kumari 2015-01-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Smita,
the directive is used to disable the reserved words warnings, so the current value of false does not disable the warnings. I think it should stay like this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No: http://docs.phpmyadmin.net/en/latest/config.html?highlight=reserved%20word#cfg_ReservedWordDisableWarning
IMO it still doesn't make sense to warn every time the table is viewed. A warning might make sense when the field is created.
Hi
Just want to have some suggestions on the way we can show the warning messages:
following are the ways in which a column is created withig PMA
on table structure page add a new column : in this case we can show the notice message on table structure page after columns are added. Or before submitting th form we show a confirm dialog.
on table structure page, change existing column : again show the notice on table structure page after column is chnaged (if changes column is reserved word)
During create a table : It returns to db structure page. so on db structure page, is it fine to show a notice message about a column in last created table ? wont it look out of context ?
what about before submiting create table form (on click of Save) we can pop a confirm message (if it has any reserved word column).
On sql tab (sql query box) using various sql commands: In this case, we stay on same page if in case of create, alter queries. question is do we need to show the warning in this case also? we can have the warning above the sql query box or may be as popup warning message.
Smita,
here are my views. For 1, 2 and 3, if you have an easy way to call the reserved word logic and show a confirm dialog when submitting the form, go for it.
For 4, it would be more complex IMO to do, as you would have to use our parser. phpMyAdmin is a web interface and we hope that users prefer the UI way of changing the table structure. So I would skip the warning in this case.
For all 1, 2 and 3, the same interface is used for entering/modifying the column name. So showing a notice/popup (I prefer the former) should cover all the 3 cases.
I agree with Marc that 4 is not worth the effort and the complexity it brings to the code.
Smita has implemented a confirm dialog and I prefer a dialog over a notice, because the user has a chance to change her mind before saving.
Hi Marc and Madhura,
Thanks. yeah, I have shown confirm dialog for 1,2,3 if a column name is reserved keyword. skipping 4.
Now the question is, so do we remove the configuration option cfg_ReservedWordDisableWarning or make this default to be true so that if anyone wants to see the warning later can set it to false ?
Last edit: Smita Kumari 2015-01-07
Smita,
the directive is used to disable the reserved words warnings, so the current value of false does not disable the warnings. I think it should stay like this.
Thanks marc. Here is the PR: https://github.com/phpmyadmin/phpmyadmin/pull/1453
Please have a look if it'll work.
Last edit: Smita Kumari 2015-01-07
Pull request accepted; implemented for 4.4.