Skip to content

Add error view mode and optional Font Awesome auto-include#5

Merged
MarcinOrlowski merged 5 commits intodevfrom
font-awesome-config
Nov 7, 2025
Merged

Add error view mode and optional Font Awesome auto-include#5
MarcinOrlowski merged 5 commits intodevfrom
font-awesome-config

Conversation

@MarcinOrlowski
Copy link
Owner

Summary

This PR adds two major features to DiscoDevBar:

  1. Error view mode - Display helpful messages when configuration issues occur
  2. Optional Font Awesome auto-include - Automatically include Font Awesome from CDN when needed

Changes

Error View Mode

  • Added error state to DiscoDevBarData with customizable error messages
  • Distinct red/orange styling for error banner via disco-devbar-error CSS class
  • Shows version and helpful link to GitHub when config file is not found
  • Flexible design allows for other error messages in the future

Font Awesome Configuration

  • Added optional font_awesome section to .disco-devbar.yaml configuration
  • Auto-includes Font Awesome from CDN when enabled
  • Configurable version (default: 6.5.1)
  • Safe defaults: disabled by default to avoid conflicts with existing installations
  • All configuration in one place alongside widgets

Example Configuration

font_awesome:
    enabled: true           # Enable auto-include from CDN (default: false)
    version: '6.5.1'        # Font Awesome version (optional, default: 6.5.1)

widgets:
    left:
        - icon: fa-database
          icon_type: fa
          url: /admin
        - icon: 🚀
          icon_type: text
          url: /home

Documentation

  • Updated README with comprehensive Font Awesome setup instructions
  • Added widget property table including icon_type parameter
  • Explained both auto-include and manual setup options

Test Plan

  • Test with Font Awesome auto-include enabled
  • Test with Font Awesome auto-include disabled
  • Test error view when config file is missing
  • Test with custom Font Awesome version
  • Verify no conflicts when Font Awesome already exists in project

@MarcinOrlowski MarcinOrlowski self-assigned this Nov 7, 2025
@MarcinOrlowski MarcinOrlowski merged commit ba7acd1 into dev Nov 7, 2025
6 checks passed
@MarcinOrlowski MarcinOrlowski deleted the font-awesome-config branch November 7, 2025 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant