Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

Move [read only] to be next to the property as it is not clear at the moment #28

Open
yaustar opened this issue Mar 31, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@yaustar
Copy link
Collaborator

yaustar commented Mar 31, 2021

image

Looking at the list of properties, it is not clear if the read only tag is for the property above or below.

@yaustar yaustar added the enhancement New feature or request label Mar 31, 2021
@kungfooman
Copy link
Contributor

It's stemming from this template:

<div id="{{obj.name}}">
<span class="property">{{{type-link obj.type}}}</span><span class="property">{{obj.name}} <a class="font-icon" href="#{{obj.name}}">&#58216;</a></span>
<p>{{{parse obj.description}}}{{{readonly obj}}}</p>
{{#each obj.examples}}
{{> example content=this}}
{{/each}}
</div>

<p>{{{parse obj.description}}}</p> already contains a <p>...</p> and a paragraph as a block tag creates this newline break... however, we could just put the readonly annotation behind the span, which is an inline tag:

<div id="{{obj.name}}">
    <span class="property">{{{type-link obj.type}}}{{{readonly obj}}}</span>
    <span class="property">{{obj.name}} <a class="font-icon" href="#{{obj.name}}">&#58216;</a></span>
    <p>{{{parse obj.description}}}</p>
{{#each obj.examples}}
    {{> example content=this}}
{{/each}}
</div>

That looks like this:

image

(since readonlyness is type information, it should be next to the type anyway when possible, so we solve two issues with one little change here 🤔)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants