afv-library/skills/applying-slds/metadata/blueprints/components/trial-bar.yaml
Shelby Hubick 119dc668d5
@W-21965936@ Add applying and validating SLDS skills to afv-library (#187)
* feat: add SLDS applying and auditing quality skills

Two new skills for SLDS v2 compliance:
- applying-slds: guides artifact selection, styling hooks, utilities, icons
- auditing-slds-quality: scored quality audit with linter + static analysis

Made-with: Cursor

* refactor: rename auditing-slds-quality skill to validating-slds

Renames the skill directory and updates all references in
applying-slds/SKILL.md and applying-slds/checklists.md.

Made-with: Cursor

* fix: improve accuracy and add manual review gate across SLDS skills

Correct hook families, badge modifiers, and severity levels; add a
manual review gate to validating-slds so automated grades alone cannot
declare production readiness; make analyze-quality.cjs portable with
explicit --hooks-index flag; remove dead parseYaml code; add version
field to all three skill frontmatters.

Made-with: Cursor

* chore: retrigger CI

Made-with: Cursor

* fix: quote YAML descriptions and improve color hook disambiguation

- Quote description frontmatter in all three skills for valid YAML
  (inner double quotes now escaped)
- Strengthen Step 4 directive: MUST read color-hooks guide before
  choosing a hook — linter suggestions are unranked
- Add surface vs surface-container disambiguation table
- Add accent hook context table and state progression
- Add standalone-component exception for surface classification
- Add modal background example to examples.md
- Remove redundant brand-button example (covered by new context table)

Made-with: Cursor
2026-04-26 21:03:14 +05:30

113 lines
4.2 KiB
YAML

name: Trial Bar
description: A persistent notification banner that informs users about trial status, subscription expiration, or upgrade opportunities,
typically displayed at the top of the interface.
category: Feedback
slds_classes:
root: slds-trial-header
elements: []
modifiers: []
states:
- class: slds-is-open
description: Visible trial bar state
trigger: Applied when trial bar is displayed
- class: slds-is-closed
description: Hidden trial bar state
trigger: Applied when trial bar is dismissed
variants:
- name: Base
description: Standard trial notification bar
classes:
- slds-trial-header
usage_context: Default implementation for trial notifications
differences: Basic informational styling for trial status
- name: Warning
description: Warning trial bar for expiring trials
classes:
- slds-trial-header
usage_context: When trial is expiring soon
differences: Warning styling with urgency indicators
- name: Expired
description: Expired trial notification
classes:
- slds-trial-header
usage_context: When trial has expired
differences: Error styling for expired trial state
lightning_component:
name: No direct component
url: https://developer.salesforce.com/docs/component-library/overview/components
mapping_notes: No direct Lightning Base Component equivalent - typically implemented using custom components or lightning-notification
accessibility:
keyboard_support:
- Tab navigation to action buttons
- Enter/Space to activate actions
- Escape to dismiss if dismissible
screen_reader:
- Trial status and urgency announced
- Action options clearly described
- Dismissal capability communicated
aria_attributes:
- role='banner' for trial notification
- aria-label describing trial status
- aria-live for dynamic updates
- aria-hidden when dismissed
usage_guidelines:
when_to_use:
- For trial period notifications
- When subscription status needs attention
- For upgrade or renewal prompts
- To communicate time-sensitive offers
when_not_to_use:
- For general system notifications (use toast)
- For error messages (use alert)
- For one-time announcements
best_practices:
- Keep message concise and actionable
- Use appropriate urgency styling
- Provide clear call-to-action
- Allow dismissal when appropriate
- Update content based on trial status
common_mistakes:
- Overly aggressive or persistent notifications
- Unclear trial status or next steps
- Missing dismissal options
- Poor visual hierarchy
code_examples:
- title: Basic Trial Bar
description: Expired trial notification with limited access message
code: "<div class=\"slds-trial-header slds-is-open\" role=\"banner\" aria-label=\"Trial expired notification\">\n <div\
\ class=\"\">\n <div class=\"\">\n <span class=\"\">\n <svg class=\"slds-icon slds-icon_x-small\"\
\ aria-hidden=\"true\">\n <use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#error\"></use>\n\
\ </svg>\n </span>\n <span class=\"slds-text-body_regular\">\n <strong>Your trial\
\ has expired.</strong>\\ \n You now have limited access. Subscribe to restore full functionality.\n \
\ </span>\n </div>\n <div class=\"\">\n <button class=\"slds-button slds-button_brand slds-button_small\"\
>\n Subscribe Now\n </button>\n </div>\n </div>\n </div>\n"
dependencies:
css_files:
- trial-header.css
- button.css
- notification.css
javascript:
- trial-header.js
icons:
- utility-sprite.svg
other_components:
- button
- notification
related_components:
- name: Toast
relationship: alternative
description: Alternative for temporary notifications
- name: Alert
relationship: similar
description: Similar notification concept
- name: Global Header
relationship: container
description: Often positioned near global header
references:
official_docs: https://v1.lightningdesignsystem.com/components/trial-bar/
metadata:
version: 1.0.0
last_updated: '2025-11-12'
review_status: complete
notes: ' Cleaned invalid classes and CSS variables on 2025-11-12 using slds-plus.css as source of truth.'