QuantEcon / QuantEcon/quantecon-plugins.mystmd

Directives: data-table, chips, badges, delta-list

Open
#6 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
0
Forks
0
Avg merge
2h 52m
Merged PRs (30d)
7

Description

Part of #2 (Phase 1a).

Problem. Four primitives present records: data-table (typed columns, optional sort key, nulls-last rule, tone hints per cell), chips (a grid of short labelled tokens), badges (a pill row of key facts) and delta-list (a signed before-and-after list). The compliance pages use them for the triage and ranked tables, clean-rule chips, weakest-category chips, pass badges and the trend section (brief §5.1, §5.6, landing). mystmd's csv-table is inline-only and unsortable; its file option is commented out in the fork (table.ts).

Proposed work.

  • data-table: emits a standard table node with class tokens and per-column metadata (type, sortable, default sort, null ordering) and per-cell tone; the default sort is applied at build time so the plain rendering is already ordered. Reads a :file: CSV or an inline body; column selection and renaming by options.
  • chips: emits div.dv-chips of span.dv-chip items with label, title, tone; falls back to an inline list.
  • badges: emits div.dv-badges of span.dv-badge items with label and tone; falls back to an inline list.
  • delta-list: emits div.dv-delta rows with id, label, from, to, direction; falls back to a table.

Acceptance criteria.

  • data-table output is a valid table node that myst-to-tex exports without error
  • Null ordering and default sort are applied in the emitted AST, not left to the renderer
  • Each directive has schema-validated fixture output and a documented option table

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the referenced mystmd packages/myst-directives/src/table.ts and the design brief sections §5.1 and §5.6. Identify the plugin's directive entry points and fixture setup, then verify that all four directives emit the specified AST structures, sorting and null ordering are applied before rendering, myst-to-tex succeeds, and schemas, fixtures, and option documentation are present.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.