Improve display of Coverage in MCLs

Description

Coverage is regularly displayed in an MCL column.

Agreement preview

"Agreement line" accordion

"E-resources covered by this agreement" accordion

Title instance preview

"Agreements for this e-resource" accordion

"Options for acquiring e-resource" accordion

Package preview

"E-resources in package" accordion

ERM basket

ERM comparisons

Comparison report output

The width needed by a coverage cell varies but ideally the dates will always display on a single row, and the Vol/Issue will display on a single row, without either row wrapping.

It is quite common for the coverage column to be empty of data, in which case ideally the width will take the minimum amount of space. This is achieved currently by not setting a column width, as can be seen on the AVA VOD Library package preview. However, taking this approach sometimes causes the content to wrap. We have attempted to get around this by setting the minimum width=250 and the maximum=320 to give the content the room it needs, but this means that the width of an empty column can never be less than 250. Ideally we would be able to set no width for the column and for the max and min values to only be applied if the column contains content.This would be a Stripes MCL change.

Attachments

9

Checklist

hide

TestRail: Results

Activity

Show:

Gill OsguthorpeDecember 8, 2020 at 9:47 AM

For MCLs which are unlikely to have a Load more option, we could leave the minimum width unset to make the Coverage column shrink when empty. If this is done also for MCLs with a load more option then the column could resize each time "Load more" is selected.

Aditya matukumalliDecember 7, 2020 at 3:16 PM

Thats right Gill. We do not have a width set for the coverage column on that specific MCL, https://github.com/folio-org/ui-agreements/blob/master/src/components/EntitlementsAgreementsList/EntitlementAgreementsList.js#L42

Gill OsguthorpeDecember 7, 2020 at 2:52 PM
Edited

Thanks for the update .So when the initial Coverage column width is calculated, if rows in the first batch have no coverage and the column width is set to its absolute minimum, when the user selects "Load more" it is not possible to recalculate the column width. This would make any coverage in the second batch of rows display poorly. Like you say, it wouldn't be good to have the columns resize each time the user loads more rows, especially if all columns were responding to content in the same way.

For info, the Coverage column in the MCL of agreements, displayed on the E-resource record, behaves similar to the way described in the issue. E.g. where the resource has no coverage the column is displayed at an absolute minimum:

With coverage the column width increases e.g.

Is this because the column has no minimum set, Adi?

Aditya matukumalliDecember 7, 2020 at 1:57 PM

IIRC, the decision was for us to find a correct min value to set for the coverage column. Reason being, we have scenarios where an MCL row might not have a coverage until very far down the list (eg: an MCL row that has a coverage only after clicking the load more). MCL cant measure data that isnt there, this mean the MCL needs to mesaure the column width `mid-scroll` (this capability isnt there in the MCL yet) and that means the columns would shift in size as you scrolled. So, I think finding that right min width is the immediate solution.

Gill OsguthorpeDecember 7, 2020 at 12:47 PM

Hi . You spoke to John Coburn a while ago about this. Did anything come of it?

Won't Do

Details

Components

Assignee

Reporter

Priority

Sprint

Development Team

Bienenvolk

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created September 23, 2020 at 4:24 PM
Updated March 9, 2021 at 3:00 PM
Resolved December 7, 2020 at 4:12 PM
TestRail: Cases
TestRail: Runs