Skip to content

fix: strip Collapsed attribute from sanitized output#182

Merged
bc-m merged 1 commit intobc-m:mainfrom
petrowsky:fix/strip-collapsed-attribute
Mar 18, 2026
Merged

fix: strip Collapsed attribute from sanitized output#182
bc-m merged 1 commit intobc-m:mainfrom
petrowsky:fix/strip-collapsed-attribute

Conversation

@petrowsky
Copy link
Copy Markdown
Contributor

Summary

FileMaker's SaXML export now includes Collapsed as both an XML attribute on <Step>
elements and as a Boolean parameter type, reflecting the UI collapse state of blocks
in the Script Workspace. The exploder was surfacing this in sanitized output:

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

Fix (two parts)

src/utils/xml_utils.rs — add "Collapsed" to the de-noise filter in
start_element_to_string, stripping the attribute from reconstructed XML in normal
(lossy) mode. Preserved in lossless mode.

src/script_steps/parameters/boolean.rs — return None from display() when
Boolean type="Collapsed". This is a UI-only visual state that carries no semantic
meaning in the script and should never appear in sanitized output.

Tests

  • xml_utils.rs: test_collapsed_attribute_stripped_in_lossy_mode, test_collapsed_attribute_preserved_in_lossless_mode
  • boolean.rs: test_collapsed_returns_none
  • Affected snapshots updated.

Fixes #178

FileMaker's SaXML export now includes Collapsed as both an XML
attribute on Step elements and as a Boolean parameter type, reflecting
the UI collapse state of blocks in the Script Workspace. The exploder
was surfacing this as literal text in sanitized output:

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

Two fixes:

1. xml_utils.rs: add "Collapsed" to the de-noise filter in
   start_element_to_string so the attribute is stripped from
   reconstructed XML in normal (lossy) mode.

2. boolean.rs: return None from display() when Boolean type is
   "Collapsed" — this is a UI-only visual state that should never
   appear in sanitized output regardless of step context.

Add unit tests for both fixes. Update affected snapshots.

Fixes bc-m#178
@bc-m bc-m merged commit df44bef into bc-m:main Mar 18, 2026
1 check passed
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