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

Add config for navigation icon #58

Merged
merged 5 commits into from
May 9, 2024
Merged

Conversation

sitenzo
Copy link
Contributor

@sitenzo sitenzo commented May 6, 2024

Hi,

I want to have this resource as subnavigation without any icons.
My top navigation has a icon, because that is not in the config i added it.

Added resource Icon to config
Added getNavigationIcon from config
added         'navigation_icon' => 'heroicon-o-envelope', to config
Copy link

what-the-diff bot commented May 6, 2024

PR Summary 📝

  • 📌 Added a new navigation_icon setting
    This change provides a new "navigation_icon" option within the 'filament-email.php' settings file. Now, it's even easier to find what you're looking for, guided by winning icons! 🏆💎

  • 🗑️ Removed navigationIcon property from EmailResource class
    We've said bye-bye to the "navigationIcon" property in our EmailResource class to simplify things. Less is more, right? 😌👋

  • 🎯 Introduced getNavigationIcon() method in EmailResource class
    We've baked in a new method, getNavigationIcon(), that fetches the "navigation_icon" directly from our 'filament-email.php' configuration file. Efficiency for the win! 🚀🔍

@RickDBCN
Copy link
Owner

RickDBCN commented May 6, 2024

Hi Tieme,

The tests are failing, could you fix?
If the config isn't set, can we default to the standard navigation icon? This way existing users of this package do not need to update their config.

Many thanks!

@RickDBCN RickDBCN self-assigned this May 6, 2024
The configuration file 'filament-email.php' was updated to remove the hardcoded navigation icon. In 'EmailResource.php', implement a fallback to 'heroicon-o-envelope' if no icon is set. This solution provides flexibility to set the navigation icon from the configuration file while ensuring there's a default icon if none is specified.
@sitenzo
Copy link
Contributor Author

sitenzo commented May 6, 2024

Ho @RickDBCN

I have changed the config.

Can you check the changes please?

Thanks

The 'icon' property was added to the 'filament-email' configuration while 'navigation_icon' was removed from the configuration and README file. The reference to 'navigation_icon' was also updated to 'resource.icon' in EmailResource class to reflect these changes.
@sitenzo
Copy link
Contributor Author

sitenzo commented May 6, 2024

i was to quick with the pull request.
Now it is working and all is up to date.

@marcogermani87 marcogermani87 merged commit 102aeeb into RickDBCN:main May 9, 2024
11 checks 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