Sheets: add selection stats (sum, average, count) to sheets bottom bar#493
Open
the-narwhal wants to merge 4639 commits into
Open
Sheets: add selection stats (sum, average, count) to sheets bottom bar#493the-narwhal wants to merge 4639 commits into
the-narwhal wants to merge 4639 commits into
Conversation
Prevent concurrent referral spotlight feature PUTs See merge request web/clients!24282
VPNPLG-58: Add payload and telemetry when forking the session See merge request web/clients!24135
fix: fix icon alignment in cancellation flow See merge request web/clients!24315
Add offer card UI components See merge request web/clients!24302
added temporary need content and config See merge request web/clients!24307
feat: workspace premium cancelation flow See merge request web/clients!24319
Add news subscription for Meet See merge request web/clients!24209
use the same setting menu for extension as for web See merge request web/clients!24241
INWEB-867: Add common setup for Slack API in the CI See merge request web/clients!24271
Add new permissions modals and stop requesting permissions automatically See merge request web/clients!24248
DRVWEB: Search blobs encryption/decryption See merge request web/clients!23888
[IDTEAM-5613]
[IDTEAM-5613] Add telemetry for sharing See merge request web/clients!24221
Limit sharing settings visibility only to admins on parent share See merge request web/clients!24326
[DRVWEB-4974] Album listing sdk See merge request web/clients!23946
Enable telemetry for Meet See merge request web/clients!24331
Fix a bug storing feature flags in cookie See merge request web/clients!24454
[DRVWEB-4967] delete legacy drive view See merge request web/clients!24263
NOISSUE: Adapt telemetry for tv flow See merge request web/clients!24405
Defer update prompt if user is in meeting See merge request web/clients!24450
Mail BYOE: hide lock icons in sent messages when `X-Pm-Byoe` header is present See merge request web/clients!24000
PostQuantumOptInModal: prompt for auth before committing the opt-in See merge request web/clients!24457
Add LoginLink member creation mode See merge request web/clients!24448
Show sum, average, and count in the bottom bar when multiple cells are selected, matching the behaviour of Google Sheets, Excel, and LibreOffice. This existed in the legacy UI via SheetStatus from @rowsncolumns/spreadsheet but was not ported to the new UI.
3a2ffcb to
8b49cee
Compare
25168a8 to
97c88ca
Compare
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.
What
Adds a selection statistics display to the Proton Sheets bottom bar, the sum, average, and count that appear in the bottom-right corner when you highlight multiple cells, matching the behaviour of Google Sheets, Excel, and LibreOffice Calc.
Why
This feature existed in the legacy UI via the
SheetStatuscomponent from@rowsncolumns/spreadsheet, but was never ported when the new UI was built. There was no comment or TODO indicating it was deliberately dropped, it appears to have simply been missed.How
SelectionStatsmemo component toBottomBar.tsx. It readsactiveSheetId,selections,merges, andgetEffectiveValuefromuseUI((ui) => ui.legacy.*)and renders the stats on the right side of the bar.useMemodependencies includegetEffectiveValue, which comes fromspreadsheetStateand gets a new reference after formula recalculation, so stats stay up to date without any extra wiring.selectionStats.tsmodule (no external dependencies) for clean testability.SheetTabsaflex-1 min-w-0class so it properly fills the available space and the stats are naturally pinned to the right.Behaviour
Sum: X Average: Y Count: ZSumandAveragereflect only numeric cells;Countreflects all non-empty cellsTesting
27 unit tests in
selectionStats.test.tscovering all of the above cases including edge cases forInfinity,NaN,false,0, floating-point accumulation artifacts, multi-range aggregation, merge deduplication, the cell cap, and locale-aware number formatting.