Repository navigation
fix(cards): give the Family Goal and Photo Gallery cards a visual editor - #1219
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on the previous PR in this batch (fix/editor-colour-picker-targets).
fix(cards): give the Family Goal and Photo Gallery cards a visual editor
Opening either card in the dashboard editor showed "Visual editor not
supported", so they could only be set up in YAML. Both now open a visual
editor like the other TaskMate cards. The Family Goal card takes the
overview entity, an optional title (blank shows the goal's name), the
card design and the header colour. The Photo Gallery card takes the
activity entity, an optional title, how many photos to show (blank shows
them all), the card design and the header colour. Every label and helper
is translated, the card's defaults stay out of the YAML, and the YAML
editor round-trips. The editors load only when opened.
fix(cards): keep the Family Goal card's header when no goal is set
With no family goal switched on, the Family Goal card showed only its
"No family goal set" placeholder, so a title, header colour or design
picked in its editor made no visible difference in the preview. The
card now draws its header in every state: the title (or "Family goal"),
in the header colour and card design, with the placeholder beneath.
The Photo Gallery card already kept its header with no photos; it and
the Family Goal card now also keep it when the entity can't be found.
Testing