Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ jobs:
- name: Locked text visible on the rendered dashboard
if: ${{ !cancelled() && steps.visual.outcome == 'success' }}
run: python tools/ci_live_visible.py --base-url http://localhost:8098
# Markdown blocks at the height advise --fix gives them show every line with
# Windows-style scrollbars on, and a block size.markdown-fit calls cut off is.
- name: Markdown blocks fit at the height advise gives them
if: ${{ !cancelled() && steps.visual.outcome == 'success' }}
run: python tools/ci_live_markdown_fit.py --base-url http://localhost:8098
# Saved queries captured from Superset's own frontend, so CSV reports work.
- name: Chart queries saved for reports
if: ${{ !cancelled() && steps.visual.outcome == 'success' }}
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ while the major version is 0, minor bumps may include breaking changes and say s

## Unreleased

### Upgrading

- The design brain is version 11. `advise` now warns when a markdown block's text runs past the block's bottom edge (`size.markdown-fit`), so a `--design strict` or `advise --strict` gate can newly fail on such a block; `advise --fix` raises it. `layout.markdown-height` now fixes a one-line block to the height its line takes, 1.6 units for a line of text up to 2.4 for a `#` heading, instead of 2.

### Added

- `advise` checks that each markdown block is tall enough for its text (`size.markdown-fit`). Superset cuts the rest off inside the block: macOS shows no scrollbar there, so a screenshot shows the text stopping mid-line. The check estimates the text's height from its headings, paragraphs, lists, tables, quotes, code and line breaks, the block's width and the dashboard's own CSS, in a window 1440 px wide, measured against what 4.1.4, 5.0.0 and 6.1.0 draw. A wider window wraps fewer lines, so a height that fits there fits wider too.
- It warns when letters are cut off on every release and says by how much ("it needs ~16 units at 12/12 in a 1440 px wide window, has 15"); `--fix` raises the block to a height that shows every line on every release, Windows scrollbars included.
- A block whose last line or padding only reaches the edge gets an info: it scrolls a few px, and Windows draws a scrollbar in it. That covers short strips: a line of text needs 1.6 units, a `##` heading 2.2.
- It reads the text sizes and spacing a dashboard's CSS gives its markdown: font sizes, line heights, weights, letter and word spacing, margins, padding and borders set on `.dashboard-markdown` elements, `h4 + p` and `p:last-child` rules included, in cascade order over Superset's own. CSS that could change a block's height in a way it doesn't read (another font family, attribute selectors and pseudo-elements, `@media` rules) is named in the finding, as is a theme.
- It checks blocks in layout rows, tabs and sub-tabs, and header and footer rows, and allows for the filter bar, which narrows the page on a dashboard with native filters. A header or footer row a standard owns is reported, never resized, and a block holding an image gets no fix, since its height is unknown.

### Fixed

- `decompile` (and so `adopt`) names more chart settings it can't carry when they differ from Superset's defaults: big-number font sizes and a hidden trendline, a smooth or step line, horizontal bars on a time axis, a pie's radius and hidden labels, a funnel's labels, tooltip and percentage calculation, treemap labels, a heatmap's axis sort, legend, margins, label intervals and value bounds, a histogram's normalize setting, and any chart's currency format. Before, they were dropped without a note.
Expand Down
8 changes: 4 additions & 4 deletions chartwright/design/guidelines/composition.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
- Tabs when sections answer different questions; scrolling when one question
deepens. Never a tab with a single lonely chart.
- Whitespace is markdown's job, sparingly: a one-line section header beats an
empty band (2 units is plenty for a header). Consistent number formats per
measure across KPI cards and axes (`number_format` on KPIs, timeseries and
bars; `number_formats` per column on tables; pivots use Superset's smart
default).
empty band, at the 1.6 to 2.4 units `advise` fits to its line. Consistent
number formats per measure across KPI cards and axes (`number_format` on
KPIs, timeseries and bars; `number_formats` per column on tables; pivots use
Superset's smart default).
- Color restraint: Superset's default palette, RAG only where a threshold has
a real business meaning; never encode the same dimension with two palettes.
- RAG polarity is a convention, not a choice: red = adverse, green = good
Expand Down
Loading
Loading