Skip to content

Warn in the save menu when the bom table is filtered - #595

Open
emincan2000 wants to merge 1 commit into
openscopeproject:masterfrom
emincan2000:bom-export-filter-warning
Open

emincan2000 wants to merge 1 commit into
openscopeproject:masterfrom
emincan2000:bom-export-filter-warning

Conversation

@emincan2000

Copy link
Copy Markdown

Fixes #481, following the suggestion there to put a warning text in the export menu.

Saving the bom table as csv/txt (and the copy button) exports only the rows currently shown. The filter box, ref lookup and the F/B side buttons can all hide rows, and the side buttons are easy to overlook, so the exported bom can be incomplete without the user noticing.

This adds a line under the csv/txt buttons, shown only while something hides rows, saying what it is, e.g. Table is filtered (front side only, filter), saved file will not contain all rows.

  • The side is reported only when the other side has components. On a single sided board, F hides nothing, so no warning.
  • In netlist mode the side buttons and ref lookup don't affect the table, so only the filter is reported there.
  • It is updated from populateBomTable(), which every filter, side and mode change already goes through.

Testing

Generated with --include-nets from the KiCad 9 demo boards pic_programmer (all parts on front) and video (both sides), then driven in headless Chromium:

Step pic_programmer video
FB, no filter hidden (36 rows) hidden (68 rows)
F hidden (36 rows, nothing on back) front side only (47 rows)
B back side only (0 rows) back side only (32 rows)
filter r filter filter
filter + ref lookup R1 filter, ref lookup filter, ref lookup
cleared hidden hidden
netlist mode, side F hidden hidden

Checked in light and dark mode, no console errors.

This PR was prepared with the help of an AI coding assistant (Claude). The tests above were actually run as described.

Saving or copying the bom table exports only the visible rows. Filter,
ref lookup and the front/back side buttons all hide rows, but the side
filter in particular is easy to miss, so an exported bom can silently be
incomplete.

Show a warning below the csv/txt buttons listing what is filtering the
table. The side filter is only reported when the other side actually
has components.

Fixes openscopeproject#481

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better visibility that the bom list is filtered to avoid confusion and incomplete exports

1 participant