Bug 37795: Adjust job-progress.inc for Bootstrap 5 changes
Four main changes:
The color classes progress-bar-success and progress-bar-danger are now named
bg-success and bg-danger.
The aria attributes have moved from the progress-bar to the progress wrapper.
Having them on the progress-bar is still supported for BS5, but won't be in
BS6, so we might as well move them now rather than forgetting to move them
later.
Having the percentage number in a span, the % symbol in text, and the label
for "Not started" "Started" "Finished" "Failed" in another span no longer
works because the progress-bar content is in a column flexbox. Just setting
all of it at once in the content of the progress-bar works fine.
Before, overflow from the label being longer than the progress-bar happened
by wrapping the "%" and "Started" invisibly down below the progress-bar.
Now it is cropped off by overflow: hidden, so we have to deal with showing
"2% Star" rather than showing "2%" and dropping the whole "Started" like
we did before. The best solution seems to be making the background of the
progress div, which is what shows to the right of the filled part of the
progress-bar, a little darker grey so white text is readable if you squint.
Test plan:
1. You need enough records to import so that you can at least see a bit of
progress before it finishes. Ideally, you would have a file of 10K or
so bibs, but with ktd, you can have 400-odd: Cataloging - Export catalog
data, change the Output format to XML and the filename to koha.marcxml
and export.
2. Cataloging - Stage records for import, Browse to your file, Upload file.
Since you named it koha.marcxml, it's recognized as MARCXML and you can
just click Stage for import
3. Without the patch, at this point you get an orange full-width bar, with
a white "%" in the middle, which doesn't change even after the "View
batch" link appears signalling it's done. With the patch, you start with
an orange bar labelled "0% Not started" which changes to a green "0.00%
Started" that animates too quickly to read to "100% Finished". Right
click the bar, Inspect, double-click the "width: 100%" to edit it, click
past the 100 and delete the 00 and press Enter to see a static 1%. You
should be able to read the "100% Finished" even spread across the green
and dark gray, at least by selecting the text if no other way.
Sponsored-by: Chetco Community Public Library Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>