Skip to content

feat: show the topic number on each bubble - #53

Merged
maehr merged 7 commits into
mainfrom
feat/topic-numbers
Oct 6, 2026
Merged

maehr merged 7 commits into
mainfrom
feat/topic-numbers

Conversation

@maehr

@maehr maehr commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

The topic map now shows the topic number on each bubble. A reader can find a topic without its colour. This is an open finding of #31 and an item of #46.

  • plots.topic_map returns a layer chart: the bubbles and a text layer with the number.
  • The data sits on the layer chart, so map_chart.value still filters. The click selection from feat: share one selected topic across views #35 works.
  • The chart gets a description for assistive technology, and the tooltip shows the number.

Test

  • A headless check: mo.ui.altair_chart(topic_map(...))._convert_value(...) returns the clicked row.
  • Browser test on Pyodide 314: a click on the number 5 selects topic 5 in the cards, the bars, and the map.

Stack

  1. chore(deps): refresh the lockfile for marimo 0.25 #51 chore/deps → main
  2. test: run the notebook with a fitted result #52 test/notebook-gate
  3. feat: show the topic number on each bubble #53 feat/topic-numbers
  4. feat: explain how to read the topic map and the document map #54 feat/map-explanations
  5. feat: add the figures to project.zip #55 feat/zip-figures
  6. chore: delete PLAN.md #56 chore/release-prep

Merge from the bottom up.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EsEUVKgZPLky1kHXnU2aBW

maehr and others added 2 commits October 6, 2026 13:55
Raise the dev floor of marimo to 0.25.1 and pin ty 0.0.84.
Upgrade every locked package. The runtime bounds stay as they are.
marimo 0.25 pins Pyodide 314, which ships Python 3.14 and pandas 3.0.2.

Supersedes #47.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A browser test of the export on Pyodide 314 passed. Both demos fit, the topic
selection works, and the lazy package download returns the ZIP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EsEUVKgZPLky1kHXnU2aBW
Copilot AI balanced review requested due to automatic review settings October 6, 2026 12:29
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 29 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d3eb4043-c03f-44b9-aa77-b34bd475d71f
📥 Commits

Reviewing files that changed from the base of the PR and between 2ef3eed and d44ad26.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (9)
  • .github/workflows/ci.yml
  • AGENTS.md
  • CONTRIBUTING.md
  • README.md
  • SPECS.md
  • pyproject.toml
  • simple_topic_modeling/plots.py
  • tests/test_notebook.py
  • tests/test_plots.py
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Layer-level opacity makes unselected topic numbers difficult to read.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds topic-number labels to map bubbles for clearer identification and accessibility.

Changes:

  • Layers numbered text over topic bubbles.
  • Adds tooltip and assistive description.
  • Updates specifications and chart tests.
File Description
simple_topic_modeling/​plots.py Adds numbered labels and chart description.
tests/​test_plots.py Tests layered bubbles and labels.
SPECS.md Documents topic-number labels.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread simple_topic_modeling/plots.py Outdated
return (
alt.layer(bubbles, numbers, data=frame, title="Topic map")
.encode(
**_emphasis(selected),

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in d44ad26. _emphasis now applies to the bubble layer only. The number layer encodes text alone, so every number keeps full contrast. A test checks that the number layer has no fillOpacity.

@maehr

maehr commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

maehr and others added 5 commits October 6, 2026 14:36
The marimo version fixes the Pyodide version of the export. A floor let uv lock
--upgrade move it without a browser test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EsEUVKgZPLky1kHXnU2aBW
A plain app.run() takes only the path without a result, so a missing name in the
result view passed the gate. tests/test_notebook.py checks that some cell returns each
cell parameter. It runs the result view with the fitted newspaper demo and the fitted
book demo. The CI Notebook job runs the file instead of the inline script.

Refs #46.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README.md and CONTRIBUTING.md still showed the plain app.run() script. That script
skips the result view, so the guides now run tests/test_notebook.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EsEUVKgZPLky1kHXnU2aBW
The topic map is now a layer chart. A text layer writes the topic number on each
bubble, so a reader can find a topic without its colour. The data sits on the layer
chart, so the click selection from #35 still works. The chart also gets a description
for assistive technology.

Refs #31, #46.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The selection dimmed the whole layer chart, so the numbers of the other topics faded
with their bubbles. The emphasis now applies to the bubble layer only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EsEUVKgZPLky1kHXnU2aBW
@maehr
maehr force-pushed the test/notebook-gate branch from 8d10331 to e52038b Compare October 6, 2026 12:57
@maehr
maehr force-pushed the feat/topic-numbers branch from 2e92699 to d44ad26 Compare October 6, 2026 12:57
Base automatically changed from test/notebook-gate to main October 6, 2026 12:59
@maehr
maehr merged commit 7cd3af4 into main Oct 6, 2026
6 checks passed
@maehr
maehr deleted the feat/topic-numbers branch October 6, 2026 13:00
@maehr maehr mentioned this pull request Oct 6, 2026
5 of 17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants