Closed fsbraun closed 2 days ago
Attention: Patch coverage is 88.10811%
with 22 lines
in your changes missing coverage. Please review.
Project coverage is 88.49%. Comparing base (
f11feee
) to head (a6a2025
). Report is 45 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
🚨 Try these New Features:
@sourcery-ai review
This PR replaces the built-in link functionality with djangocms-link's reusable LinkFormField
. The implementation involves removing the custom link handling code and integrating with djangocms-link's field and helpers. The changes include data migration to convert existing link data to the new format.
erDiagram
FrontendUIItem {
JSON config
}
FrontendUIItem ||--o{ Link : contains
Link {
String external_link
String internal_link
String file_link
String phone
String mailto
String anchor
}
Link ||--o{ LinkFormField : converted_to
LinkFormField {
String link
}
classDiagram
class LinkFormMixin {
+LinkFormField link
+ChoiceField target
+Boolean link_is_optional
}
class AbstractLinkForm {
}
class EntangledModelFormMixin {
}
LinkFormMixin --|> EntangledModelFormMixin
AbstractLinkForm --|> LinkFormMixin
class GetLinkMixin {
+String get_link()
}
GetLinkMixin --|> LinkFormMixin
class LinkFormField {
}
LinkFormMixin o-- LinkFormField
class Site {
}
GetLinkMixin o-- Site
Change | Details | Files |
---|---|---|
Replace custom link form fields with djangocms-link's LinkFormField |
|
djangocms_frontend/contrib/link/forms.py |
Add data migration for converting existing link data |
|
djangocms_frontend/migrations/0002_migrate_links.py |
Refactor link handling helpers |
|
djangocms_frontend/contrib/link/helpers.py |
Update dependencies and configuration |
|
setup.py djangocms_frontend/apps.py |
This PR replaces the built-in link functionality with the new re-usable
LinkFormField
by djangocms-link.Summary by Sourcery
Replace the built-in link functionality with the reusable
LinkFormField
from djangocms-link, simplifying link management and updating configurations. Refactor the codebase to remove redundant link fields and update the build and CI configurations to align with the new setup.New Features:
LinkFormField
from djangocms-link to replace the built-in link functionality.Enhancements:
LinkFormField
, simplifying the codebase and removing redundant link fields.Build:
pyproject.toml
to include new configurations for tools likeblack
,ruff
,isort
,flake8
, andcoverage
.CI:
pytest
for running tests and generating coverage reports.Tests: