Skip to content

Conversation

@emmadesilva
Copy link
Member

@emmadesilva emmadesilva commented Feb 26, 2024

This PR makes breaking simplifications to how the documentation sidebar footer text is handled and customized. Instead of allowing false to disable it, true to use the default text, or a string to have custom text, this removes support for true, false still works, but the default text is moved to the default option based on the Blade from the view.

A drawback (and BC break) of this is that it no longer resolves dynamic links, but given the increased visibility of the option I think the tradeoff is worth it as it makes it easier to customize. It also means that the HTML is changed from dynamically using the site's configured link formatting options to hardcode a ../, resulting in <a href="../">Back to home page</a>.

This will work for most sites, but projects where the docs directory is customized will need to update the link if they wish to retain the home link.

This is otherwise a great candidate to use #1590 for.

Uses the link from the view, in order to simplify the API. A drawback of this is that it no longer resolves dynamic links, but given the increased visibility of the option I think the tradeoff is worth it as it makes it easier to customize.
@emmadesilva emmadesilva marked this pull request as ready for review February 26, 2024 15:09
@emmadesilva emmadesilva force-pushed the refactor-sidebar-data-handling branch from b9f8e3d to 08981bd Compare February 26, 2024 15:09
@codecov
Copy link

codecov bot commented Feb 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.95%. Comparing base (08981bd) to head (2fcf75a).

Additional details and impacted files
@@                         Coverage Diff                          @@
##             refactor-sidebar-data-handling    #1594      +/-   ##
====================================================================
- Coverage                             99.95%   99.95%   -0.01%     
+ Complexity                             1774     1773       -1     
====================================================================
  Files                                   183      183              
  Lines                                  4796     4794       -2     
====================================================================
- Hits                                   4794     4792       -2     
  Misses                                    2        2              

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

@emmadesilva emmadesilva merged commit eb0f922 into refactor-sidebar-data-handling Feb 26, 2024
@emmadesilva emmadesilva deleted the massively-simplify-sidebar-footer-text-handling branch February 26, 2024 15:16
@emmadesilva emmadesilva 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.

2 participants