Skip to content

Derive paste clip name from FileMaker metadata#214

Merged
fuzzzerd merged 1 commit into
masterfrom
fuzzz/paste-uses-metadata-name
May 18, 2026
Merged

Derive paste clip name from FileMaker metadata#214
fuzzzerd merged 1 commit into
masterfrom
fuzzz/paste-uses-metadata-name

Conversation

@fuzzzerd
Copy link
Copy Markdown
Owner

Pasting a clip from FileMaker initialised the clip's name to the hardcoded "new-clip" string, even when the wire payload already carried the original name (<Script name="…"> for Mac-XMSC, <BaseTable name="…"> for Mac-XMTB). Every paste needed a manual rename to stay findable.

This change adds string? TryGetSourceName(string xml) to IClipTypeStrategy. Script and Table strategies extract the name attribute from their wrapper element; Layout and Opaque return null. MainWindowViewModel.PasteFileMakerClipData consults the strategy, falls back to "new-clip" when no name is available, and appends " (2)", " (3)", … on collision with an existing clip name.

1359 tests pass (dotnet test SharpFM.sln).

@github-actions
Copy link
Copy Markdown

Test Results

✔️ Tests 1359 / 1359 - passed in 17.6s
✔️ Coverage 78.92% - passed with 70% threshold
📏 14838 / 17271 lines covered 🌿 5008 / 7876 branches covered
🔍 click here for more details

✏️ updated for commit 624f62c

@fuzzzerd fuzzzerd merged commit d10b8fd into master May 18, 2026
6 checks passed
@fuzzzerd fuzzzerd deleted the fuzzz/paste-uses-metadata-name branch May 18, 2026 13:57
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.

1 participant