-
Notifications
You must be signed in to change notification settings - Fork 14
Creating an Entity
To ensure consistency, please adhere to the following standards when creating an entity:
First, create a GitHub issue, using the title of the entity as the title of the issue.
Within the issue, specify a generic template of the entity ("prototype"), adhering to the following standards:
- Only include the HTML required for the element (do not include the
htmlelement, for example) - Use HTML comments before an element to specify multiplicity (how many of an element)
- Use the pipe/or (
|) character to signify multiple possible values - Replace parameterized values with a description enclosed in curly brackets (
{}) - Include additional comments for further explanation
For example, here's a possible prototype for the gallery entity:
<figure>
<!-- 1..* -->
<ul|ol class="gallery">
<!-- 1..* -->
<li>
<!-- 1 -->
<a href="{Image 1 URL}">
<img src="{Image 1 Thumbnail URL}" alt="{Image 1 Alt Text}" />
</a>
</li>
</ul>
</figure>
When specifying multiplicity, use the following guide:
-
0zero exactly -
0..1zero or one -
0..*zero or more -
1..*one or more -
1one exactly
To reference another Web Blocks component from within a prototype, use the following syntax: <!-- [[ComponentName]] -->
For example, if you were referencing entity/blockquote from within another prototype:
<div class="example-component">
<!-- 0..1 -->
<!-- [[Entity/Nav/Blockquote]] -->
</div>Within the issue, also provide a description with the following:
- Basic definition of the entity
- Usages of the entity
- Specific features and options of the entity
- Responsive aspects of the entity
Upload screenshots of examples of the prototype from other websites (or from demos).
If you would like, you can also create a wiki page (where you can post free-form discussions and research about the topic).
When implementing the entity, create the following:
- A base definition in
src/core/definitions - A base adapter in
src/core/adapter - A Twitter Bootstrap adapter in
src/adapter/bootstrap
After implementing the entity, add the entity to the documentation (doc/page/api/entity)