Skip to content

Conversation

@dm0n3y
Copy link
Contributor

@dm0n3y dm0n3y commented Nov 25, 2025

Scratch import button used to only take .json files, despite export button producing .txt files. Now scratch import takes .txt files. I considered exporting/importing .sexp but this isn't a standard MIME type and noticed that this broke file preview in my macOS finder and left it as .txt for now.

This PR also fixes a serialization/deserialization bug where scratch export would serialize all scratch slides while scratch import only deserialized a single slide. Now scratch export serializes only the current scratch slide.

Fixes #1947 and #2004

@dm0n3y dm0n3y requested a review from cyrus- November 25, 2025 17:09
@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.21%. Comparing base (299cb50) to head (bbd24a6).
⚠️ Report is 187 commits behind head on dev.

Files with missing lines Patch % Lines
src/util/JsUtil.re 0.00% 3 Missing ⚠️
src/web/app/common/Widgets.re 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2033      +/-   ##
==========================================
- Coverage   51.37%   51.21%   -0.17%     
==========================================
  Files         212      212              
  Lines       21838    21841       +3     
==========================================
- Hits        11220    11185      -35     
- Misses      10618    10656      +38     
Files with missing lines Coverage Δ
src/web/app/common/Widgets.re 0.00% <0.00%> (ø)
src/util/JsUtil.re 2.25% <0.00%> (-0.06%) ⬇️

... and 14 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dm0n3y dm0n3y requested a review from disconcision November 25, 2025 18:07
@dm0n3y dm0n3y changed the title Fix #2004 Fix #1974 #2004 Nov 25, 2025
@dm0n3y
Copy link
Contributor Author

dm0n3y commented Nov 25, 2025

Noticed that Firefox doesn't add the .txt file extension by default when exporting. Not sure how to change that so I've removed the expectation that the imported scratch file has .txt extension.

@dm0n3y
Copy link
Contributor Author

dm0n3y commented Nov 25, 2025

@cyrus- I can't repro the broken import. Could you try again and report back?

@cyrus-
Copy link
Member

cyrus- commented Nov 25, 2025

@dm0n3y It's still happening to me, though the first time I loaded the file it did seem to work but not any subsequent times?

Reset file input value after import completes to allow the same file to be selected and imported multiple times. Without this, the browser's file input won't fire the change event when selecting the same file again.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@dm0n3y
Copy link
Contributor Author

dm0n3y commented Dec 1, 2025

@cyrus- fixed

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.

'Export Scratchpad' in nut menu available but ineffective for docs

3 participants