#401 Allow using other tags than input in the widget config
Merged by abompard. Opened by abompard.
abompard/fedora-hubs feature/widget-params  into  develop

Download 401.patch

Currently if you need anything different from an input field for your widget parameter, you need to setup a React-based widget. It's a bit sad. This PR lets you use, for example, textarea tags for your parameters by just setting render_tag = "textarea" in your parameter definition.

Do these need to be class attributes? It's a bit confusing that they are class attributes here but become instance attributes below (the call to setattr). Is the goal to have these be defaults? If so, I recommend setting them before the for loop in __init__().

Why not just have __init__() explicitly accepts these parameters with defaults?

I recommend adding docblocks to to_json() and __init__().

Just a few optional suggestions, feel free to merge!

rebased onto b4a38c0f1f308d9c0c4269a32926c1cd92f98f31

Alright, I applied your suggestions, thanks for the review!

rebased onto 452afefbb0e52b7d4d36057f5be9ad63fb8b6db5

Pull-Request has been merged by abompard

Metadata