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

Prefill card blocks #13527

Merged
merged 19 commits into from May 22, 2024
Merged

Prefill card blocks #13527

merged 19 commits into from May 22, 2024

Conversation

aptkingston
Copy link
Member

@aptkingston aptkingston commented Apr 19, 2024

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.
image

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.

Copy link
Member

@shogunpurple shogunpurple left a 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

Copy link
Contributor

@deanhannigan deanhannigan left a 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.

Copy link
Contributor

@deanhannigan deanhannigan left a comment

Choose a reason for hiding this comment

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

LGTM!

@aptkingston
Copy link
Member Author

LGTM, although since it's store logic would be good to have a unit test to cover

Done!

@aptkingston aptkingston merged commit 868989d into master May 22, 2024
10 checks passed
@aptkingston aptkingston deleted the prefill-cards branch May 22, 2024 07:22
@github-actions github-actions bot locked and limited conversation to collaborators May 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants