Skip to content

Add row visibility metadata to sheet table data#868

Merged
YusukeHirao merged 5 commits intodevfrom
claude/sheettable-hidden-rows-XPpEX
Mar 24, 2026
Merged

Add row visibility metadata to sheet table data#868
YusukeHirao merged 5 commits intodevfrom
claude/sheettable-hidden-rows-XPpEX

Conversation

@YusukeHirao
Copy link
Copy Markdown
Member

@YusukeHirao YusukeHirao commented Mar 24, 2026

Summary

This change adds support for retrieving and exposing row visibility metadata (hidden by user or filter) when fetching data from Google Sheets. Each row in the returned data now includes _hiddenByUser and _hiddenByFilter boolean flags.

closes: #865

Key Changes

  • New getRowMetadata() method in Sheet class: Fetches row metadata from the Google Sheets API using grid data, extracting hidden state information for each row
  • Parallel data fetching: Modified SheetTable.read() to fetch row data and metadata concurrently using Promise.all() for improved performance
  • Enhanced data structure: Each mapped row now includes _hiddenByUser and _hiddenByFilter properties alongside the regular column data
  • Type safety improvements: Updated type annotations to properly reflect the new metadata fields in the returned data structure

Implementation Details

  • Row metadata is fetched via the getWithGridData() API call on a single column range to minimize data transfer
  • Metadata is mapped to a simplified structure with boolean flags (defaulting to false if not present)
  • The metadata is correlated with data rows by index during the mapping process

https://claude.ai/code/session_01RTFQ6jWKWVC5vFUBQPoAm1

claude added 5 commits March 24, 2026 05:26
Add Sheet.getRowMetadata() to fetch hiddenByUser/hiddenByFilter from
Google Sheets API rowMetadata. Each row returned by SheetTable.getData()
now includes _hiddenByUser and _hiddenByFilter boolean flags.

Closes #865

https://claude.ai/code/session_01RTFQ6jWKWVC5vFUBQPoAm1
Rename _hiddenByUser/_hiddenByFilter to hiddenByUser/hiddenByFilter
to match Google Sheets API property names directly.

https://claude.ai/code/session_01RTFQ6jWKWVC5vFUBQPoAm1
Add unit tests covering hiddenByUser/hiddenByFilter combinations,
empty rowMetadata, missing sheets data, and range parameter passing.
Also improve type safety of getData() by using spread instead of
Record<string, unknown>.

https://claude.ai/code/session_01RTFQ6jWKWVC5vFUBQPoAm1
Document hiddenByUser/hiddenByFilter semantics and add reference
link to Google Sheets API DimensionProperties.

https://claude.ai/code/session_01RTFQ6jWKWVC5vFUBQPoAm1
Add documentation for HeaderCell, SheetTableOptions, SearchTableHeaders,
DefineHeader, SheetTable class and its public methods, and internal
helper functions (getHeaders, getClmName). Add @returns to getRowMetadata.

https://claude.ai/code/session_01RTFQ6jWKWVC5vFUBQPoAm1
@YusukeHirao YusukeHirao merged commit a9ef527 into dev Mar 24, 2026
2 checks passed
@YusukeHirao YusukeHirao deleted the claude/sheettable-hidden-rows-XPpEX branch March 24, 2026 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SheetTable.getData()の戻り値に行の非表示状態を含める

2 participants