Skip to content

WIP - blueprints after generic_input_renderer#31

Open
thet wants to merge 7 commits intomasterfrom
thet-bpinputrenderer
Open

WIP - blueprints after generic_input_renderer#31
thet wants to merge 7 commits intomasterfrom
thet-bpinputrenderer

Conversation

@thet
Copy link
Member

@thet thet commented Feb 23, 2017

When creating a blueprint chain with a factory, allow blueprints defined after blueprints based in generic_input_renderer.

Work in progress, because there is a failing test.

@rnixx
Copy link
Member

rnixx commented Feb 23, 2017

Looks useful. Which test is failing?

…ned after blueprints based in ``generic_input_renderer``.
@thet thet force-pushed the thet-bpinputrenderer branch from 79f0398 to 637b4f1 Compare February 23, 2017 23:27
rendered = rendered + (data.rendered or u'')
else:
rendered = (data.rendered or u'') + rendered
return rendered
Copy link
Member

Choose a reason for hiding this comment

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

input_generic_renderer is supposed only to render an input tag, no matter whether data already contains rendered markup, please revert

rendered += data.tag('input', **input_attrs)
else:
rendered += input_generic_renderer(widget, data)
rendered = input_generic_renderer(widget, data, pos='after')
Copy link
Member

Choose a reason for hiding this comment

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

See above, if position really needs to be set here hardcoded (for what exactly?) it should be done here, otherwise revert please

'inner-before'= <newtag>message rendered</newtag>
'inner-after'= <newtag>rendered message</newtag>
"""
rendered = rendered or u''
Copy link
Member

Choose a reason for hiding this comment

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

is it possible that rendered is something other than string here?

Copy link
Member Author

Choose a reason for hiding this comment

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

IIRC, rendered can also be UNSET

@managedprops('min', 'max', 'step', *managed_props__input_full)
def number_edit_renderer(widget, data):
return input_generic_renderer(widget, data)

Copy link
Member

Choose a reason for hiding this comment

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

No need for dedicated number_edit_renderer. min max and step managed props are defined for number_extractor, and managed props gets aggregated

factory.defaults['text.disabled'] = False
factory.doc['props']['text.disabled'] = """\
Flag input field is disabled.
"""
Copy link
Member

Choose a reason for hiding this comment

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

Please readd


@managedprops('data', 'title', 'size', 'disabled', 'autofocus',
'placeholder', 'autocomplete', *css_managed_props)
@managedprops(*managed_props__input_full)
Copy link
Member

Choose a reason for hiding this comment

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

needs to be double checked


@managedprops('data', 'title', 'size', 'disabled', 'autofocus',
'placeholder', 'autocomplete', *css_managed_props)
@managedprops(*managed_props__input_common)
Copy link
Member

Choose a reason for hiding this comment

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

needs to be double checked


@managedprops('data', 'title', 'size', 'disabled', 'autofocus',
'format', 'disabled', 'checked', *css_managed_props)
@managedprops('format', *managed_props__input_common)
Copy link
Member

Choose a reason for hiding this comment

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

needs to be double checked

factory.defaults['checkbox.disabled'] = False
factory.doc['props']['checkbox.disabled'] = """\
Flag whether checkbox is disabled.
"""
Copy link
Member

Choose a reason for hiding this comment

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

please readd


@managedprops('accept', 'placeholder', 'autofocus',
'required', *css_managed_props)
@managedprops('accept', *managed_props__input_common)
Copy link
Member

Choose a reason for hiding this comment

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

needs to be double checked

@managedprops('label', 'class', 'action', 'handler',
'next', 'skip', 'expression')
@managedprops('label', 'action', 'handler', 'next', 'skip', 'expression',
*managed_props__input_common)
Copy link
Member

Choose a reason for hiding this comment

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

needs to be double checked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants