Skip to content

feat: merge page with node tree #7947

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

Merged
merged 14 commits into from
Jul 10, 2024
Merged

Conversation

jrief
Copy link
Contributor

@jrief jrief commented Jul 3, 2024

Description

This is the (huge) pull request to merge models Page and TreeNode into Page.

There is some additional cleanup to do, because I haven't yet removed all the legacy code for reference.
All unit tests are working.

This pull request shall go into version 4.2.

@fsbraun Please consider to apply it before merging other pull requests, since this presumably will cause a lot of merging conflicts.

Related resources

It is based on the discussion #7873 and we talks about this a few times during
the biweekly meetings.

Checklist

  • I have opened this pull request against develop-4
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined the channel #pr-reviews on our Discord Server to find a “pr review buddy” who is going to review my pull request.

@jrief jrief changed the title Feat: merge page with node tree feat: merge page with node tree Jul 3, 2024
@jrief jrief requested review from marksweb and fsbraun July 3, 2024 15:32
Copy link
Member

@fsbraun fsbraun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jrief! Great work. Looks promising! It's a big change and I have some comments:

  • I strongly promote adding (working) compatibility shims for the changed API:
    • A node property for Page that returns the page itself. Thereby, custom apps that access page.node.something will not break
    • Remove node__ prefixes from filter, order_by, select_related in PageQuerySet
    • Rename page.parent to page.page_parent to be compatible with django CMS 4.1 and earlier
    • Use the RemovedInDjangoCMS43 warning message to mark compatibility code that will need to be removed in the future.
  • Add some documentation for developers who need code to run on both django CMS 4.1 and earlier and on django CMS 4.2+ in docs/upgrade/4.2.0.rst Links to this documentation should be part of the warnings (https://docs.django-cms.org/en/release-4.2.x/upgrade/4.2.0.html)
  • On the smaller things, I've noticed that you use both single and double quotes (' and "). I'd suggest being consistent and opting for double quotes

I'm undecided if we can already remove TreeNode from the models. @marksweb Do you have an opinion on that? Is there a scenario where custom apps use it?

@jrief jrief force-pushed the WiP-feat-merge-Page-with-NodeTree branch from c0aa851 to 91d6756 Compare July 5, 2024 08:16
Copy link
Member

@fsbraun fsbraun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done! LGTM!

@fsbraun fsbraun force-pushed the WiP-feat-merge-Page-with-NodeTree branch from 605be06 to d58a4b8 Compare July 10, 2024 14:12
@fsbraun fsbraun merged commit 8577444 into develop-4 Jul 10, 2024
65 checks passed
@fsbraun fsbraun deleted the WiP-feat-merge-Page-with-NodeTree branch July 10, 2024 14:31
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