Uh oh!
There was an error while loading. Please reload this page.
fix(currency): resolve tenant default currency across long-tail renderers - #1858
Merged
Conversation
…rers Phase 2b of the currency-resolution work (ADR-0053). The field/cell renderers already funnelled through resolveFieldCurrency + useLocalization (#1856); this unifies the remaining renderers onto the same chain (explicit field currency -> currencyConfig.defaultCurrency -> legacy defaultCurrency -> tenant localization.currency -> plain number): - plugin-dashboard: ObjectMetricWidget inferred currency, ObjectDataTable symbol-format fallback. - plugin-grid: useColumnSummary footer + ObjectGrid compact/name-inferred cells. - plugin-detail: DetailView summary metrics. - plugin-gantt: ObjectGantt currency tooltips. - components: element:number (format:'currency') — tenant default + tenant locale instead of a baked-in USD. resolveFieldCurrency moves to @object-ui/i18n (co-located with useLocalization, which supplies the tenant default); @object-ui/fields re-exports it so the existing import path is unchanged. No behavior change when no tenant currency is configured. Adds i18n unit + plugin-grid hook + dashboard table integration tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
What
Phase 2b (final) of the currency-resolution work (ADR-0053). The low-level field/cell renderers already funnel through
resolveFieldCurrency+useLocalization(#1856/#1857). This unifies the remaining ("long-tail") renderers onto the same resolution chain so a tenant'slocalization.currencyflows everywhere instead of being hard-coded toUSDor read from only one ofcurrency/defaultCurrency.Resolution chain (shared
resolveFieldCurrency): explicit fieldcurrency→currencyConfig.defaultCurrency→ legacydefaultCurrency→ tenantlocalization.currency→ plain number.Renderers migrated
plugin-dashboardObjectMetricWidgetinferred currencydefaultCurrency/currencyplugin-dashboardObjectDataTablesymbol-format cellplugin-griduseColumnSummaryfootercurrency/defaultCurrencyplugin-gridObjectGridcompact amount + name-inferred cellsplugin-detailDetailViewsummary metricscurrencyplugin-ganttObjectGanttcurrency tooltipscomponentselement:number(format: 'currency')USDArchitecture
resolveFieldCurrencymoves into@object-ui/i18n(co-located withuseLocalization, which supplies the tenant default);@object-ui/fieldsre-exports it, so the existing@object-ui/fieldsimport path is unchanged.@object-ui/i18nadded as a dep toplugin-grid/plugin-gantt/plugin-detail.Compatibility
No behavior change when no tenant currency is configured: a field that declares its own currency, or a deployment with no
localization.currency, renders exactly as before.element:numberkeepsUSDas the last-resort fallback.Tests
@object-ui/i18n—resolveFieldCurrencyprecedence (canonical home).@object-ui/plugin-grid—useColumnSummarytenant-default footer (renderHook +LocalizationProvider); explicit column currency still wins; plain number with no tenant.@object-ui/plugin-dashboard—ObjectDataTablerenders a currency-type column with the tenant default throughCurrencyCellRenderer.All touched-package suites green; type-check clean across all 7 packages.
🤖 Generated with Claude Code