Skip to content

Application Conventions

Odaeus edited this page Oct 4, 2011 · 7 revisions

Application Conventions

These are currently proposed conventions and are subject to discussion and confirmation.

General Language

  • Strings are set via the localisation file.
  • British English spelling is preferred.
  • Prefer "Member" over "User" in the context of a group.
  • Actions should be labelled (such as on buttons) in simplest "ACTION SUBJECT" form, e.g.
    • "New member" -> link to new member form
    • "Create group" -> button on new group form
    • "Delete issue" -> delete an issue

Domain Terms

  • Group: Cycling Campaigning Organisation
  • Issue: A geographically-located problem raised by a User
  • Member: a User that belongs to one or more Groups.

Forms

  • Field horizontally adjacent to label by default.
  • Labels right-aligned.
  • Labels have first word capitalized and remaining lowercase.
  • Required fields are designated by an asterisk at the end of the label.
  • Labels do not have colons.
  • Submit buttons causing creation should say "Create ITEM".
  • Buttons causing an update should just say "Save" or "Save ITEM" (not "Update").
  • Form labels, hints, placeholders, and actions are set via the localisation file.

HTML and CSS

  • Use HTML5 elements where applicable.
  • Use dashes over underscores for class and ID names.
  • Give a container that represents a collection a meaningful name, such as a table of groups should have a class of "groups".
  • If required for JavaScript hooks or similar, use Rails' dom_id to name individual items in a model collection.

Spelling

  • "Email" over "e-mail"