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

[5.x] Add custom icon selection to CP Nav Preferences #8023

Merged
merged 28 commits into from
Aug 14, 2024

Conversation

jesseleite
Copy link
Member

@jesseleite jesseleite commented Apr 28, 2023

Closes #9667.
Closes statamic/ideas#995

@jesseleite jesseleite changed the base branch from 3.4 to master April 28, 2023 21:03
@jesseleite jesseleite changed the title Add custom icon selection to CP Nav Preferences [4.x] Add custom icon selection to CP Nav Preferences Apr 28, 2023
@what-the-diff
Copy link

what-the-diff bot commented May 3, 2023

PR Summary

  • Change icons to light versions
    All item icons are updated to use light icons for better visibility and aesthetics.
  • Customization option in ItemEditor component
    Added an option to customize item icons within the ItemEditor component, but only for non-child items.
  • Remove 'icon' for child items
    The 'icon' configuration is removed for new child item creation/update, allowing the use of the original icon instead of the default 'entries' icon.
  • Modify NavItem icon() and new svg() methods
    The icon() method in NavItem now returns the SVG file name instead of the rendered SVG. A new svg() method is added to return the rendered version of the icon.
  • Logic added to transformItems()
    Additional logic in transformItems() ensures child nav items don't have icons based on design system guidelines, while maintaining the ability to set custom inline SVGs for child items without affecting other functionality.

@tobimori
Copy link

would love an update to this!

@jesseleite jesseleite changed the base branch from master to 4.x April 15, 2024 15:10
@duncanmcclean duncanmcclean changed the base branch from 4.x to 5.x May 14, 2024 14:27
@duncanmcclean duncanmcclean changed the title [4.x] Add custom icon selection to CP Nav Preferences [5.x] Add custom icon selection to CP Nav Preferences May 14, 2024
@jesseleite jesseleite marked this pull request as ready for review May 24, 2024 20:23
# Conflicts:
#	tests/CP/Navigation/NavTest.php
@jasonvarga jasonvarga merged commit cad9344 into 5.x Aug 14, 2024
17 checks passed
@jasonvarga jasonvarga deleted the cp-nav-builder-icon-picker branch August 14, 2024 18:38
@jackmcdade
Copy link
Member

❤️

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.

Custom CP nav features: nav items get no icon CP Nav: Ability to customise icons
5 participants