Repository navigation
Charts: axis fits close runs, target on every availability chart, Results can be maximised - #337
Merged
Merged
Conversation
…ults can be maximised - A percentage axis under one point wide is drawn to fit (runs from 99.85 % to 99.995 % sat in the top sixth of a 99-100 % axis). - The page's target is drawn on the ladder, the waterfall and both year charts; 'A bad year' said 'no threshold was set' beside a target. - The Run tab's content-height cap applied while it was a tab behind Results, so the bottom panel could not be dragged taller. - The Results title bar has Maximise / Restore.
Restore and Redock docked the Results while they were still maximised: the dock kept the full screen's height, the window, its status bar and the chart's foot went off screen, and the full-screen size was remembered as the floating size for the next Float. They now leave maximised first (the floating window's own size is remembered), the docked height is asked for once the layout has taken the dock back, and a window stretched past its screen goes back inside it.
The Results title bar now starts with Maximise, so the first tool button is no longer Minimise.
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.
Fixes #336.
Charts: an axis that fits, the target on every availability chart, and a Results panel you can see whole.
Axis range. For percentages, the axis was always at least one percentage point wide. Runs between 99.85 % and 99.995 % were drawn on a 99 % to 100 % axis, all squeezed into the top sixth. A spread under one point is now drawn to fit, with a margin of a tenth of the spread. A spread under a thousandth of a point still gets the one-point axis, which keeps round ticks when every run is (nearly) identical. The target is always inside the range.
Target on more charts. The Charts page's target is now drawn on the availability ladder, the waterfall (only when it is on the availability scale), "Availability year by year" and "A bad year, as a frequency". The Target button shows on all of them. The year charts used only the run summary's own threshold, so "A bad year" said "no threshold was set" while every other chart showed the target. A dependability target is not drawn on these availability-only charts. In exported SVGs, the year chart's line is labelled "target" or "threshold" according to where it came from.
Results panel height. The Run tab caps its own height to fit its content. That cap stayed on while it was a hidden tab behind Results, so the shared bottom panel could not be dragged any taller than the Run panel (277 px in an 800 px window). The cap now applies only while Run is the tab on show. It also works for a layout restored from a saved session, which has no active tab recorded yet.
Maximise. The Results title bar has a Maximise button. It opens the Results in their own window, maximised, so the whole chart can be seen even on a short screen where the canvas keeps its minimum height. The same button, now labelled Restore, puts them back in the main window.
Tests.
tests/unit/test_charts_target_range_maximise.pycovers:One existing dock-layout test passed only because of the cap bug: both windows were capped at the same height. It now passes for the right reason. All five charts and the title bar were checked by rendering them to PNG.