-
Notifications
You must be signed in to change notification settings - Fork 2
Declarative & programmatic layout/style #14
Comments
Extending the first Pro argument: some of the relevant layout information IS already stored declaratively, namely sh:order and sh:group. So if we now come up with a competing approach that for example is based on a new top-down approach to defining a whole form at once, then what would happen with those existing annotations? An incremental design may be something like ex:firstName ... sh:relative .. ex:lastName ... right. |
@HolgerKnublauch Good point. I added the argument to the list. It should not be one or the other. We should figure out an elegant solution to combine both approaches. I expect one would use the declarative option exclusive or combined, declarative and programmatic. For example, the programmatic part could be assigning a group to a slot defined in HTML/JS. Inside the group, the declarative logic is used. A more tricky example: I want to change the font weight and background color for a single property. It could be done in three different ways, from plain programmatic (1) to declarative (3).
|
In today's meeting we discussed the use case of displaying text as monospaced vs normal font. This would apply to things like source code or markup. It would be best to express such info in the most generic and model-driven way as possible. One idea would be to have some kind of mimetype property that links to a MimeType instance, which then carries additional triples to inform whether something should be rendered in monospace, and also could be used as a validation constraint. If we don't want to introduce mimetypes, then user-defined datatypes would be an option. rdf:JSON is a good example here, which would both be used for validation and to determine how to best render and edit such values. |
Not sure I fully understand all the implication of the initial issue description, but here my thoughts:
|
As I missed that call, could you recap a takeaway from that discussion. Specifically, I find this specific decisions (font face) a purely styling matter. I would expect a property to be styleable either via custom properties or Shadow Parts I am not convinced, however, whether that should be the responsibility of the shape to declare or rather the component library itself |
The example that I have is that some strings are reStructuredText (some markdown). People would want to see them rendered in monospace (e.g. because indentation matters) but not the other string literals. |
If it's a separate property than maybe that would be a dedicated viewer? |
I am worried that would cause an explosion of viewers and editors, just for something that really ought to be a configurable attribute of these viewers. For example consider that you would need to have all these variations both for TextAreas and TextFields. Something like this may work
|
Gotcha. And I like the blank node as the means to extend/configure a component |
This issue is a follow-up to the discussion started in the Forms vs Views issue.
The discussion started based on an example of aligning two fields horizontally instead of vertically. That leads to the general topic of declarative vs. programmatic layout and style.
Declarative
Use case: Explorative, using ontology information and show/edit data aligned to the rest of an application.
Pro:
Con:
Programmatic
Use case: Application development, mainly based on custom-tailored shapes for a specific application/context.
Pro:
Con:
Based on the background of the participants, I expect the task force is interested in both options.
The text was updated successfully, but these errors were encountered: