Skip to content

feat(models): model the datetimepicker, timezone, rich text, and file view state values - #2045

Merged
WilliamBergamin merged 1 commit into
mainfrom
feat/view-state-value-fields
Nov 16, 2026
Merged

WilliamBergamin merged 1 commit into
mainfrom
feat/view-state-value-fields

Conversation

@WilliamBergamin

Copy link
Copy Markdown
Contributor

Summary

This pull request models the selected_date_time, timezone, rich_text_value, and files view state values on ViewStateValue, so they read back and round-trip through to_dict().

Testing

view_modal_011.json is a real view_submission view captured from a developer sandbox, with IDs and URLs replaced by fakes. To reproduce it:

  1. Run a Bolt app whose modal has a datetimepicker, a timepicker with timezone set, a rich_text_input, and a file_input.
  2. Fill in every field and submit.
  3. Confirm that View(**body["view"]).to_dict()["state"] equals body["view"]["state"].

The fixture leaves out max_file_size_bytes on the file_input element, which FileInputElement doesn't model yet. That fix can land in a separate PR.

Category

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.signature (Request Signature Verifier)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.models (UI component builders)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.rtm_v2 (RTM client)
  • /docs (Documents)
  • /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I have signed the Salesforce CLA (required before your PR can be reviewed or merged).
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

🤖 Generated with Claude Code

… view state values

ViewStateValue now takes selected_date_time, timezone, rich_text_value,
and files as named attributes, so they read back and serialize instead
of landing in additional_attributes and being dropped by to_dict().

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@codecov

codecov Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.47%. Comparing base (4639eee) to head (255905f).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2045   +/-   ##
=======================================
  Coverage   84.47%   84.47%           
=======================================
  Files         118      118           
  Lines       14035    14039    +4     
=======================================
+ Hits        11856    11860    +4     
  Misses       2179     2179           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@WilliamBergamin WilliamBergamin self-assigned this Nov 16, 2026
@WilliamBergamin WilliamBergamin added this to the 3.47.1 milestone Nov 16, 2026
@WilliamBergamin
WilliamBergamin marked this pull request as ready for review November 16, 2026 19:01
@WilliamBergamin
WilliamBergamin requested a review from a team as a code owner November 16, 2026 19:01
@WilliamBergamin
WilliamBergamin enabled auto-merge (squash) November 16, 2026 19:02
@zimeg zimeg added enhancement M-T: A feature request for new functionality semver:minor labels Nov 16, 2026

@zimeg zimeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧱 @WilliamBergamin LGTM! Nice to have these four state values reading back and round-tripping through to_dict() now, and the captured view_submission fixture is a great check for it 🧪

@WilliamBergamin
WilliamBergamin merged commit 6d3569e into main Nov 16, 2026
19 checks passed
@WilliamBergamin
WilliamBergamin deleted the feat/view-state-value-fields branch November 16, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality models semver:minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants