Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Creating an Entity

loganfranken edited this page Feb 24, 2013 · 2 revisions

To ensure consistency, please adhere to the following standards when creating an entity:

GitHub Issue

First, create a GitHub issue, using the title of the entity as the title of the issue.

Prototype

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 html element, 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>

Multiplicity

When specifying multiplicity, use the following guide:

  • 0 zero exactly
  • 0..1 zero or one
  • 0..* zero or more
  • 1..* one or more
  • 1 one exactly

Referencing Other Components

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>

Basic Description

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

Example Images

Upload screenshots of examples of the prototype from other websites (or from demos).

Wiki Page

If you would like, you can also create a wiki page (where you can post free-form discussions and research about the topic).

Implementation

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

Documentation

After implementing the entity, add the entity to the documentation (doc/page/api/entity)

Clone this wiki locally