fix(explorer): rail in reading order — statements first, canonical statement sort#224
Merged
Conversation
…ules, metrics, other The picker mirrored the list API's alphabetical block_type sort, which put metrics first and shuffled the statement family (BS, CF, Equity, IS). Groups now follow a financial report's reading order — the statements, their notes, the working papers behind them, derived analytics, everything else — and the statement family sorts canonically (BS, IS, CF, Equity, Comprehensive Income) with name sorts inside every other group. Unregistered block types (forecast) keep landing in Other.
The Actuals/scenario dropdown rendered on every block type, including the ones that ignore it (schedules, disclosures, the forecast container) and statements — where an F-1 scenario bind is a single sparse projected month (the BS slice carries only working-capital instants), more confusing than useful. It now renders only on metric blocks, where the scenario visibly extends the series with '(forecast)'-labeled columns — the same only-where-useful rule the compute bar follows. Statements rejoin when the statement-series view lands (fpa-operating-plan F-4). The ?scenario= URL param persists across selections, so flipping away and back keeps the chosen scenario.
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.
Summary
Two explorer polish fixes from live review:
Rail in reading order
The picker mirrored the list API's alphabetical
block_typesort: metrics first, statement family shuffled (BS, CF, Equity, IS).Scenario picker on metric blocks only
The Actuals/scenario dropdown rendered everywhere, including block types that ignore it — and statements, where an F-1 scenario bind is a single sparse projected month (the BS slice carries only working-capital instants), more confusing than useful. It now renders only on metric blocks, where a scenario visibly extends the series with "(forecast)"-labeled columns — the same only-where-useful rule the compute bar follows. Statements rejoin when the statement-series view lands (fpa-operating-plan F-4).
?scenario=persists across selections, so flipping away and back keeps the pick.Client-side only, no API changes. Default block selection (metric = the explorer home) unchanged.
Verification
npm run test:allgreen — new tests: group order + canonical statement order fed a deliberately shuffled list, forecast-in-Other, and scenario-picker visibility (shown on metric, hidden on statement + schedule, restored on return).