Replace double-quoted string with escaped quotes in element selector
with a ~s sigil to satisfy Credo's 'More than 3 quotes found inside
string literal' readability check.
Includes formatting changes from mix format (ran via make check).
The source_viewer component used static DOM IDs (id='source-viewer')
with phx-update='ignore'. When switching expanded files, LiveView
reused the same DOM element but phx-update='ignore' prevented content
from being updated, showing the previous file's source.
- Override source_viewer/1 in MicroprintsLive with unique per-file IDs
generated via :erlang.phash2(file_path)
- Add test verifying expand-switch shows correct source content
- Add test for highlight/expand coupling (collapse when highlighting
a different file)
- All 160 tests pass
- Add test in microprints_live_test.exs that documents the uncoupled state bug
- Fix handle_event("highlight_line") to collapse expanded_path when
highlighting a line in a different file
- All 159 tests pass
- Button is now on top of the card, matching qwan-tracker layout
- Microprint SVG shown when collapsed, source viewer when expanded
- Fixes DOM confusion from duplicate source-viewer IDs by only
rendering one source_viewer at a time
- Use Path.expand(Path.join(app_root, path)) to correctly resolve both
app files (lib/...) and blogex files (../blogex/...)
- Previously Path.join alone did not resolve '..' components, causing
all source viewers to show the wrong file content
- Sort source files by mtime (newest first) and take only the first 2
- This limits the page scope for easier testing/investigation
- Temporary limit; will be 10 most recently changed files later
- Updated tests to work with the 2-file limit
also added go to install showboat and rodney for the next steps.
microprints work in qwan tracker, but not in firehose. some of the
rendering is in the project, maybe the library should provide sample
webpages.