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

[2.x] Simplify the navigation items class #1637

Merged

Conversation

caendesilva
Copy link
Member

@caendesilva caendesilva commented Mar 24, 2024

Targets #1568 and further simplifies the navigation internals. It inlines the added navigation destination class and simplifies the navigation item class so it is now at the point where I can't find anything else to remove, signaling it has reached perfection.

Copy link

codecov bot commented Mar 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.93%. Comparing base (3eca812) to head (09938c8).

❗ Current head 09938c8 differs from pull request most recent head 3e4901b. Consider uploading reports for the commit 3e4901b to get more accurate results

Additional details and impacted files
@@                         Coverage Diff                         @@
##             improved-navigation-internals    #1637      +/-   ##
===================================================================
+ Coverage                            99.87%   99.93%   +0.06%     
+ Complexity                            1787     1779       -8     
===================================================================
  Files                                  185      184       -1     
  Lines                                 4816     4802      -14     
===================================================================
- Hits                                  4810     4799      -11     
+ Misses                                   6        3       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

And to care less about the route state
@caendesilva caendesilva force-pushed the simplify-the-navigation-items-class branch from 67066be to 6aa82b7 Compare March 24, 2024 15:19
@caendesilva caendesilva force-pushed the simplify-the-navigation-items-class branch from 09ae1b2 to b4011e1 Compare March 24, 2024 15:27
Use `$item->getPage()->getRoute()` instead
@caendesilva caendesilva force-pushed the simplify-the-navigation-items-class branch from 4c33e65 to 1b94a90 Compare March 24, 2024 15:36
@caendesilva caendesilva force-pushed the simplify-the-navigation-items-class branch from b673978 to 37c51c2 Compare March 24, 2024 15:40
Turns out we really didn't need this. It does add one test for the new side effect of constructor now being less magic (desirable as it's the scope of the create method)
Now longer needed as we decoupled the navigation group class
@caendesilva caendesilva force-pushed the simplify-the-navigation-items-class branch from 09938c8 to 3e4901b Compare March 24, 2024 16:24
@caendesilva caendesilva marked this pull request as ready for review March 24, 2024 16:25
@caendesilva caendesilva merged commit 27fae01 into improved-navigation-internals Mar 24, 2024
12 checks passed
@caendesilva caendesilva deleted the simplify-the-navigation-items-class branch March 24, 2024 16:26
@caendesilva caendesilva mentioned this pull request Jun 27, 2024
99 tasks
@caendesilva caendesilva added this to the v2 milestone Jul 9, 2024
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.

1 participant