Instructions for fullsize plots - #4
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the dashboard template to (1) document and ship a reusable fullscreen toggle pattern for Plotly graphs, and (2) reshape the landing page into an “Introduction” page featuring project notes and a revision log, while preserving the sample-data table example as a separate page.
Changes:
- Added
assets/fullscreen.js+ CSS support and documented the required markup inCLAUDE.md. - Reworked the
/page to “Introduction” with a notes textarea and a small revision-logAgGrid. - Introduced a new
/data-tableexample page and adjusted page ordering + tests accordingly.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_app.py | Updates expected pages/order and required component IDs to include the new Data table page and renamed Introduction page. |
| src/pages/home.py | Renames Home to Introduction and replaces sample table with notes textarea + revision log grid. |
| src/pages/data_table.py | Adds a dedicated sample-data table page at /data-table. |
| src/pages/analytics.py | Adjusts page order to keep navigation ordering consistent after adding /data-table. |
| src/assets/fullscreen.js | Implements delegated fullscreen toggle behavior and Plotly relayout-based resizing for .graph-wrap charts. |
| src/assets/css/main.css | Adds styling for notes textarea and fullscreen toggle UI + fullscreen layout behavior. |
| README.md | Updates template description and file tree to reflect the new pages and landing page content. |
| CLAUDE.md | Documents the fullscreen toggle pattern and updates the file structure listing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Suppressed comments (3)
Previously missed (3) — in code that hasn't changed since the last review.
src/pages/home.py:42
columnDefsderives its columns fromREVISION_LOG[0], which will raise anIndexErrorif the log is ever empty (a reasonable state for a new project). Make the column list robust whenREVISION_LOGhas no rows.
columnDefs=[
{"field": col, "headerName": col, "flex": 0.8} for col in list(REVISION_LOG[0])[:5]
]
+ [{"field": "Comment", "headerName": "Comment", "flex": 2}],
tests/test_app.py:68
CALLBACK_IDSis documented as “callback-bound component ids”, but the Home and Data table pages currently define no callbacks. Listing non-callback IDs here makes the intent of the test unclear (and can mislead future edits).
# Same deal as EXPECTED_PAGES: add your new page's callback-bound component
# ids here, or they simply aren't checked (not a failure, just a silent gap).
CALLBACK_IDS = {
"/": {"home-revision-log-grid"},
"/data-table": {"data-table-sample-grid"},
"/analytics": {"analytics-category-filter", "analytics-chart"},
src/pages/home.py:71
- The textarea uses a non-empty
valueas instructional text, so users have to delete it manually and it can be mistaken for real content. Preferplaceholderwith an empty value for a notes field.
dcc.Textarea(
id="home-notes-textarea",
value="Here you can write free text about the project, the dashboard or other relevant information.",
className="notes-textarea",
),
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Suppressed comments (3)
Previously missed (3) — in code that hasn't changed since the last review.
CLAUDE.md:54
CLAUDE.mdsayscolumnSize="responsiveSizeToFit"should always be set fordag.AgGrid, butsrc/pages/home.pyintentionally omits it when usingcolDef.flexsizing. Clarify the guidance so the home page doesn’t look like an exception to the documented convention.
- `columnSize="responsiveSizeToFit"`
src/pages/analytics.py:15
- The
load_sample_data()docstring still refers tohome.pyfor the duplicated loader, buthome.pyno longer defines it. Update the reference so the inline documentation stays accurate.
dash.register_page(__name__, path="/analytics", name="Analytics", order=2)
tests/test_app.py:69
CALLBACK_IDSis documented as “callback-bound component ids”, but/and/data-tablecurrently have no callbacks targeting any IDs. Keeping only pages that actually have callbacks makes the test/spec easier to maintain and avoids misleading future edits.
CALLBACK_IDS = {
"/": {"home-revision-log-grid"},
"/data-table": {"data-table-sample-grid"},
"/analytics": {"analytics-category-filter", "analytics-chart"},
}
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
What changed
This branch introduces two things.
Why
on #1: Useful feature to have, we will probably use it on many projects
on #2: It makes more sense to have an introduction page. For QA, we need the revision log.
Definition of done
CI covers the first two. See
CONTRIBUTING.mdfor why each is here.pytestpassesblackis clean.env.example, not hardcoded (unless it'sa documented, deliberate simplification - see README)
CLAUDE.mdupdated if this establishes a new convention,README.mdif itchanges how to run, refresh or deploy anything
Anything the reviewer should look at closely