Repository navigation
Conversation
The look at the selected item was four by three whatever it was. A text now gets the height its opening lines need and a PDF its page across the pane, up to what the window leaves under it; every other item keeps the box it had.
[Medium impact] The PR appears safe to merge; no actionable new defects were found. SummaryThe PR gives text and PDF previews more height and keeps long app names inside the details pane.
No actionable new issues were found. No previous review threads were supplied. Tests were not run during this review. Reviews (2) · Last reviewed commit: "Keep a long app name inside the details" · Reviewed by Greptile |
The button that names the app a file opens with was as wide as its text, so a long name pushed the details past the pane's edge. It now takes the room beside its label and no more, and a name too long for that is cut in the middle, keeping its arrow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The details pane looks at the selected item in a box of four by three, whatever the item is. A PDF's page is taller than that and a text has more lines than fit, so both were shown small above a pane that was mostly empty. With the first of these two commits a text gets the height its opening lines need and a PDF its page across the pane, up to what the window leaves under them; every other item keeps the box it had. The second keeps the pane's contents inside it when the app a file opens with has a long name, which until now pushed them past the right edge. The suite goes from 194 to 196 tests. No library,
dependsoroptdependsentry is added.What you'd notice
Pictures
A mini PC, one window, the same folder,
mainon the left and this branch on the right.The same PDF when the app it opens with has a long name.
What stays the same
PlainButton.qmlgains only what a button narrower than its text does, which is to cut the text in the middle and keep 8 pixels of itself on each side of it.Tests
Two new cases, both of which fail on the sources of
main.detailsGiveATextOrAPageTheRoomTheyCanUseshows a realPreviewPanea picture, a short and a long text, a PDF and a PDF that can't be drawn, in a tall window and a short one, and reads the laid out heights: the picture and the short text keep four by three; the long text grows to its last line with room to spare, and in the short window takes exactly the room there is with nothing under it squeezed; the next text keeps the box while a held thread pool delays its reading; an item that a re-read leaves on the row for a moment doesn't drop the height, and a picture looked at in between does; a PDF holds an A4 sheet's shape while a stand-in image provider holds its page back, then takes the page's own shape; a pane made narrower gives a text that wraps into more lines the height they need.detailsKeepALongAppNameInsideThePanegives a realPreviewPanestand-in apps and reads where the button is laid out, plain and mirrored: with a short name it is as wide as its text asks for, against the far edge, as before; with a long one it starts right after its label and ends at the edge of the facts, its text cut in the middle with room kept on both sides; in a pane with room for the text but not for all of the button around it the whole name is shown.Sixteen single changes to
PreviewPane.qml(each arm of the height, each term of the room, each of the two signals the kept height listens to) each fail the first case, and eight to the button and its place in the pane (the button not filling the room, no upper width, neither, no cut, a cut at the end, no room around a cut text, that room always, that room in a button that still fits its text) each fail the second. Each commit builds without warnings and passes the suite on its own, also withTMPDIRset to a folder whose name has a space, where onlyextractRefusesWhatWouldLandOutsidefails, as it does onmain.