public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ganesh Jaybhay <[email protected]>
To: Dave Page <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin4][patch] Keyboard accessibility for sub-node control
Date: Fri, 12 Jul 2019 00:09:56 +0530
Message-ID: <CAK6syArpb7-W16pMzOKaEHzjNtRW8ZeqzcL4aB_eH14kCR1Www@mail.gmail.com> (raw)
In-Reply-To: <CA+OCxoyqq5q9vPK7zmWf-g3=F4hL9gf0nUeW0g6oOawgs05P-w@mail.gmail.com>
References: <CAK6syAryyMuRZVBe=dz47kWk0fr2Yy2-j53Tj8LGJCx3gpbQhA@mail.gmail.com>
<CA+OCxoxHi6PU7dTbC1qvswniaCsrGmhkfaRYO_jimX14xg3zhQ@mail.gmail.com>
<CAK6syAqgLAVLsWCoevtnWX+V_cgKOQra=oohXwnrzYj7fSp9ug@mail.gmail.com>
<CA+OCxoxnzFjL0DrQNs=ps1QtxtuLVEgnB74jfPQX-i5aH3i7Lw@mail.gmail.com>
<CA+OCxoyqq5q9vPK7zmWf-g3=F4hL9gf0nUeW0g6oOawgs05P-w@mail.gmail.com>
Hi Dave,
Please find the attached patch for jasmine tests fix. Patch also includes
fixes for edit/delete cell focus on IE by Murtuza.
Regards,
Ganesh Jaybhay
On Thu, Jul 11, 2019 at 3:49 PM Dave Page <[email protected]> wrote:
> Hi Ganesh,
>
> It looks like this has broken the Jasmine tests (which I admit I forgot to
> run before committing). Can you fix ASAP please?
>
> Thanks.
>
> On Thu, Jul 11, 2019 at 10:14 AM Dave Page <[email protected]> wrote:
>
>> Thanks - patch applied with some doc tweaks.
>>
>> No need for a new ticket!
>>
>> On Thu, Jul 11, 2019 at 7:00 AM Ganesh Jaybhay <
>> [email protected]> wrote:
>>
>>> Hi Dave,
>>>
>>> Ticket number 3919 refers to keyboard accessibility issues for sub-node
>>> control and back grid but this patch covers only sub-node control. Should I
>>> create new one?
>>> I have added the screenshot having newly added shortcut and updated
>>> keyboard shortcut rst file. Also moved the code changes from backgrid.js to
>>> backgrid.pgadmin.js.
>>>
>>> Please find the attached updated patch.
>>>
>>> Regards,
>>> Ganesh Jaybhay
>>>
>>> On Tue, Jul 9, 2019 at 9:28 PM Dave Page <[email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>> What's the ticket number for this? That's a fair amount of code for a
>>>> one-line description. There are also no doc changes describing how to
>>>> navigate the sub-node control that I can see.
>>>>
>>>> Also; instead of changing the repo used for backgrid, can we not
>>>> un-vendorise it?
>>>>
>>>> On Mon, Jul 8, 2019 at 4:49 PM Ganesh Jaybhay <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi Hackers,
>>>>>
>>>>> Attached is the patch for keyboard accessibility of sub-node control.
>>>>> It also covers sub-node dialog forward/backward tab navigation with
>>>>> shortcuts.
>>>>>
>>>>> Kindly review.
>>>>>
>>>>> Regards,
>>>>> Ganesh Jaybhay
>>>>>
>>>>
>>>>
>>>> --
>>>> Dave Page
>>>> Blog: http://pgsnake.blogspot.com
>>>> Twitter: @pgsnake
>>>>
>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>> The Enterprise PostgreSQL Company
>>>>
>>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
Attachments:
[application/x-patch] jasmine_test_fix.patch (4.2K, 3-jasmine_test_fix.patch)
download | inline diff:
diff --git a/web/pgadmin/static/js/backgrid.pgadmin.js b/web/pgadmin/static/js/backgrid.pgadmin.js
index 0d968aa..8275138 100644
--- a/web/pgadmin/static/js/backgrid.pgadmin.js
+++ b/web/pgadmin/static/js/backgrid.pgadmin.js
@@ -206,6 +206,11 @@ define([
if(cell && cell.$el.hasClass('edit-cell') &&
!cell.$el.hasClass('privileges') || cell.$el.hasClass('delete-cell')) {
model.trigger('backgrid:next', m, n, false);
+ if(cell.$el.hasClass('delete-cell')) {
+ setTimeout(function(){
+ $(cell.$el).trigger('focus');
+ }, 50);
+ }
break;
} else if (renderable && editable) {
cell.enterEditMode();
diff --git a/web/pgadmin/static/scss/_pgadmin.style.scss b/web/pgadmin/static/scss/_pgadmin.style.scss
index 8f1e248..082e82c 100644
--- a/web/pgadmin/static/scss/_pgadmin.style.scss
+++ b/web/pgadmin/static/scss/_pgadmin.style.scss
@@ -741,6 +741,17 @@ table tr td {
}
}
+/* Specific to IE11 where we want to highlight the focus on grid buttons */
+@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
+ table tr td {
+ td.edit-cell:focus,
+ td.delete-cell:focus,
+ td.string-cell:focus {
+ border: 2px solid $input-focus-border-color !important;;
+ }
+ }
+}
+
.privilege_label{
font-size: 10px!important;
}
diff --git a/web/regression/javascript/dialog_tab_navigator_spec.js b/web/regression/javascript/dialog_tab_navigator_spec.js
index 8e86fc8..60e4bdd 100644
--- a/web/regression/javascript/dialog_tab_navigator_spec.js
+++ b/web/regression/javascript/dialog_tab_navigator_spec.js
@@ -11,7 +11,7 @@ import $ from 'jquery';
import 'bootstrap';
describe('dialogTabNavigator', function () {
- let dialog, tabNavigator, backward_shortcut, forward_shortcut;
+ let dialog, tabNavigator, backward_shortcut, forward_shortcut, fakeEvent;
beforeEach(() => {
dialog = $('<div tabindex="1" class="backform-tab" role="tabpanel">'+
@@ -68,6 +68,9 @@ describe('dialogTabNavigator', function () {
tabNavigator = new dialogTabNavigator.dialogTabNavigator(
dialog, backward_shortcut, forward_shortcut);
+
+ fakeEvent = { stopPropagation: () => true };
+
});
describe('navigate', function () {
@@ -79,7 +82,7 @@ describe('dialogTabNavigator', function () {
});
it('navigate backward', function () {
- tabNavigator.onKeyboardEvent({}, 'shift+ctrl+[');
+ tabNavigator.onKeyboardEvent(fakeEvent, 'shift+ctrl+[');
expect(tabNavigator.navigateBackward).toHaveBeenCalled();
@@ -88,7 +91,7 @@ describe('dialogTabNavigator', function () {
});
it('navigate forward', function () {
- tabNavigator.onKeyboardEvent({}, 'shift+ctrl+]');
+ tabNavigator.onKeyboardEvent(fakeEvent, 'shift+ctrl+]');
expect(tabNavigator.navigateForward).toHaveBeenCalled();
@@ -97,7 +100,7 @@ describe('dialogTabNavigator', function () {
});
it('should not navigate', function () {
- tabNavigator.onKeyboardEvent({}, 'shift+ctrl+a');
+ tabNavigator.onKeyboardEvent(fakeEvent, 'shift+ctrl+a');
expect(tabNavigator.navigateForward).not.toHaveBeenCalled();
@@ -115,7 +118,8 @@ describe('dialogTabNavigator', function () {
navigateForwardResult = tabNavigator.navigateForward(
dialog.find('ul.nav-tabs:first'),
- dialog.find('div#1')
+ dialog.find('div#1'),
+ fakeEvent
);
});
@@ -141,7 +145,8 @@ describe('dialogTabNavigator', function () {
navigateForwardResult = tabNavigator.navigateForward(
dialog.find('ul.nav-tabs:first'),
- dialog.find('div#1')
+ dialog.find('div#1'),
+ fakeEvent
);
});
@@ -165,7 +170,8 @@ describe('dialogTabNavigator', function () {
navigateBackwardResult = tabNavigator.navigateBackward(
dialog.find('ul.nav-tabs:first'),
- dialog.find('div#1')
+ dialog.find('div#1'),
+ fakeEvent
);
});
@@ -184,7 +190,8 @@ describe('dialogTabNavigator', function () {
navigateBackwardResult = tabNavigator.navigateBackward(
dialog.find('ul.nav-tabs:first'),
- dialog.find('div#1')
+ dialog.find('div#1'),
+ fakeEvent
);
});
view thread (7+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: [pgAdmin4][patch] Keyboard accessibility for sub-node control
In-Reply-To: <CAK6syArpb7-W16pMzOKaEHzjNtRW8ZeqzcL4aB_eH14kCR1Www@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox