nhsuk / wagtail-nhsuk-frontend

A wagtail implementation of the NHS.UK frontend library
MIT License
21 stars 13 forks source link

Allow blocks inside Care Cards #145

Closed beseven closed 4 years ago

beseven commented 5 years ago

Following suit from https://github.com/nhsuk/wagtail-nhsuk-frontend/issues/144 and given there is a need for (at least) a Details block inside a care card as part of the work undertaken as part of Improvements to urgent care signposting (Internal: https://jira.service.nhs.uk/browse/TM-715 & https://confluence.service.nhs.uk/display/CIT/TM-386+Fix+a+date+for+Design+Governance+Board) and pain scale work, the following proposal is put forward.

At the moment, the body of our CareCard only allows richtext. Should we change body to be a streamblock so that other components can go inside the details dropdown?

class CareCardBlock(FlattenValueContext, StructBlock):
   ...
    title = CharBlock(required=True)
    body = RichTextBlock(required=True)
   ...
    class Meta:
        template = 'wagtailnhsukfrontend/care_card.html'

https://github.com/nhsuk/wagtail-nhsuk-frontend/blob/master/wagtailnhsukfrontend/blocks.py#L33

alexparsons07 commented 5 years ago

The Design Working Group discussed this issue on 21/10/19. Feedback as follows: