Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1428 Add rich_text classes to slack_sdk.models module #1431

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

seratch
Copy link
Member

@seratch seratch commented Nov 21, 2023

Summary

This pull request resolves #1428

Category (place an x in each of the [ ])

  • 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-src (Documents, have you run ./scripts/docs.sh?)
  • /docs-src-v2 (Documents, have you run ./scripts/docs-v2.sh?)
  • /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements (place an x in each [ ])

  • 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've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

@seratch seratch added enhancement M-T: A feature request for new functionality web-client Version: 3x labels Nov 21, 2023
@seratch seratch added this to the 3.25.0 milestone Nov 21, 2023
@seratch seratch self-assigned this Nov 21, 2023
Copy link

codecov bot commented Nov 21, 2023

Codecov Report

Attention: 24 lines in your changes are missing coverage. Please review.

Comparison is base (3e2d7e8) 85.46% compared to head (55ba50b) 85.43%.

Files Patch % Lines
slack_sdk/models/blocks/block_elements.py 84.31% 24 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1431      +/-   ##
==========================================
- Coverage   85.46%   85.43%   -0.04%     
==========================================
  Files         111      111              
  Lines       11945    12114     +169     
==========================================
+ Hits        10209    10349     +140     
- Misses       1736     1765      +29     

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

@seratch seratch merged commit 750d97c into slackapi:main Nov 21, 2023
10 checks passed
@seratch seratch deleted the issue-1428-rich-text branch November 21, 2023 05:50
@tj-smith47
Copy link

🔥🙏🏼🎉

@@ -604,3 +604,34 @@ def _validate_title_length(self):
@JsonValidator(f"author_name attribute cannot exceed {author_name_max_length} characters")
def _validate_author_name_length(self):
return self.author_name is None or len(self.author_name) < self.author_name_max_length


class RichTextBlock(Block):

Choose a reason for hiding this comment

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

I'm still having an issue with the parsing of this block. Looks like it needs to be added here.

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

@tj-smith47 Thanks for pointing this out. Here is a PR to fix it: #1433 We will release a new version shortly

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 Version: 3x web-client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add rich_text classes to slack_sdk.models module
2 participants