#36: Modify renderers to allow specialization on slot types ---------------------------------------------------+------------------------ Reporter: sakhmechet | Owner: sakhmechet Type: enhancement | Status: new Priority: high | Milestone: 0.1 Component: weblocks | Version: pre-0.1 Keywords: renderers slots types dropdown custom | ---------------------------------------------------+------------------------ Currently specializing renderers to output various types in a custom manner (dropdowns for lists, checkboxes for booleans, etc.) is broken because when slots are set to nil, type information is lost.
We need to modify renderers to accept one more argument 'slot-type', and modify 'visit-object-slots' to pass this argument to renderers.
We also need to add common sense default specializations. Booleans should output checkboxes in forms and true/false in data renderers (instead of N/A which is done for nils now). Lists (sequences?) should render as dropdowns (or local suggest snippets) in forms. We also need to add some type aliases. For example 'one-of' types should render as radio buttons.
How will we render sequences in data renderers? Some options include rendering each item in a comma separated list, having a link to datagrid, etc.
#36: Modify renderers to allow specialization on slot types --------------------------+------------------------------------------------- Reporter: sakhmechet | Owner: sakhmechet Type: enhancement | Status: new Priority: medium | Milestone: 0.1 Component: weblocks | Version: pre-0.1 Resolution: | Keywords: renderers slots types dropdown custom --------------------------+------------------------------------------------- Changes (by sakhmechet):
* priority: high => medium
#36: Modify renderers to allow specialization on slot types --------------------------+------------------------------------------------- Reporter: sakhmechet | Owner: sakhmechet Type: enhancement | Status: new Priority: medium | Milestone: 0.1 Component: weblocks | Version: pre-0.1 Resolution: | Keywords: renderers slots types dropdown custom --------------------------+------------------------------------------------- Comment (by sakhmechet):
We have to think of a unified solution for humanize-typespec, invalid- input-error-message, and render-[form/data/table] as far as dealing with subclasses. If we simply pass symbols sniffed from deftype, all inheritance information will be lost. We should try find-class on those symbols first and use classes if possible.
#36: Modify renderers to allow specialization on slot types --------------------------+------------------------------------------------- Reporter: sakhmechet | Owner: sakhmechet Type: enhancement | Status: new Priority: medium | Milestone: 0.1 Component: weblocks | Version: pre-0.1 Resolution: | Keywords: renderers slots types dropdown custom --------------------------+------------------------------------------------- Comment (by sakhmechet):
Once we've added slot-type (and obj) to render-form/data/etc, we should add :maxlength attribute to 'render-form' obtained via 'max-raw-slot- input-length'.
#36: Modify renderers to allow specialization on slot types --------------------------+------------------------------------------------- Reporter: sakhmechet | Owner: sakhmechet Type: enhancement | Status: new Priority: medium | Milestone: 0.1 Component: weblocks | Version: pre-0.1 Resolution: | Keywords: renderers slots types dropdown custom --------------------------+------------------------------------------------- Comment (by sakhmechet):
We also need to apply typespec inspection mechanism to parse-slot-from- request, slot-in-request-empty-p, and object-satisfies-search-p. We should probably grep for slot-type to be sure.
#36: Modify renderers to allow specialization on slot types --------------------------+------------------------------------------------- Reporter: sakhmechet | Owner: sakhmechet Type: enhancement | Status: closed Priority: medium | Milestone: 0.1 Component: weblocks | Version: pre-0.1 Resolution: fixed | Keywords: renderers slots types dropdown custom --------------------------+------------------------------------------------- Changes (by sakhmechet):
* resolution: => fixed * status: new => closed
Comment:
Fixed by adding slot-type argument to relevant generic functions. Additionally, these generic functions have been modified to to have 'slot- management-generic-function' metaclass. This metaclass customizes generic function invocation in a way that properly pre-processes arguments to allow inheritance customization.
cl-weblocks-ticket@common-lisp.net