Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/deprecate excludes #35

Merged
merged 8 commits into from
Oct 10, 2024
Merged

Feature/deprecate excludes #35

merged 8 commits into from
Oct 10, 2024

Conversation

bezhanSalleh
Copy link
Owner

This pull request includes several changes focused on updating the PanelSwitch functionality, improving the README documentation, and making adjustments to configuration files. The most important changes include the introduction of a new panels method, deprecation of the excludes method, and updates to the README.md to reflect these changes.

PanelSwitch Enhancements:

  • Introduced a new panels method to limit listed panels and deprecated the excludes method. Added validation for user-provided panels to ensure they are valid Filament panels (src/Concerns/HasPanelValidator.php, src/PanelSwitch.php).
  • Added sort method to allow sorting of panels in ascending or descending order (src/PanelSwitch.php).

README Documentation Updates:

  • Updated README.md to introduce new sections for Panels and Sort Order and marked Panel Exclusion as deprecated.

Blade Template Adjustments:

  • Refactored panel-switch-menu.blade.php to use the new panels method and updated the logic for rendering panel links and icons (resources/views/panel-switch-menu.blade.php).

Copy link

what-the-diff bot commented Oct 10, 2024

PR Summary

  • Configuration Changes

    • The .editorconfig setting for insert_final_newline was changed from true to false.
    • In the pint.json file, the single_blank_line_at_eof was set to false.
  • Addition of Test Results File

    • A new file for PHPUnit test results was introduced under .phpunit.cache/test-results.
  • README.md Updates

    • README.md was updated with new sections for "Panels" and "Sort Order", and these sections include examples for better understanding.
    • The "Panel Exclusion" section was marked as deprecated, replacing it with recommended use of panels().
  • Code Refactoring for Views

    • The resources/views/panel-switch-menu.blade.php was simplified to improve how panel URLs are created in dropdowns.
  • Introduction of New Trait

    • A new trait HasPanelValidator was introduced in the src/Concerns/ directory; this provides the ability to validate panel IDs.
  • Expansion of PanelSwitch Class

    • The PanelSwitch class now includes panels() and sort() methods, which will replace the previously used excludes() functionality.
  • Logic Adjustment in Panel Method

    • The logic in the getPanels() method was adjusted to consider both user-defined panels and their validation.
  • Minor Updates for Compatibility

    • Minor updates were applied to several other files to ensure compatibility with newly introduced methods and features.

@bezhanSalleh bezhanSalleh linked an issue Oct 10, 2024 that may be closed by this pull request
@bezhanSalleh bezhanSalleh merged commit ff16445 into 3.x Oct 10, 2024
2 of 9 checks passed
@bezhanSalleh bezhanSalleh deleted the feature/deprecate-excludes branch October 10, 2024 18:11
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.

[Question]: Sorting of Panels possible?
1 participant