Skip to content

fix: strip Collapsed attribute from sanitized output#180

Closed
petrowsky wants to merge 2 commits intobc-m:mainfrom
petrowsky:fix/strip-collapsed-attribute
Closed

fix: strip Collapsed attribute from sanitized output#180
petrowsky wants to merge 2 commits intobc-m:mainfrom
petrowsky:fix/strip-collapsed-attribute

Conversation

@petrowsky
Copy link
Contributor

Summary

FileMaker's SaXML export now includes a Collapsed attribute on steps that reflects
whether a block is visually collapsed in the Script Workspace. The exploder was passing
this through as a literal display value, producing noise like:

If [ Collapsed: OFF ; $errorFind = 401 ]
Else [ Collapsed: OFF ; Collapsed: OFF ]

Fix

Add "Collapsed" to the de-noise filter in start_element_to_string
(src/utils/xml_utils.rs), alongside the existing nextvalue, UUID, and index
exclusions. The attribute is stripped in normal (lossy) mode and preserved in lossless
mode to maintain a faithful representation of the FM file state.

Tests

Two new unit tests in xml_utils.rs:

  • test_collapsed_attribute_stripped_in_lossy_mode
  • test_collapsed_attribute_preserved_in_lossless_mode

Fixes #178

@petrowsky petrowsky force-pushed the fix/strip-collapsed-attribute branch 3 times, most recently from 38de6f9 to 32bcb7b Compare March 18, 2026 21:17
FileMaker's SaXML export now includes a Collapsed attribute on steps
that reflects the UI collapse state of blocks in the Script Workspace.
The exploder was surfacing this as literal text in sanitized output,
producing noise like:

  If [ Collapsed: OFF ; $errorFind = 401 ]
  Else [ Collapsed: OFF ; Collapsed: OFF ]

Add "Collapsed" to the de-noise filter in start_element_to_string so
it is stripped in normal (lossy) mode. Lossless mode preserves it to
maintain a faithful representation of the FM file state.

Add unit tests confirming the attribute is stripped in lossy mode and
preserved in lossless mode.

Fixes bc-m#178
@petrowsky petrowsky force-pushed the fix/strip-collapsed-attribute branch from 32bcb7b to cd1cf66 Compare March 18, 2026 21:19
@petrowsky
Copy link
Contributor Author

petrowsky commented Mar 18, 2026

Ignore this one. The fix was in the wrong place. Shouldn't be in xml_utils.rs, should be in boolean.rs. I'm updating it now.

@bc-m bc-m closed this Mar 18, 2026
@bc-m
Copy link
Owner

bc-m commented Mar 18, 2026

Okay! Please create a new PR then. :)

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.

Account for new collapsible steps

2 participants