Repository navigation
fix: keep a long line of code from widening the editor page - #574
TallblokeUK wants to merge 6 commits into
Conversation
|
Superseded. The conclusion below was wrong: the failure was caused by the test in this pull request. See the correction further down. The file-based execution job is red here, and the evidence says it is not this change.
The failure count changes between attempts on identical code, so it is not deterministic. A stylesheet change cannot vary its effect that way, and it cannot decide whether a PHP snippet executes at all. Every failure is in That points at the flat-file execution path rather than anything here, which is the subject of #561. Worth re-running this job once that fix has landed. |
…into fix/editor-long-line-overflow/core # Conflicts: # CHANGELOG.md
…into fix/editor-long-line-overflow/core # Conflicts: # CHANGELOG.md
|
Correction to my earlier comment: the red file-based job was caused by this pull request. Not by the stylesheet change, but by the test added alongside it. That test created its snippet through WP-CLI. In CI, WP-CLI runs as root inside the container, and with file-based execution on, a snippet saved that way was the first thing written to the flat-file directory in the run. The directories were therefore created owned by root, the web server could not write snippet files into them afterwards, and every snippet saved through the editor from then on never reached disk. It did not reproduce locally because wp-env maps the web server to the same user as WP-CLI, so the two can never disagree about ownership there. Running the suite the way CI does, against a flat-file directory nothing had yet been written to, reproduced the same two assertion failures with the directories owned by uid 0. The test now saves its snippet through the editor, as the tests around it do. Under the same reproduction it passes, the directories are owned by the web server, and the evaluation tests pass. It still fails without the stylesheet change, reporting 32,918 pixels of horizontal overflow. Worth knowing beyond this pull request: any end-to-end test that saves a snippet through WP-CLI before a file-based run has written anything will do the same, and nothing reports the failed write. |
Fixes #518.
A single long unbroken line of code widened the whole editor page, pushing the Save Snippet sidebar outside the viewport and leaving the document scrolling sideways. Line wrapping being enabled made no difference.
.snippet-formlaid its content column out as a bare1fr, whose automatic minimum is the column's content width, so the track grew to fit the line's intrinsic width and took the sidebar with it. The column is nowminmax(0, 1fr), and the two content areas within it no longer take their content width as a minimum either.Verification
lint:stylesandlint:jspass.