feat(models): allow raw_number cells in TableBlock rows - #1964
Open
zimeg wants to merge 3 commits into
Open
Conversation
The table-block reference documents table cells as `rich_text`, `raw_text`, or `raw_number`, but `TableBlock.rows` accepted only `RawTextObject` and `RichTextBlock`, and its docstring said only "raw_text or rich_text". - Add the `RawNumberObject` composition object (`type: raw_number`, `value`, `text`) — the same definition introduced by the data_table PR #1900, so the two share one cell object and whichever lands second drops the duplicate. - Add `RawNumberObject` to `TableBlock.rows` and export it from the package. - Correct the `TableBlock.rows` docstring to match the docs. - Add `RawNumberObject` unit coverage and `raw_number` table-cell tests. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Place RawNumberObjectTests before RawTextObjectTests so the two adjacent Raw* test classes follow the same order as basic_components.py, where RawNumberObject is defined ahead of RawTextObject. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1964 +/- ##
==========================================
+ Coverage 84.13% 84.15% +0.01%
==========================================
Files 118 118
Lines 13556 13566 +10
==========================================
+ Hits 11406 11416 +10
Misses 2150 2150 ☔ View full report in Codecov by Harness. |
zimeg
commented
Sep 10, 2026
| return len(self.text) >= 1 | ||
|
|
||
|
|
||
| class RawTextObject(TextObject): |
Member
Author
There was a problem hiding this comment.
🎲 note: This and the RawNumberObject above might later be moved to tests for composition objects perhaps?
zimeg
marked this pull request as ready for review
September 10, 2026 01:00
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
This pull request fixes the
TableBlockmodel inslack_sdk.models.blocksto allowraw_numbercells, which the table-block reference documents but the model omitted.rich_text,raw_text, orraw_number", butTableBlock.rowsaccepted onlyRawTextObject | RichTextBlock(noraw_number) and its docstring said only "raw_text or rich_text".RawNumberObjectcomposition object (type: 'raw_number',value,text) — the same definition introduced by thedata_tablePR feat(models): add data_table Block Kit block #1900, so the two share one cell object and whichever lands second drops the duplicate in a trivial merge.RawNumberObjecttoTableBlock.rows, exports it from theblockspackage, and corrects theTableBlockdocstring to match the docs.RawNumberObjectunit coverage andraw_numbertable-cell tests (including acolumn_settings+raw_numbercombination).Depends on #1900 (which introduces
RawNumberObjectfor the net-newdata_tableblock); expected to rebase cleanly and drop the duplicate once #1900 lands. Mirrors the node-slack-sdk change in slackapi/node-slack-sdk#2737.Category (place an
xin each of the[ ])slack_sdk.models(UI component builders)Requirements
./scripts/run_validation.shafter making the changes.