Repository navigation
Add plugin_config and columns_config defaults API - #3267
Merged
Merged
Conversation
texodus
force-pushed
the
config-defaults
branch
3 times, most recently
from
October 24, 2026 00:06
9f621f8 to
9491c99
Compare
Signed-off-by: Andrew Stein <steinlink@gmail.com>
texodus
force-pushed
the
config-defaults
branch
from
October 24, 2026 01:14
9491c99 to
144ccca
Compare
texodus
marked this pull request as ready for review
October 24, 2026 01:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new
plugin_configandcolumns_configdefaults API: static methods to<perspective-viewer>for overriding the plugin-declared default of anyplugin_configorcolumns_configkey, page-wide.Config defaults
setPluginConfigDefaults(defaults, options?)/setColumnConfigDefaults(defaults, options?)and theirget*counterparts.optionsfilters a default to apluginand (for columns) a columntype.nullremoves a key at any depth, or the whole slot.save(),saveWorkspace()andperspective-config-update. Defaults are never saved themselves, andrestore()/reset()don't touch them.timeZone/hour12. A default which sets only these keeps the adaptive (zoom-dependent) axis labels.Breaking:
date_formatdate_formatis now a flat subset ofIntl.DateTimeFormatOptions."disabled"and theformat: "custom"marker are removed; just omit the field.timeZoneandhour12inherit from defaults per key, the display fields (dateStyle/timeStyleor the per-part fields) as one group.restore(),addPanel()andrestoreWorkspace()and render identically. Third-party plugins which declare"disabled"in aDatetimeFormatcontrol default will need to be updated.Fixes
useGrouping(or any othernumber_formatfield) can now be set page-wide.Example
Display every
datetimecolumn in UTC, in every pluginNo thousands separators, everywhere or just Datagrid
integercolumnsPlugin config defaults, and removing them
date_formatmigration