new Angular eg-grid doesn't include right click Actions menu

Bug #1803787 reported by Andrea Neiman on 2018-11-16
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
Undecided
Unassigned
3.2
Undecided
Unassigned

Bug Description

3.2.1

Looking at some Acquisitions grids that were ported to new Angular for 3.2.

Actions are no longer available from a right-click in the grid, and this should be restored.

Changed in evergreen:
status: New → Confirmed
tags: added: acq
Bill Erickson (berick) on 2018-11-26
Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
Bill Erickson (berick) wrote :

Patches pushed:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1803787-ang-grid-context-menu

There are two commits:

1. Adds support for <eg-grid-toolbar-action [separator]="true".../> for displaying separators in the grid actions drop-down.

2. Adds context menu display for grids matching the content of the toolbar actions, supporting separators.

Note the menu display uses an ng-bootstrap popover, which has no baked-in concept of displaying at the mouse action. Instead, the menu appears below the grid item upon which the right-click occurred. In most cases, this will be very close to the right-click, except when a grid column is very wide. I opted for this to reduce code (since we already import bootstrap), but if the display is irksome, more research may be needed and/or we may have to roll our own context menu.

Changed in evergreen:
milestone: none → 3.2.2
assignee: Bill Erickson (berick) → nobody
tags: added: pullrequest
Changed in evergreen:
milestone: 3.2.2 → 3.2.3
Changed in evergreen:
milestone: 3.2.3 → 3.3-beta1
Bill Erickson (berick) on 2019-02-05
tags: added: angular
Changed in evergreen:
milestone: 3.3-beta1 → 3.3-rc
John Amundson (jamundson) wrote :

I took a quick look at this patch today.

I'll start by saying the right-click menu looks really nice. The menu seems to appear below the selected row, midway through the width of the "hovered" column, but I didn't find this awkward. The little arrow is a nice touch. The couple actions I tested both worked from the right-click menu.

Having said that, I did have one issue. When I had multiple rows selected and I right-clicked in the highlighted area, only the row I right-clicked over stayed highlighted. I expected the rows to stay highlighted and for the action to apply to all selected rows.

Bill Erickson (berick) wrote :

Thanks, John. I'll take a look at the multi-row issue.

Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
Bill Erickson (berick) wrote :

Working branch rebased to master with merge repairs. Added another commit to address the row selection issues raised by John.

When right-clicking on a row, if the row was not already selected, then that row (and only that row) is selected. If the row was already selected (and potentially others along with it), the row selection is left unchanged and the context menu action will be performed across multiple rows (where supported).

To test:

1. navigate to admin -> acq admin -> cancel reasons.
2. Create 2 new dummy cancel reasons
3. Control-click to muli-select the 2 new cancel reasons.
4. right click on either of the cancel reasons and note the selection is retained.
5. chose the delete action and note both rows deleted after refresh.

Changed in evergreen:
assignee: Bill Erickson (berick) → nobody
Bill Erickson (berick) wrote :

Note that after rebase, the working branch only merges cleanly to master / 3.3. If we want to back-port, I can create a 3.2 compatible branch.

Andrea Neiman (aneiman) wrote :

Thanks Bill! I'm +1 for backporting if it's not too much of a hassle.

Bill Erickson (berick) wrote :

Thanks for the input, Andrea. I'll push a 3.2 branch.

Changed in evergreen:
milestone: 3.3-rc → 3.3.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers