Skip to content

Add Blade component support for logo customization#2

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/fix-1
Draft

Add Blade component support for logo customization#2
Copilot wants to merge 4 commits intomainfrom
copilot/fix-1

Conversation

Copy link

Copilot AI commented Aug 27, 2025

This PR adds support for using Blade components as logos in Lemme documentation sites, extending the existing logo customization options.

Changes Made

Configuration

  • Added component type to the logo configuration in config/lemme.php
  • Added LEMME_LOGO_COMPONENT environment variable support
  • Updated documentation comments to include the new component option

Template Rendering

  • Extended the logo rendering logic in resources/views/docs.blade.php to handle Blade components
  • Uses <x-dynamic-component> for flexible component rendering
  • Maintains graceful fallback to the default logo when component is empty or invalid

Documentation

  • Updated README.md with comprehensive component usage examples
  • Added component option to the logo types comparison table
  • Updated recommendations to include Blade components as a preferred option

PHP Version Requirements

  • Updated minimum PHP version requirement to 8.4 as requested

Usage

Users can now configure Blade components for logos using:

LEMME_LOGO_TYPE=component
LEMME_LOGO_COMPONENT=branding.logo-component

Or in the config file:

'logo' => [
    'type' => 'component',
    'component' => 'my-app.logo-component',
    // ...
],

Benefits

  • Modern Syntax: Uses contemporary Blade component syntax instead of includes
  • Enhanced Reusability: Components can be shared across the entire application
  • Advanced Features: Full support for component props, slots, and dependency injection
  • Improved Maintainability: Better organization and type safety
  • Backward Compatibility: All existing view, image, and text logo configurations continue to work unchanged

Example Component

{{-- resources/views/components/logo.blade.php --}}
<div class="flex items-center space-x-2">
    <svg class="w-8 h-8 text-blue-600" fill="currentColor" viewBox="0 0 24 24">
        <path d="M12 2L2 7v10c0 5.55 3.84 10 9 10s9-4.45 9-10V7l-10-5z"/>
    </svg>
    <span class="text-lg font-bold text-gray-800 dark:text-white">
        {{ config('app.name') }}
    </span>
</div>

This implementation provides a modern, flexible alternative to Blade views while maintaining full compatibility with existing configurations.

Fixes #1.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link
Author

Copilot AI commented Aug 27, 2025

@ruerdev 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Copilot AI and others added 2 commits August 27, 2025 22:20
Co-authored-by: ruerdev <25254145+ruerdev@users.noreply.github.com>
Co-authored-by: ruerdev <25254145+ruerdev@users.noreply.github.com>
Copilot AI changed the title [WIP] Make it possible for the user to use a Blade Component when they want to change the default logo. Add Blade component support for logo customization Aug 27, 2025
Copilot AI requested a review from ruerdev August 27, 2025 22:27
@ruerdev
Copy link
Collaborator

ruerdev commented Aug 28, 2025

@copilot The .github/copilot-instructions.md was added. Now you have this information, review the changes you already made. Keep the minimum required PHP version at 8.4.

Co-authored-by: ruerdev <25254145+ruerdev@users.noreply.github.com>
Copy link
Author

Copilot AI commented Aug 28, 2025

@copilot The .github/copilot-instructions.md was added. Now you have this information, review the changes you already made. Keep the minimum required PHP version at 8.4.

I've updated the minimum PHP version requirement to 8.4 as requested. The change is in commit 459a474. I also reviewed my previous changes and they remain compatible with PHP 8.4 requirements.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/pestphp/pest-plugin/zipball/e79b26c65bc11c41093b10150c1341cc5cdbea83
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TfMDuS /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TfMDuS /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/phpstan/phpstan/zipball/41600c8379eb5aee63e9413fe9e97273e25d57e4
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TfMDuS /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TfMDuS /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TfMDuS /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TfMDuS /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TfMDuS /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TfMDuS /usr/bin/composer install --no-interaction (http block)
  • https://api.github.com/repos/symfony/process/zipball/40c295f2deb408d5e9d2d32b8ba1dd61e36f05af
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/TfMDuS /usr/bin/composer install --no-interaction (http block)

If you need me to access, download, or install something from one of these locations, you can either:

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.

Make it possible for the user to use a Blade Component when they want to change the default logo.

2 participants