Blogging Prompt Compact Card: show a real prompt#18572
Conversation
You can test the changes in Jetpack from this Pull Request by:
|
You can test the changes in WordPress from this Pull Request by:
|
wargcm
left a comment
There was a problem hiding this comment.
LGTM! Only a couple minor things.
| } | ||
|
|
||
| func configure(_ prompt: BloggingPrompt?) { | ||
| promptLabel.text = prompt?.text ?? nil |
There was a problem hiding this comment.
[Nitpick]: The ?? nil isn't needed here
| super.init() | ||
|
|
||
| listenForQuickStart() | ||
| fetchBloggingPrompt() |
There was a problem hiding this comment.
This would also end up being called on the 'Pages' screen since it uses this coordinator. It could probably be mitigated by either checking the presenting view controller or the number of actions. Or alternatively, moving the fetch to the same spot the header is created. What are your thoughts?
There was a problem hiding this comment.
This would also end up being called on the 'Pages' screen since it uses this coordinator.
Woops. Forgot that was different.
moving the fetch to the same spot the header is created
That was my original intent. However, since everything was dependent on the fetching, it led to a blackhole of completion blocks. The intent for fetching the prompt in init is to be sure there is a prompt before it is needed.
checking the presenting view controller
This felt a bit more fragile as things could move, the FAB could be added somewhere else, etc.
the number of actions
This felt like the best dynamic option. Door #3 it is!
|
Thanks @wargcm ! |
Ref: #18429
The compact prompt card now fetches one prompt and updates the card accordingly.
To test:
bloggingPromptsfeature flag.BloggingPromptsHeaderView:configure, setansweredtotrue.Regression Notes
Potential unintended areas of impact
N/A
What I did to test those areas of impact (or what existing automated tests I relied on)
N/A
What automated tests I added (or what prevented me from doing so)
N/A
PR submission checklist:
RELEASE-NOTES.txtif necessary.