getkirby.com icon indicating copy to clipboard operation
getkirby.com copied to clipboard

Blueprint options: Indicate if prop accepts query syntax

Open texnixe opened this issue 4 years ago • 14 comments

It would be great if blueprint options had indicators if a property supports query syntax or not. Some do, some don't, and currently we always have to go to the source code or find out by trial and error.

texnixe avatar Nov 13 '21 13:11 texnixe

I guess we would have to fix this partially in the core, e.g. for field props. Just adding something like (support query syntax). There are likely other parts that are manual docs that we would need to treat as well.

distantnative avatar Nov 13 '21 14:11 distantnative

I guess we would have to fix this partially in the core, e.g. for field props.

Yes, I thought so. Should I add another issue in the core repo?

texnixe avatar Nov 13 '21 14:11 texnixe

I think it's fine here. We can look at it for 3.6.1 or 3.6.2 - shouldn't be too difficult to do

distantnative avatar Nov 13 '21 14:11 distantnative

How's the rule for custom docblock comments? Couldn't we just make up our own? Something like

/**
 * @queries true
 */

Our parser can parse all that stuff as far as I know.

bastianallgeier avatar Nov 13 '21 16:11 bastianallgeier

This would also make our lives a lot easier for the blueprint editor.

bastianallgeier avatar Nov 13 '21 16:11 bastianallgeier

We should be able to implement this custom docblock tag in our reference models.

distantnative avatar Nov 13 '21 16:11 distantnative

Maybe it would be cool to create a general concept for such custom tags. What would be useful for the docs and what would be useful for the editor?

bastianallgeier avatar Nov 13 '21 16:11 bastianallgeier

That would be great, to integrate all at once.

distantnative avatar Nov 13 '21 16:11 distantnative

The @queries tag should also be able to differentiate between props that are a query themselves and props that may use queries with the {{ }} syntax.

lukasbestle avatar Nov 14 '21 13:11 lukasbestle

@lukasbestle true, I'm just not sure how - I think this already causes some headache with users. We should find a way/words that convey the difference easily

distantnative avatar Mar 21 '22 13:03 distantnative

We could use a more generic tag like:

@string-type query
@string-type query-template
@string-type html
@string-type markdown
@string-type query-template html // combination of both
...

Open for a better name. :)

lukasbestle avatar Mar 31 '22 20:03 lukasbestle