Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-26 Thread Dave Page
Thanks, applied. I also extended the code you added to ensure the labels for the Find/Replace options are now platform-correct. On Wed, Jul 26, 2017 at 10:29 AM, Murtuza Zabuawala < murtuza.zabuaw...@enterprisedb.com> wrote: > Hi Dave, > > Please find updated patch for new shortcut keys, I have

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-26 Thread Murtuza Zabuawala
Hi Dave, Please find updated patch for new shortcut keys, I have tested it on all three major platforms (macOS, Linux & Windows with Chrome, FF & IE11 Browsers). -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Fri, Jul 21, 2017 at

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Robert Eckhardt
I'd say we should go with Cmd+/ and Cmd+Shift+/ as that seems the most common by a small margin - however, I'm still not convinced that we don't need two keys for optimal behaviour of line commenting. To be clear, I'm not 100% convinced either. I am, however, convinced that it is the right first

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Dave Page
On Fri, Jul 21, 2017 at 8:57 PM, Shirley Wang wrote: > Until we learn definitively from users that the current implementation of > commenting/uncommenting in other tools is not working, we should use what > is common practice. We can use that as a baseline and then if we learn

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Shirley Wang
Until we learn definitively from users that the current implementation of commenting/uncommenting in other tools is not working, we should use what is common practice. We can use that as a baseline and then if we learn that there needs to be another shortcut, we can add additional functionality.

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Dave Page
On Fri, Jul 21, 2017 at 4:43 PM, Robert Eckhardt wrote: > I understand now. > > If any one line is different then the entire thing will be commented so in > your example: > > --CREATE TABLE foo ( > -- id serial, > -- data text > --); > > ---- Index required on data

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Dave Page
Thanks, patch applied and yarn.lock updated. On Fri, Jul 21, 2017 at 3:52 PM, Sarah McAlear wrote: > Hi! > > We looked at the patch and realized that the function to check if an > element is not clickable because it's out of view was using an incorrect > assertion. We

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Dave Page
On Fri, Jul 21, 2017 at 4:08 PM, Robert Eckhardt wrote: > I wouldn't say wrong, it just wasn't what I was expecting. > > I guess I'd like to hear what others are expecting. If I had my way we > would use > > Ctrl+/ single line comment and uncomment (prepend with --) >

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Robert Eckhardt
I wouldn't say wrong, it just wasn't what I was expecting. I guess I'd like to hear what others are expecting. If I had my way we would use Ctrl+/ single line comment and uncomment (prepend with --) Ctrl+Shift+/ block comment and uncomment (bracket with /* and */) where Ctrl == command

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Sarah McAlear
Hi! We looked at the patch and realized that the function to check if an element is not clickable because it's out of view was using an incorrect assertion. We changed it and created a small patch. We also realized that on the current master the yarn.lock is causing changes when running the app.

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Robert Eckhardt
I'm not sure what you mean by across platforms. Do you mean that those are the keyboard shortcuts in pgAdmin 3? Rob On Jul 21, 2017 4:42 AM, "Murtuza Zabuawala" < murtuza.zabuaw...@enterprisedb.com> wrote: Hi Robert, Just to make shortcut keys uniform across all the platforms. On Fri, Jul

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-21 Thread Murtuza Zabuawala
Hi Dave, Please find updated patch. On Thu, Jul 20, 2017 at 10:35 PM, Murtuza Zabuawala < murtuza.zabuaw...@enterprisedb.com> wrote: > > On Thu, Jul 20, 2017 at 10:29 PM, Dave Page wrote: > >> Hi >> >> On Thu, Jul 20, 2017 at 3:33 PM, Murtuza Zabuawala < >>

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-20 Thread Sarah McAlear
Hello, Attached is a refactor that extracts the keyAction function in the sqlEditor and placed it into a keyboard_shortcuts file. The extracted code is unit tested. I did not look at the feature tests. We are planning on diving into it a bit more but maybe not immediately. Up next we will be

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-20 Thread Robert Eckhardt
Murtuza, Is there a particular reason you choose the keyboard shortcuts that you choose. When we were looking at this earlier to see what was being used elsewhere we discovered: jetbrains cmd+/ pycharmcmd+/ SublimeCtrl+/ Toggle line comment Ctrl+Shift+/ Toggle

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-20 Thread Murtuza Zabuawala
On Thu, Jul 20, 2017 at 10:29 PM, Dave Page wrote: > Hi > > On Thu, Jul 20, 2017 at 3:33 PM, Murtuza Zabuawala enterprisedb.com> wrote: > >> Hi Dave, >> >> Please find patch attached, There were two issues, >> 1) We removed the default button to clear the

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-20 Thread Dave Page
Hi On Thu, Jul 20, 2017 at 3:33 PM, Murtuza Zabuawala < murtuza.zabuaw...@enterprisedb.com> wrote: > Hi Dave, > > Please find patch attached, There were two issues, > 1) We removed the default button to clear the editor window, it > broke _clear_query_tool() functionality. > 2) The buttons

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-20 Thread Sarah McAlear
Hi Surinder & Murtuza! We are actually working on that right now. We should be sending a patch soon. Thanks! Shruti & Sarah On Thu, Jul 20, 2017 at 7:52 AM, Surinder Kumar < surinder.ku...@enterprisedb.com> wrote: > Hi Murtuza, > > Can the code related to Menu KeyEvents be moved out into a

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-20 Thread Surinder Kumar
Hi Murtuza, Can the code related to Menu KeyEvents be moved out into a separate file say 'menu_actions.js' if feasible ? As the more functionality will be added to sqleditor, codemirror and its file menu in future, the codebase will eventually increase. It will ease writing jasmine test cases as

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-19 Thread Murtuza Zabuawala
Sure, Will take a look. -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Wed, Jul 19, 2017 at 8:00 PM, Dave Page wrote: > Except I managed to break a couple of tests :-(. Can you take a look > please? I've had some

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-19 Thread Murtuza Zabuawala
Thank you Dave. On Wed, Jul 19, 2017 at 4:17 PM, Dave Page wrote: > Thanks, applied. > > I also took the opportunity to tidy up the menus a little and add access > keys for accessibility. > > One change I made was to make the Edit and Clear menus not have a default > option -

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-19 Thread Dave Page
Thanks, applied. I also took the opportunity to tidy up the menus a little and add access keys for accessibility. One change I made was to make the Edit and Clear menus not have a default option - e.g. instead of a button with a drop-down next to it, they're now a single dropdown button with

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-19 Thread Murtuza Zabuawala
Just a FYI, You need to run yarn bundle for this to be working as Surinder has moved all the CodeMirror code into bundle package. On Wed, Jul 19, 2017 at 2:20 PM, Murtuza Zabuawala < murtuza.zabuaw...@enterprisedb.com> wrote: > Hi, > > PFA updated patch, > 1) Added Keyboard shortcuts to comment

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-17 Thread Murtuza Zabuawala
Hi Dave, On Mon, Jul 17, 2017 at 2:33 PM, Dave Page wrote: > Hi > > On Wed, Jul 12, 2017 at 1:16 PM, Murtuza Zabuawala enterprisedb.com> wrote: > >> Hi, >> >> PFA patch which will add functionality to allow user to comment/uncomment >> code in query

Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-12 Thread Robert Eckhardt
Yay. -- Rob On Wed, Jul 12, 2017 at 8:16 AM, Murtuza Zabuawala < murtuza.zabuaw...@enterprisedb.com> wrote: > Hi, > > PFA patch which will add functionality to allow user to comment/uncomment > code in query editor. > RM#2456 > > -- > Regards, > Murtuza Zabuawala > EnterpriseDB:

[pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

2017-07-12 Thread Murtuza Zabuawala
Hi, PFA patch which will add functionality to allow user to comment/uncomment code in query editor. RM#2456 -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company diff --git a/docs/en_US/keyboard_shortcuts.rst