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
Prefill card blocks #13527
Prefill card blocks #13527
Conversation
…rly reset when changing datasource
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, although since it's store logic would be good to have a unit test to cover
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This a fantastic UX update! I threw every type of supported config at the CardBlock and it was always able to figure out the appropriate defaults on create. I did run into an issue with the new update behaviour which I mentioned in my comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…n update already invokes empty setting enrichment on every single component
Done! |
Description
This PR improves card blocks by pre-filling them with relevant bindings. Card titles will default to either the primary display column, if one exists, or else another "readable" type. Readable types are defined as strings, long form text, options, multi-options and numbers.
Card subtitles and descriptions are also filled in, if possible, with more readable fields. For description, we try to use a long form field if one exists.
Card image URLs are filled in with an attachment URL if possible, supporting both single and multi attachment lists.
These properties are all reset if you change the card datasource, so you'll always have working bindings.
Here's a newly created cards block, showing everything filled in. This is obviously test data so please excuse the stock images that are inconsistent with the text.
Obviously there's a bit of luck involved here since we are just guessing which columns to use (especially for subtitle and description) but it's very easy to change them.
Addresses
Launchcontrol
Improve card blocks by pre-filling settings.