Repository navigation
Conversation
[Medium impact] The PR appears safe to merge; no new actionable issue was found. SummaryAdds archive listings, private font samples, and media facts to previews.
The earlier findings are addressed in the supplied code. No new actionable issue was found. Tests were inspected, not run. Reviews (10) · Last reviewed commit: "Show a video's or a song's length and co..." · Reviewed by Greptile |
ba4808f to
f1b0a2b
Compare
An archive showed only its icon. Selecting one now lists the names inside it, in the details pane and in the preview window. bsdtar reads them off the UI thread, they show as they arrive, and the read stops when the selection moves on.
A font file showed only its icon. The preview window now draws its family, style, alphabet and a line of text at five sizes in the font itself, and the details pane a short sample. Each sample is drawn from its own file and never added to Folio's fonts, so two windows on two files of one family each show their own, and a .otf file is named as a font, not as the OpenDocument template its extension alone would mean.
The details pane gave a video or a sound file only its size and date. It now adds Length, Video and Audio rows, and a video's dimensions, read by ffprobe for the item shown. Without ffprobe it names the package that holds it.
|
Thank you, @thisisgm. The archive listing is a clear win for a file manager and rides on bsdtar, which Folio already needs, so I took that commit into #179, rebased onto the details column (#153, #154, #155) with you credited as co-author. The font sheets and the media lengths aren't going in with it: the font sample is a lot of new rendering code (its own glyph layout and threading) for a file type few people preview, and the lengths would make ffprobe an optional dependency, which is a separate call. If you'd like to pursue the lengths, a small PR of their own on top of #179 (which brings the Helper they need) would be the way. Closing this one in favor of #179. |
Three kinds of file that showed only an icon now show what is in them, one commit each with its own tests: an archive lists the names inside it, a font draws a sample sheet, and a video or a song shows its length and codecs. The suite goes from 196 to 211 tests. No library or
dependsentry is added: archives are read bybsdtar, which Folio already runs to extract and compress, and lengths byffprobewhen it is installed.What you'd notice
bsdtarreads shows its names in the details pane, and Space shows the whole list, which keeps its scroll position while names are still arriving.bsdtarreads them off the UI thread, they show as they arrive, the count comes with them, and the read is stopped when the selection moves on, together with any programbsdtarstarted to unpack with. An encrypted listing, an archive that cannot be read, one that gives no name within five seconds and a missingbsdtareach say so in a sentence. A plugin's own item is no file on the disk, so no program is asked about it..otffile is named "OpenType font", where its extension alone had it named as an OpenDocument template.ffprobefor the one item shown. Withoutffprobea sentence names the package that holds it (ffmpeg). A file written over with somethingffprobecannot read loses the length and codecs it showed.Screenshots
The details pane for an archive, a font, a video and a song: main above, this branch below.
Space on an archive, main on the left and this branch on the right.
Space on a font.
Tests
Fifteen new cases, each failing without its commit: an archive's names are read as they arrive and counted, and very long ones are cut off by size; they are listed off the UI thread; the preview window keeps its place while more names arrive and starts the next file at its top; a read for what is no longer shown is stopped with what it started, a plugin's item asks no program, and an archive that gives no name in its time is said to have taken too long; of what a program complains of, only the start is kept, however much it prints; every font type opens as a sample sheet and a
.otfis shown and named as a font; a font is kept by its sample and never added to the application's fonts; only the glyphs a font has are drawn, digits included, and a pipe named like a font is not waited on; two samples shown at once of two files with one family name each draw their own file, with lines broken at the width; a sample is drawn as a picture on the thread that holds its font, and painting only copies that picture; a font written over in place is read again; a font no longer shown is never opened, and a path and a time set together cost one read; the factsffprobeprints are read into rows;ffprobeis asked about the item shown, and a second answer with nothing in it clears the first; and a length reads as a clock. Every commit builds and passes the suite on its own, also withTMPDIRset to a folder whose name has a space, where onlyextractRefusesWhatWouldLandOutsidefails, as it does on main.Limits
ffprobeprints is cut off at 1 MB.ffprobewould be an optional dependency (ffmpeg). The package recipe no longer lives in this repository, so that line is not part of this pull request.