10 KiB
Panel design guidelines
Core and Premium share one panel interface. Core owns the workspace layout, theme tokens, and reusable UI patterns. Both editions follow this guide. Reuse Core's templates and classes before adding a new style. If a pattern belongs in both editions, add it to Core and document it here. Premium should only use shared components available in its supported Core versions.
Page structure
- Extend the workspace template for signed-in pages. Follow HTTP Settings for pages with tabs. Put the page title and any page-wide actions first, then local tabs, then an account or domain selector if needed. The workspace divider separates these controls from the content.
- Keep the page title stable across tabs. Mark the current tab with
aria-current="page"and give the tab navigation an accessible label. - Use
.live-sectionsto space stacked sections. Keep live status refreshes separate from forms so they cannot erase edits or move keyboard focus. For background jobs, show progress and the terminal result in that same region. Keep recovery actions discoverable without a manual page refresh. - Show a background job beside the resource it affects without replacing its main status. For example, a configured mailbox can also have an import in progress. Replace the start action with a link to progress while work is active, then link to the result or recovery workflow. Keep refreshed content separate from inputs and focused actions.
- Account overviews should surface the current state and next step for each service. Keep metadata compact and link to the relevant workflow for the active role. Distinguish configuration from public reachability or delivery. Use measured usage only when the panel has it.
- Keep current configuration separate from history. Show one current record per resource in the working view. Use a History tab for time-stamped events and snapshots. Label historical details explicitly and keep live actions on the current resource or in a dedicated workflow. Keep history scoped to the viewer’s role, especially internal config.
- Keep low-level provisioning manifests and developer test bundles out of routine panel actions. Document their CLI export instead. Keep meaningful user downloads, such as backup archives, in the relevant workflow.
- Use
.surfacefor sections,.section-headingfor ordinary section headers, and.table-scrollaround tables. Keep horizontal overflow in the table wrapper and give empty or pending states an explicit label. - Extensions may add their running software versions to About Coulobre
through the optional
panel_extension_versionstemplate context. Pass pairs of plain-text labels and versions only after checking access to the extension. Core does not load or inspect extension packages.
Forms and actions
For a compact editor, use .surface.editor-surface on the card and
.editor on the form. Render Django fields with form.as_div so each
field, label, and validation message occupies one row in the shared grid.
Put the explanation and submit action inside the same grid. Don't add a
padded .section-heading inside an already padded editor card. The
heading, help, fields, and actions should share a left edge.
<section class="surface editor-surface" aria-labelledby="example-heading">
<form method="post" class="editor">
{% csrf_token %}
<header>
<h2 id="example-heading">Edit settings</h2>
<p class="muted">Explain what these settings affect.</p>
</header>
{{ form.as_div }}
<div class="form-actions">
<button type="submit" class="button primary">Save settings</button>
</div>
</form>
</section>
- Use one clear primary action per form. Put secondary actions such as
Cancel in the same
.form-actionsrow when they apply to that form. - Use short, sentence-case action labels. Keep field errors beside their inputs. Use visible labels and keep essential instructions available without relying on pointer hover.
- Prefer the shared compact type and spacing. Use the panel stylesheet and its theme tokens for type, color, spacing, and focus states. Avoid fixed control widths, inline styles, and page-specific font sizes.
- Keep short forms in a compact card. For longer forms, use
.editor-wideand group related fields with.editor-columnsand.editor-group. Use the available width where it saves scrolling. Groups stack in source and keyboard order when space is limited. Use the same approach for parallel summary cards. - For a small multi-selection, use a visible checklist with a fieldset label and an empty state. Keep create and refresh actions beside the picker. Refresh the options without clearing selections or other edits.
Resource actions
- Style explicit resource actions as buttons. Use
.button secondary compactfor row-level actions such as Import mail, Change password, and Manage logins. Use.button danger compactfor opening a removal workflow. Keep the final destructive confirmation visually distinct. - Keep a record name and its secondary identifier in one table cell. Use a wrapping row when space permits, and omit the identifier when it repeats the name. The record name remains the link. The local and cluster hosting inventories use a separate, right-aligned Primary domain column immediately before Status for easy comparison.
- Group table actions in a wrapping
.table-actionscontainer. Center them vertically within the row and allow labels to wrap instead of widening the whole table. Keep overflow within.table-scroll. Use.form-actionsfor submit and cancel controls, and keep a single full-size primary action in the page or section header when applicable. - Keep ordinary navigation, record names, and contextual help as links. An
action that opens a form, confirmation page, or download is still an
<a href>styled as a button. An action that submits the change uses a native<button type="submit">in its existing POST form. - Show only actions available in the active workspace. For example, give eligible operators Sign in as customer for a read-only preview and Manage as customer for delegated hosting work. Give managers direct actions for assigned hosting and invitations without impersonation.
- During impersonation, identify the customer and session mode in a persistent banner. Replace the sidebar workspace switcher with Leave impersonation, and keep it available when mobile navigation is closed.
Checkboxes and radio choices
Place the native control before its label, on the same row. The visible label should toggle the control, and a long label should wrap underneath its own text. Keep descriptions and errors below the label text. Preserve Django's label association, error state, and description IDs.
- For Django-generated forms, use
form.as_div. When rendering a single bound field, putfield.as_field_groupin its own wrapper. The shared stylesheet aligns the control and label without replacing the widget. - For a handwritten confirmation, wrap the input and text in one label. Keep radio choices and multi-checkbox groups in a fieldset with a visible legend naming the group.
- Keep a compound control, such as a numeric quota with Unlimited,
together in
.limit-control. Keep Unlimited unbroken. When the numeric input and checkbox cannot sit side by side, wrap the checkbox and its label as one unit. - Use the shared stylesheet in both Core and Premium. Check click and keyboard operation, wrapping, and focus in both themes at a narrow width.
<label><input type="checkbox" name="confirm" required> Confirm this change</label>
Action feedback
Use Django messages for the immediate outcome of signed-in actions. The shared shell displays them as dismissible notifications with JavaScript and in the page flow without it. Distinguish queued from complete. Keep validation next to the relevant field and show a clear summary near the start of long forms. Don't make notifications the only place to find errors, progress, or recovery instructions.
Live regions may opt in to a notification on a meaningful state transition
using data-live-state, data-live-notice and an optional
data-live-notice-level. Notify only once for a transition, not for each
poll. Keep server or cluster announcements and impersonation indicators
in the page.
Dependent operations
Show a blocked prerequisite beside the resource that needs it. Put the reason and retry action there for operators with the relevant permission. Give customers a short next step without showing internal service details.
Import previews
Separate a read-only preview from the action that starts a copy. Identify the source and destination, show the snapshot totals first, and put the per-folder or per-item breakdown below. Label partial counts and missing estimates explicitly. Distinguish the full source inventory from work remaining after a checkpoint. Do not display credentials or source content. Distinguish a matching existing account from a requested new account by name and domain. Show new-account settings only for that choice when JavaScript is available, and validate both paths on the server. Keep the selected destination visible while a job is queued. Results separate completed, unconfirmed, and unrequested work, with links to review or finish setup. For selective imports, put editable choices below the inventory and keep them outside auto-refreshing status regions. State explicitly which choices affect the destination, which are skipped and whether failures can leave completed steps in place.
Review a UI change
Compare the result with a Core page that serves the same purpose. In light and dark mode, check desktop and narrow widths, keyboard focus, and fields with validation errors. Try long domains, identifiers, and filenames. Text should stay readable, controls should remain inside their cards, and wide tables should scroll within their wrapper. Verify empty and populated states for lists. For Premium changes, use the same checks against the supported Core layout before introducing a new pattern.