wagtail-deprecated / wagtail-react-streamfield

Powerful field for inserting multiple blocks with nesting. (NO LONGER MAINTAINED - See Wagtail 2.13 Release Notes)
https://wagtail.github.io/react-streamfield/public/
BSD 3-Clause "New" or "Revised" License
74 stars 23 forks source link

Rendering of the wagtail.core.blocks.StaticBlock #16

Closed leewesleyv closed 5 years ago

leewesleyv commented 6 years ago

Hi,

I've noticed an issue with the rendering of a StaticBlock using wagtail-react-streamfield==0.8.5 in combination with wagtail==2.2.2.

In these 2 cases I would be presented with an input field instead:

class LatestCoursesBlock(blocks.StructBlock):
    static = blocks.StaticBlock(admin_text="Latest courses: no configuration needed.")

    class Meta:
        template = 'latest_courses.html'
        icon = 'fa-graduation-cap'
screen shot 2018-10-15 at 17 47 44
class LatestCoursesBlock(blocks.StaticBlock):

    class Meta:
        template = 'latest_courses.html'
        admin_text = "Latest courses: no configuration needed."
        icon = 'fa-graduation-cap'
screen shot 2018-10-15 at 17 45 02

If you need more information I would be happy to supply it for you.

Thanks in regards!

nuljon commented 6 years ago

I have nearly identical experience with static block, instead of admin text I see empty input field in admin with wagtail v2.2.2:

class AuthorBlock(blocks.StaticBlock):

class Meta:
    icon = 'user'
    label = 'Author Profile'
    admin_text = '{label} : is configured by User Profile snippet'.format(label=label)
BertrandBordage commented 5 years ago

Fixed by e364e712fd0bf38325fc534e4f4f0f244fadaa18 and released in 0.9.0.

leewesleyv commented 5 years ago

Awesome!