ComPAIR is an open-source learning application being developed by the University of British Columbia's Centre for Teaching, Learning & Technology using a GPL-3.0 license. ComPAIR primarily uses default Bootstrap grids and styles. This basic style guide spells out application-specific uses of the styles.
Users in ComPAIR can be given one of three roles. Roles provide increasing levels of permission, which affect the UI. Students can manage—add, edit, delete—their own answers (during the designated answer period), comparisons (during the designated comparison period), comments, and replies (if enabled). Instructors can additionally manage and duplicate their own courses and assignments and edit users in their courses. System Administrators can additionally manage users and which users can access which courses.
There are three main types of objects in the application: courses, assignments, and users. These objects may have slightly different styles applied, as noted in the sections below. When new objects are created, use the term "Add"; when editing, "Edit"; when copying, "Duplicate"; and when removing, "Delete" (and deleting always triggers a confirmation message before the action is performed).
Object conventions are often applied to the four primary assignment interactions—answering, comparing, replying, and commenting—too, and these have additional conventions of their own, as noted in the section below.
Jump to: Global Administration Bar | Breadcrumbs | Headings | .intro-text Paragraphs | Object Lists | Assignment Interactions | Buttons | Forms | Modal Pop-ups | Confirmation Messages | .collapsible-content Elements | .labels Tagging
The global adminstration bar appears at the top of every page and contains varying amounts of administrative functions (depending on the user's application role) that are not context specific. Options on the bar appear with an icon on the left and then "First Letter Each Word Capitalized" text written as verb+noun and matching the first two words of the resulting page's h1 heading. Instructors currently see: Download Reports and Add Course. System Administrators additionally see: Add User, Manage User, and Manage LTI.
All users see their display name on the right-hand side of the bar, with a dropdown that provides access to their user profile and an option to log out. The dropdown options follow the display conventions above, except they do not have to follow the verb+noun structure.
Breadcrumbs function as the main navigation for the application and appear just below the global administration bar for every page except the home page. The home page is always the first link shown, with all child pages listed and linked up until the current page. The current page is listed but not linked.
The breadcrumb labels should match the h1 on each page. These are dynamically generated based on page location and hard-coded only in the compair-config.js
file, though additional modifications are also made on-the-fly (using breadcrumb.options) in individual controllers (to add object names in place of generic text).
The application currently uses five levels of headings.
<i class="fa fa-book" aria-hidden="true"></i>
before course name<i class="fa fa-comments" aria-hidden="true"></i>
before assignment name<i class="fa fa-user" aria-hidden="true"></i>
before user name<i class="fa fa-gavel" aria-hidden="true"></i>
before criterion title<i class="fa fa-user" aria-hidden="true"></i>
before user nameWhen appropriate, one or more p tags with class="intro-text"
appear just below the page's h1 or first h2. This text is slightly larger in display and meant to provide an introduction to the page or section. Text to emphasize may be bolded here.
When objects appear as a list of items (i.e., home page with courses, course pages with assignments, management pages with users), they share some commonalities in display.
#ffffff
and #f9f9f9
Filters of various types are used to affect the list of objects and make it easier to locate a specific object. These appear in the upper right corner before the list starts. When long enough, filters shown as drop-down selects include a search function.
Some of this styling is applied to other lists of items in the application as well. For example, the display of assignment interactions for answers and comments also follows these conventions.
Outside of managing an assignment, users can interact with assignments in four main ways: answering, comparing answer pairs, replying to answers, and commenting on the assignment. When the results of these activities are displayed in the application, they follow the same introductory line. Before the answer, comparison, reply, or comment, there should be text containing (from left to right):
class="label-default"
—to indicate if this is an instructor/teaching assistant (otherwise no label shown)<i class="glyphicon glyphicon-lock"></i>
after bolded text<i class="glyphicon glyphicon-eye-open"></i>
after bolded textMMM D @ h:mm a
:"Tabs are used to help users navigate these interactions for assignments. In each assignment, Students see tabs for Answers (answers and related replies aka peer feedback), Your Work + Feedback (their answer, related replies, their comparisons), and Help Comments (comments about the assignment). Instructors/Admins see tabs for Answers (answers and related replies aka peer feedback), Comparisons (comparisons grouped by student including answer pairs seen, answers chosen per criterion, and peer feedback given), Help Comments (comments about the assignment), and Participation (summary of student interactions).
Answers and comments follow the display conventions for object lists as noted above. Actions Instructors/Admins can take on answers include Star (add to instructor's top picks list), Edit, and Delete; the same applies to comments except without the first option.
The application primarily uses four types of buttons. All button text is "First Letter Each Word Capitalized".
class="btn-success"
: Indicates a primary action a user must take to complete an activity; used as the final button in submitting all forms (including inline forms) and for "View Course", "Answer/Finish Answer", and "Compare Pairs" buttons; form buttons are center aligned; other buttons are right aligned when practical; no icons added; larger sizing preferredclass="btn-primary"
: Indicates a secondary action a user can take; used to present contextual administrative options and optional student activities, e.g., adding assignments, editing user profiles, replying to answers; also used for selection of answer per criterion in comparison form; buttons are right aligned when practical; must contain a related icon to the left of the text; medium sizing preferredclass="btn-default"
: Indicates one of two or more options where de-emphasis of button(s) is desired; used for buttons to save drafts of answers and comparisons and to make choices during duplication process; as save button, always center aligned and to the left of the "Submit" button; no icons added; sizing should be appropriate to surrounding contextclass="btn-info"
: Indicates access to additional information; used for button to open pop-ups of attachments or links, to read more answer text, and to see the student comparison preview; no icons added; smaller sizing preferredUnless displayed inline, forms always use fieldsets with legends to organize the form fields. Additionally, forms share other styles.
class="instructional-text"
can be used to contain explanatory text for the fieldset; this must appear within the fieldset and can contain bolded or dynamic text to improve guidance<hr>
linesclass="text-muted"
class="required-star"
compair-field-with-feedback
directive to add dynamic green/red highlighting and iconsclass="alert alert-info"
Modal pop-ups are used to help users view or interact with a page when it is a sub-step of the page they are on, e.g, looking at an attachment, adding a group, replying to an answer, commenting on an assignment. For these instances, it is better (or required) that users remain on the same page and at the same place on the page then have to navigate away to complete an action and then return back.
Colour-coded messages pop up to confirm (green) or warn (orange or red) about actions a user has taken in the application (e.g., saving, deleting). Messages should be phrased as "Subject Past Tense Action" (with "First Letter Each Word Capitalized") with no punctuation, followed by any necessary information to explain the message (in sentence form with appropriate punctuation). Whenever possible, the heading text should match with the text of the link or button clicked. For example: clicking "Save Draft" for an answer returns a heading of "Answer Draft Saved" followed by the text "Remember to submit your answer before the deadline."
Content pieces can be designed to collapse/expand with show/hide functions in Angular and class="collapsible-content"
on the element to toggle. The content is always displayed under linked (blue) text and should contain information that can be progressively revealed (i.e., can be sought optionally). A chevron appears to the left of this text, facing right—<i class="fa fa-chevron-right"></i>
—when the content is collapsed/hidden and facing down—<i class="fa fa-chevron-down"></i>
—when the content is expanded/shown.
If the progressive reveal is part of filling out a form—that is, the user needs to confirm the addition of something to the form— a checkbox should be used in place of this convention.
When the assignment itself is being displayed in this way, a containing div with class="standalone-assignment"
should be applied, as well as a h2/h3 heading with the assignment name preceded by the icon <i class="fa fa-comments" aria-hidden="true"></i>
. This will style the assignment similar to how it appears on the assignment page, to help with the user's recognition that this is the assignment.
The application uses two kinds of labels to tag information.
class="label-warning"
: Identifies important information as related to assignments; used for outstanding work, rounds remaining, feedback received, and answer scores; appears as part of metadata except in case of rounds remaining (where it is part of the heading)class="label-default"
: Identifies instructors/teaching assistants in assignments; used when instructors/TAs answer, reply, or comment; appears as part of metadata