Skip to content

Conversation

@scottgrayson
Copy link
Contributor

Summary

This PR adds public guest access to help articles with dedicated index and show pages.

Changes

Features

  • Public Help Article Index Page: Card grid layout showing all public help articles
  • Public Help Article Show Page: Full article view with video embeds and content
  • Pagination Improvements: Right-aligned pagination buttons with mobile-friendly design
  • Logo Spacing: Improved spacing with proper top margin (mt-4, mb-4)
  • Theme CSS Configuration: Added support for custom theme CSS via config

Technical Changes

  • Add PublicHelpArticleController for guest access
  • Add AllowPublicHelpAccess middleware
  • Add public routes for /help-articles
  • Add is_hidden field to help articles table
  • Add help_layout_theme_css config option
  • Add help_layout_css config option
  • Update pagination component to hide results count on mobile
  • Add comprehensive tests for public help article functionality

UI/UX

  • Full-width video embeds with 16:9 aspect ratio
  • Responsive card grid layout (1 column mobile, 4 columns desktop)
  • Dark mode support throughout
  • Mobile-optimized pagination controls
  • Guest layout with configurable logo

Testing

  • Added PublicHelpArticleTest with full test coverage
  • Tested with authenticated and unauthenticated users
  • Verified is_hidden functionality
  • Tested pagination and video embeds

Breaking Changes

None - fully backwards compatible

Related Issues

Implements public help article sharing feature request

scott grayson added 24 commits November 19, 2025 13:23
- Add public help article index page with card grid layout
- Add public help article show page with full-width video embeds
- Improve pagination component with right-aligned buttons
- Hide 'showing results' text on mobile devices
- Add logo spacing improvements (mt-4, mb-4)
- Add help_layout_theme_css config option for custom theme CSS
- Add help_layout_css config option for custom CSS files
- Update layout to support configurable theme CSS
- Add PublicHelpArticleController for guest access
- Add AllowPublicHelpAccess middleware
- Add public routes for /help-articles
- Add is_hidden field to help articles table
- Add HelpArticleSeeder with sample data
- Add comprehensive tests for public help article functionality
…m guest layout

- Add add_is_hidden migration to test setup
- Remove @filamentStyles and @filamentScripts from guest layout
  (only load when user is authenticated to avoid Livewire session errors)
- Public guest pages don't need Filament/Livewire components
…ation

- Replace local test.yml with reusable workflow from TappNetwork/workflows
- Matches pattern used by phpstan.yml and pint.yml
- Ensures consistency across organization repositories
- Remove unused config options: navigation, help_layout_max_width, guest_layout, admin_check
- Rename config keys to be simpler and more intuitive:
  - help_layout -> layout
  - help_layout_logo_url -> logo_url
  - help_layout_css -> css
  - help_layout_theme_css -> theme (key feature)
  - public_route_prefix -> route_prefix
  - public_route_middleware -> route_middleware
- Update all references in views and service provider
- Remove backward compatibility logic for deprecated options
- Hardcode middleware to AllowPublicHelpAccess
- Hardcode layout component to 'help-layout'
- Hardcode logo URL to '/'
- Keep only necessary config options:
  - route_prefix: for public unauthenticated routes
  - css: Tailwind base (required for any Tailwind classes)
  - theme: Optional Filament panel theme for branding
- Update all references to use hardcoded values
- Simplifies package while maintaining flexibility where needed
- Middleware was a pass-through that did nothing
- Controller already handles auth user redirection
- Routes only need 'web' middleware for sessions/CSRF
- Rename findFrontendPanel() → findAuthenticatedPanel()
- Rename getFrontendHelpUrl() → getAuthenticatedHelpUrl()
- Update all method calls and comments
- Makes it clear these methods handle authenticated panel URLs
- Merge index-content.blade.php into index.blade.php
- Merge show-content.blade.php into show.blade.php
- Remove unnecessary file abstraction
- Content was never reused, just added complexity
- Remove all dark: utility classes from public views
- Replace custom pagination with Laravel's default pagination
- Delete custom pagination component (no longer needed)
- Simplifies maintenance and reduces code complexity
- Changed from 8 to 4 to make pagination visible with fewer articles
- Can be adjusted back to 8 or made configurable later
- Recreate custom pagination component with dark mode styling
- Restore all dark: utility classes to public views
- Restore dark mode in layout (bg-gray-900, bg-gray-800)
- Update index to use custom pagination component
- Better UI consistency and polish
- Replace plain gray background with white + gradient decorations
- Add blue/red gradient blur elements matching welcome page
- Remove dark mode background (not used on welcome page)
- Provides consistent visual experience across public pages
- Revert to clean gray background layout (no gradient decorations)
- Remove complex white + gradient background
- Back to simple, readable design from commit 08a4b85
- User preferred the cleaner appearance
- Removed theme config (was always null, causes styling issues)
- CSS config remains for flexibility (can load multiple files)
- Simplified layout to only load CSS files from config
- Projects can add any CSS via the css array config
- Created resources/css/help.css with prose styles and iframe styling
- Package CSS is now self-contained and loaded inline
- Projects no longer need to duplicate help page styles
- Better encapsulation and reusability across projects
- CSS now publishes to public/vendor/filament-help/help.css
- Changed from file_get_contents() to asset() link
- Fixes 'file not found' error with compiled Blade views
- Standard Laravel package asset publishing approach
- Updated link text on both public index and show pages
- More accurate description for unauthenticated users
- Created PublicTestCase that doesn't register Filament panels
- Moved PublicHelpArticleTest to tests/Public/ directory
- Added test views directory with stub application-logo component
- Mocked Vite facade in PublicTestCase to avoid asset build requirements
- Registered public routes earlier in service provider booting
- Added Public test suite to phpunit.xml.dist

All tests now passing (18 passed, 38 assertions)
- Remove PublicHelpArticleController and related views
- Remove HelpLayout component and public route views
- Remove unused test files (PublicHelpArticleTest, PublicTestCase)
- Remove empty Http directories
- Update ViewHelpArticle to use guest panel resource URL
- Remove CSS config option (now handled by Filament panel themes)
- Update config to use frontend_slug and guest_slug instead of route_prefix
- Update description to include guest panel capabilities
- Fix config file example to show frontend_slug and guest_slug
- Add is_hidden feature to Features section
- Remove frontend_slug and guest_slug from config file
- Update plugins to use explicit default values instead of config fallbacks
- Make slug() method require string parameter (no nullable)
- Update setSlug() to require string parameter (no nullable)
- Update README to remove config file slug documentation
- All slug configuration now done via ->slug() method when registering plugins
- Remove config file publishing instructions
- All configuration is done when registering plugins
- Add validation to prevent empty slugs in plugins and resources
- Change guest plugin default slug from empty string to 'help'
- Update README to remove empty slug documentation
- All slugs must now be non-empty strings
@scottgrayson scottgrayson requested a review from swilla December 3, 2025 21:24
@scottgrayson scottgrayson removed the request for review from swilla December 4, 2025 18:05
@scottgrayson scottgrayson requested a review from swilla December 4, 2025 18:30
@scottgrayson scottgrayson requested a review from swilla December 4, 2025 21:12
Copy link
Member

@swilla swilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some changes by removing vendor, composer.lock, package-lock.json as these shouldn't be tracked for packages.

@scottgrayson scottgrayson merged commit 94b635f into main Dec 5, 2025
1 check passed
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.

3 participants