Skip to content

fix(neodash-converter): map text→markdown and circlePacking→circle-packing - #878

Merged
alfredo1996 merged 1 commit into
release/1.0from
fix/neodash-converter-text-circlepacking
May 22, 2026
Merged

fix(neodash-converter): map text→markdown and circlePacking→circle-packing#878
alfredo1996 merged 1 commit into
release/1.0from
fix/neodash-converter-text-circlepacking

Conversation

@alfredo1996

@alfredo1996 alfredo1996 commented May 22, 2026

Copy link
Copy Markdown
Owner

Summary

Surfaced while dry-running 17 real NeoDash dashboards from the NovoNordisk-OpenSource/openstudybuilder-solution corpus.

Two missing entries in `CHART_TYPE_MAP`:

  • `text` (35 instances across 13 dashboards) — NeoDash's plain-text/markdown widget had no entry, so it fell back to the generic JSON viewer. Map to NeoBoard's `markdown` widget.
  • `circlePacking` (3 instances, camelCase) — the converter already had `circle_packing` (snake_case) but NeoDash exports use camelCase. Add the alias.

Both are 1-line additions to the existing map. Tests extend the existing parametrized `it.each` table.

Impact on the openstudybuilder corpus

Before: 6 widget types fell back to JSON viewer (35+3 = 38 widgets across 14 dashboards).
After: 0 unmapped widget types — every NeoDash widget type used in the corpus maps cleanly.

Test plan

  • 2 new parametrized cases in `neodash-converter.test.ts` (`text → markdown`, `circlePacking → circle-packing`)
  • Full app suite: 2778 passed
  • Lint clean
  • CI: SonarCloud + CodeRabbit (pending)

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

Summary by CodeRabbit

  • New Features

    • Extended dashboard conversion support for additional chart type formats
  • Tests

    • Enhanced test coverage for chart type mapping

Review Change Stack

…cking

Surfaced while dry-running 17 NeoDash dashboards from the
NovoNordisk-OpenSource/openstudybuilder-solution repo:

- `text` (35 instances across 13 dashboards) — NeoDash's plain-text/
  markdown widget had no entry in CHART_TYPE_MAP, so it fell back to
  the generic JSON viewer. Map it to NeoBoard's `markdown` widget.
- `circlePacking` (3 instances, camelCase) — the converter already
  had `circle_packing` (snake_case), but NeoDash exports use
  camelCase. Add the alias.

Both are 1-line additions to the existing CHART_TYPE_MAP. Tests
extend the existing parametrized type-mapping it.each table.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@alfredo1996 alfredo1996 added bug Something isn't working pkg:app Next.js application package area:dashboard Dashboard management labels May 22, 2026
@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c3a40481-63f3-4344-9078-c254d07ef91f

📥 Commits

Reviewing files that changed from the base of the PR and between 6211871 and 3298042.

📒 Files selected for processing (2)
  • app/src/lib/__tests__/dashboard/neodash-converter.test.ts
  • app/src/lib/dashboard/neodash-converter.ts

Walkthrough

The PR extends NeoDash chart type conversion by adding two new aliases to the CHART_TYPE_MAP: circlePacking maps to circle-packing and text maps to markdown. A test case verifies the circlePacking conversion.

Changes

Chart Type Mapping Aliases

Layer / File(s) Summary
Chart type mapping aliases and test coverage
app/src/lib/dashboard/neodash-converter.ts, app/src/lib/__tests__/dashboard/neodash-converter.test.ts
CHART_TYPE_MAP is extended with circlePackingcircle-packing and textmarkdown mappings. Test coverage is added for the circlePacking conversion alongside existing nearby type mappings.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • alfredo1996/neoboard#378: The main PR extends neodash-converter so NeoDash text maps to chart type "markdown", which directly ties into the retrieved PR's new "markdown" plugin that the plugin-driven chart-renderer can dispatch to.
  • alfredo1996/neoboard#626: The retrieved PR expanded NeoDash→NeoBoard conversion in neodash-converter.ts with chart-type handling/downgrades (and corresponding tests), and the main PR further adjusts the same chart type mapping by adding circlePacking (and text) aliases—so both directly touch the converter's chart-type conversion logic.

Suggested labels

testing

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary changes: adding two missing chart type mappings (text→markdown and circlePacking→circle-packing) to the NeoDash converter.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/neodash-converter-text-circlepacking

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 and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@alfredo1996
alfredo1996 merged commit 776771c into release/1.0 May 22, 2026
14 checks passed
@alfredo1996
alfredo1996 deleted the fix/neodash-converter-text-circlepacking branch May 22, 2026 12:16
alfredo1996 pushed a commit that referenced this pull request May 22, 2026
Refresh the migration guide based on a real-world validation pass against
the OpenStudyBuilder NeoDash corpus (17 dashboards · 12-46 widgets each).

- Chart type mapping table: add `text → markdown`, `circle_packing`/
  `circlePacking → circle-packing`, both `iframe`/`iFrame` casings,
  `choropleth`/`areamap` aliases, `graph3d`/`3d-graph` (2D render),
  `gantt`. Reflects #878.
- New 'Click actions' section: documents both the object-shape and
  string-shape ('set variable' + customizationValue) NeoDash emits.
  Reflects #881.
- New 'Conditional / rule-based styling' section: explicit operator
  mapping table for styleRules.
- New 'Auto-refresh' section: refreshRate (seconds) → cacheTtlMinutes.
- New 'Known limitations' section with the one residual gap surfaced
  by testing: only the first actionsRules rule per widget is converted
  (tracked in #882).
- Troubleshooting refreshed: schema-update files that aren't dashboards,
  text-widget JSON-fallback bug, click-action multi-rule limitation,
  silent auto-save bug.
- Tip at top points to the corpus and links to Known limitations.

No code changes. CI will validate the MDX build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
alfredo1996 added a commit that referenced this pull request May 22, 2026
* docs(migration): update NeoDash guide with corpus-tested findings

Refresh the migration guide based on a real-world validation pass against
the OpenStudyBuilder NeoDash corpus (17 dashboards · 12-46 widgets each).

- Chart type mapping table: add `text → markdown`, `circle_packing`/
  `circlePacking → circle-packing`, both `iframe`/`iFrame` casings,
  `choropleth`/`areamap` aliases, `graph3d`/`3d-graph` (2D render),
  `gantt`. Reflects #878.
- New 'Click actions' section: documents both the object-shape and
  string-shape ('set variable' + customizationValue) NeoDash emits.
  Reflects #881.
- New 'Conditional / rule-based styling' section: explicit operator
  mapping table for styleRules.
- New 'Auto-refresh' section: refreshRate (seconds) → cacheTtlMinutes.
- New 'Known limitations' section with the one residual gap surfaced
  by testing: only the first actionsRules rule per widget is converted
  (tracked in #882).
- Troubleshooting refreshed: schema-update files that aren't dashboards,
  text-widget JSON-fallback bug, click-action multi-rule limitation,
  silent auto-save bug.
- Tip at top points to the corpus and links to Known limitations.

No code changes. CI will validate the MDX build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(migration): correct two converter-behavior claims (CodeRabbit)

- Styling rules: the converter defaults missing colors to #000000
  (black), it doesn't drop the rule. Updated wording to reflect
  the actual fallback behavior.
- Auto-refresh: refreshRate→cacheTtlMinutes uses Math.round (nearest),
  not round-up. Show the exact formula plus concrete examples
  (30s→1m, 90s→2m, 300s→5m).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: alfredorubin96 <alfredo.rubin@neotechnology.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dashboard Dashboard management bug Something isn't working pkg:app Next.js application package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants