Skip to content

Document Datagrid column style options - #3297

Open
RTorres1980 wants to merge 1 commit into
perspective-dev:masterfrom
RTorres1980:docs-datagrid-column-styles
Open

RTorres1980 wants to merge 1 commit into
perspective-dev:masterfrom
RTorres1980:docs-datagrid-column-styles

Conversation

@RTorres1980

Copy link
Copy Markdown

Refs #2253.

#2253 asks for reference documentation of the Datagrid plugin's configuration options. Today the FAQ points readers to ColumnConfig in packages/viewer-datagrid/src/ts/types.ts, and the color and datetime rules are only described inside the save/restore guide.

This PR adds a Datagrid column styles page under the perspective-viewer docs that collects the per-column columns_config options in one place:

  • every key, with the column types that accept it;
  • the fg_mode / bg_mode values and defaults for numeric, string and date columns (from NUMBER_FG_MODES, NUMBER_BG_MODES, STRING_MODES, DATETIME_MODES and default_fg_mode / default_bg_mode);
  • the supported number_format options and their values (from number_string_format.rs);
  • the date_format presets and per-part fields (from datetime_column_style.rs);
  • links to the existing [Datetime formats] and [Colors, palettes and gradients] sections in save_restore.md for inheritance, migration and color-string grammar, rather than repeating them.

It also adds the page to SUMMARY.md under perspective-viewer and links it from the existing FAQ answer.

Docs only, no code changes. The new page is formatted with Prettier 3 using the repo's .prettierrc.json, and its anchor links match the existing headings. I haven't run the full build locally.

AI assistance: I used Claude (an AI assistant) to draft this page from the source files listed above. I reviewed it and checked each option against the source before opening the PR.

Add a reference page for the Datagrid's per-column `columns_config`
keys: which keys each column type accepts, the fg_mode/bg_mode values
and defaults per type, and the supported number_format and date_format
options. Link it from SUMMARY.md and the FAQ entry that previously
pointed only at types.ts.

Refs perspective-dev#2253

Signed-off-by: Robert Torres <rob.a.torres@live.com>

This branch has not been deployed

No deployments
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.

1 participant