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

Allow extensions to provide navigation links #2309

Draft
wants to merge 1 commit into
base: 0.4.x
Choose a base branch
from

Conversation

bartfeenstra
Copy link
Owner

@bartfeenstra bartfeenstra commented Feb 11, 2025

This fixes #2286

To do

Before we merge this and are stuck with this API until 0.5, let's consider:

  • Do we want to merge functionality to 'enrich' or 'resolve' URLs first? E.g. check for Betty-specific schemes and rewrite URLs so something like betty://person/P1 becomes a link to the page of person P1 in the correct locale? (this could be helpful when loading links from Gramps as well, for example).
  • If so, do we want such URLs to be able to determine whether the resource is static or localized?
  • If we follow that train of thought some more: can we come up with a consistent way of determining whether resources are static or localized? Do we then still need separate URL generator interfaces? Do we then still need the static_url and localized_url Jinja2 filters?
  • If so, we will probably want a base Link class/interface that ancestry and navigation links can extend.

@bartfeenstra bartfeenstra added enhancement New feature or request python Pull requests that update Python code documentation templating Jinja2 templating labels Feb 11, 2025
@bartfeenstra bartfeenstra force-pushed the navigation-link-provider branch from e62aed7 to 4615dbb Compare February 11, 2025 14:46
@bartfeenstra bartfeenstra force-pushed the navigation-link-provider branch from 4615dbb to a68fb4e Compare February 11, 2025 14:48
Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.90%. Comparing base (6144cdf) to head (a68fb4e).

Additional details and impacted files
@@           Coverage Diff           @@
##            0.4.x    #2309   +/-   ##
=======================================
  Coverage   97.90%   97.90%           
=======================================
  Files         369      369           
  Lines       23431    23473   +42     
  Branches     1090     1090           
=======================================
+ Hits        22939    22981   +42     
  Misses        338      338           
  Partials      154      154           

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation enhancement New feature or request python Pull requests that update Python code templating Jinja2 templating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow extensions to provide navigation links
1 participant