Skip to content

Instructions for fullsize plots - #4

Merged
anna-follestad-4ss merged 7 commits into
mainfrom
instructions-for-fullsize-plots
Aug 26, 2026
Merged

Instructions for fullsize plots#4
anna-follestad-4ss merged 7 commits into
mainfrom
instructions-for-fullsize-plots

Conversation

@anna-follestad-4ss

Copy link
Copy Markdown
Collaborator

What changed

This branch introduces two things.

  1. Instructions in CLAUDE.md and accopmaying fullscreen.js and main.css that instructs claude how to include a toggle button for full screen plots if the user asks this.
  2. Changed the "home" page to "Introduction" and included a free-text area and a revisino log.

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.md for why each is here.

  • pytest passes
  • black is clean
  • Every threshold, unit and label comes from a named constant, not a literal
  • Anything machine-specific is in .env.example, not hardcoded (unless it's
    a documented, deliberate simplification - see README)
  • Every page opened and looked at after the change
  • At least one displayed number spot-checked against the source
  • CLAUDE.md updated if this establishes a new convention, README.md if it
    changes how to run, refresh or deploy anything

Anything the reviewer should look at closely

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in CLAUDE.md.
  • Reworked the / page to “Introduction” with a notes textarea and a small revision-log AgGrid.
  • Introduced a new /data-table example 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.

Comment thread src/assets/fullscreen.js
Comment thread src/pages/introduction.py
Comment thread CLAUDE.md
Comment thread src/assets/css/main.css Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  • columnDefs derives its columns from REVISION_LOG[0], which will raise an IndexError if the log is ever empty (a reasonable state for a new project). Make the column list robust when REVISION_LOG has 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_IDS is 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 value as instructional text, so users have to delete it manually and it can be mistaken for real content. Prefer placeholder with 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",
                    ),

Comment thread CLAUDE.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md says columnSize="responsiveSizeToFit" should always be set for dag.AgGrid, but src/pages/home.py intentionally omits it when using colDef.flex sizing. 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 to home.py for the duplicated loader, but home.py no 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_IDS is documented as “callback-bound component ids”, but / and /data-table currently 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"},
}

Comment thread src/pages/home.py Outdated
anna-follestad-4ss and others added 2 commits August 26, 2026 12:29
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@anna-follestad-4ss
anna-follestad-4ss merged commit b49599a into main Aug 26, 2026
1 check passed
@anna-follestad-4ss
anna-follestad-4ss deleted the instructions-for-fullsize-plots branch August 26, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants