Add an optional parameter to the /series view command to allow the ability to disable the colour filter #355
Labels
No labels
blocked
duplicate
needs
approval
needs
criteria
needs
estimate
needs
tests
question
step
doing
step
review
step
testing
step
todo
step
uat
type
admin
type
alert
type
bug
type
change
type
defect
type
epic
type
idea
type
incident
type
investigation
type
spike
type
story
wontfix
No project
No assignees
2 participants
Notifications
Total time spent: 10 minutes 31 seconds
Due date
Vylpes
10 minutes 31 seconds
No due date set.
Dependencies
No dependencies set.
Reference
External/card-drop#355
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
For performance reasons
QA test results — PASS
Tested
release/0.11.0(head0efae8b, the merge of PR #493 which implemented this change).The issue body has no explicit acceptance criteria, so I used the GIVEN/WHEN/THEN unit tests written during implementation in PR #493 as the QA tests, plus a static trace of the flag through the call chain.
Pipeline (mirrors
.forgejo/workflows)yarn install --frozen-lockfileyarn build(tsc)yarn lint(eslint)yarn test(jest)Feature-specific tests
tests/commands/series.test.ts— 3/3 passeddisable_colour_filter=true, EXPECT helper called withtruedisable_colour_filter, EXPECT helper called withfalsetests/buttonEvents/Series.test.ts— 3/3 passedtruefalseBehaviour verified
/series viewregisters the optional boolean optiondisable_colour_filter("Show all cards in full colour"), defaulting tofalsewhen omitted, so existing behaviour is unchanged.commands/series.tsintoSeriesHelper.GenerateSeriesViewPageand on intoImageHelper.GenerateCardImageGrid, where the guard becomesuserId != null && !disableColourFilter. With the flag set, the per-cardInventory.FetchOneByCardNumberAndUserIdlookup and greyscale pass are skipped entirely — which is the performance win this issue asked for.1/0andbuttonEvents/Series.tsreads position 4 back, so paging through a series does not silently re-enable the filter.Note for UAT
There is no test suite for
ImageHelperin this repo (a pre-existing gap, not introduced here), so the greyscale skip itself is covered only by the static trace above and not by an automated assertion. Worth eyeballing a real/series view id:<n> disable_colour_filter:Truein Discord during UAT to confirm unclaimed cards render in full colour and that the page loads noticeably faster.Moving to
step/uat.