-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP - blueprints after generic_input_renderer #31
base: master
Are you sure you want to change the base?
Conversation
Looks useful. Which test is failing? |
…ned after blueprints based in ``generic_input_renderer``.
79f0398
to
637b4f1
Compare
…mmon or full generic input renderer are used.
rendered = rendered + (data.rendered or u'') | ||
else: | ||
rendered = (data.rendered or u'') + rendered | ||
return rendered |
There was a problem hiding this comment.
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
@@ -333,7 +363,7 @@ def display_proxy_renderer(widget, data): | |||
input_attrs = input_attributes_full(widget, data, value=val) | |||
rendered += data.tag('input', **input_attrs) | |||
else: | |||
rendered += input_generic_renderer(widget, data) | |||
rendered = input_generic_renderer(widget, data, pos='after') |
There was a problem hiding this comment.
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'' |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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) | ||
|
There was a problem hiding this comment.
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
@@ -484,9 +514,6 @@ def text_edit_renderer(widget, data): | |||
factory.defaults['text.class'] = 'text' | |||
|
|||
factory.defaults['text.disabled'] = False | |||
factory.doc['props']['text.disabled'] = """\ | |||
Flag input field is disabled. | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please readd
@@ -448,8 +479,7 @@ def tag_renderer(widget, data): | |||
# text | |||
############################################################################### | |||
|
|||
@managedprops('data', 'title', 'size', 'disabled', 'autofocus', | |||
'placeholder', 'autocomplete', *css_managed_props) | |||
@managedprops(*managed_props__input_full) |
There was a problem hiding this comment.
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
@@ -856,8 +883,7 @@ def _pwd_value(widget, data): | |||
return attr_value('default', widget, data) | |||
|
|||
|
|||
@managedprops('data', 'title', 'size', 'disabled', 'autofocus', | |||
'placeholder', 'autocomplete', *css_managed_props) | |||
@managedprops(*managed_props__input_common) |
There was a problem hiding this comment.
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
@@ -958,8 +984,7 @@ def checkbox_extractor(widget, data): | |||
) | |||
|
|||
|
|||
@managedprops('data', 'title', 'size', 'disabled', 'autofocus', | |||
'format', 'disabled', 'checked', *css_managed_props) | |||
@managedprops('format', *managed_props__input_common) |
There was a problem hiding this comment.
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
@@ -1051,9 +1076,6 @@ def checkbox_display_renderer(widget, data): | |||
factory.defaults['checkbox.class'] = 'checkbox' | |||
|
|||
factory.defaults['checkbox.disabled'] = False | |||
factory.doc['props']['checkbox.disabled'] = """\ | |||
Flag whether checkbox is disabled. | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please readd
@@ -1435,8 +1457,7 @@ def file_extractor(widget, data): | |||
return value | |||
|
|||
|
|||
@managedprops('accept', 'placeholder', 'autofocus', | |||
'required', *css_managed_props) | |||
@managedprops('accept', *managed_props__input_common) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
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.