HubSpot / slack-client

An asynchronous HTTP client for Slack's web API
Apache License 2.0
115 stars 53 forks source link

Normalize Slack form element presentational data #256

Closed omotnyk closed 2 years ago

omotnyk commented 2 years ago

I implemented normalization of the data that serves informational purposes - label, hint, a placeholder. We don't want to normalize stuff like name or value because their values can be used as unique identifiers and this can break the consumer in a very unexpected way.

Example of previous behavior: Let's assume that the element label is limited to 24 characters. If we set aaaaaaaaaaaaaaaaaaaaaaaaaa(26 chars long) as a label, the model is going to fail on the build. Current behavior: We are going to show aaaaaaaaaaaaaaaaaaaaaa... instead to fit into the limit.

omotnyk commented 2 years ago

@zmarushchak-hs Your comments were addressed. Can you please take another look?