Skip to content

Conversation

@marbru
Copy link
Contributor

@marbru marbru commented Oct 22, 2025

The main motivation of this PR comes from this ticket: #312 To a newcomer, it looks like if the template components tutorial and custom component tutorial are both the same. There's full explanation of the reasons for this confusion in the ticket.

This PR implements some changes that hopefully will make things clearer and less confusing for newcomers:

  • All installation instructions have been moved to the builtin_components.rst tutorial, which has also been renamed to "Installation and usage with built-in components". This is more descriptive, plus marks it as the obvious starting point.
    -template_components.rst and custom_components.rst have been given more descriptive titles, and introductore text has been changed from a generic description of the benefits of custom components to a description of the particularities of the type of component covered in the tutorial.
  • Some other minor changes for clarity (eg, moving some notes to different places) or fixes in the code example. See PR comments for more info.

For followup: the renaming of custom components to form-based components (proposed in this discussion is intentionally not included in this PR, in order to limit the scope of the changes. If we want it, I suggest to be done in a followup PR, where changes can be reviewed in isolation.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Oct 22, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR reorganizes tutorial content to reduce duplication and improve clarity by centralizing installation steps, refining tutorial introductions, standardizing terminology, and applying minor editorial fixes.

File-Level Changes

Change Details Files
Consolidated installation instructions and renamed the built-in components tutorial
  • Moved all installation steps into the built-in components tutorial
  • Renamed tutorial to “Installation and usage with built-in components”
  • Updated tutorial index to point to the new title
docs/source/tutorial/builtin_components.rst
docs/source/tutorial/index.rst
docs/source/tutorial/template_components.rst
docs/source/tutorial/custom_components.rst
Refined tutorial intros and standardized component terminology
  • Rewrote introductory text in template_components to focus on template-based components
  • Rewrote introductory text in custom_components to highlight CMS frontend components
  • Replaced generic “custom components” with “CMS frontend components” where appropriate
docs/source/tutorial/template_components.rst
docs/source/tutorial/custom_components.rst
Applied minor clarity edits and fixed code examples
  • Moved various notes to more context-relevant locations
  • Corrected code snippets for accuracy
docs/source/tutorial/template_components.rst
docs/source/tutorial/custom_components.rst

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review: ## Individual Comments ### Comment 1 <location> `docs/source/tutorial/index.rst:20-21` </location> <code_context> added to your project's ``INSTALLED_APPS``. 2. **Template Components** – The easiest approach creating or porting your own - **custom frontend components**, allowing you define components by their HTML templates. Special + custom components, allowing you to define them by their **HTML templates, without any code**. Special ``djangocms-frontend`` tags are used to provide the additional declarative information needed. This is the fastest approach to create ``djangocms-frontend`` components. </code_context> <issue_to_address> **issue (typo):** Missing 'to' after 'approach' in the sentence. Change the sentence to: 'The easiest approach to creating or porting your own custom components...'. ```suggestion 2. **Template Components** – The easiest approach to creating or porting your own  custom components, allowing you to define them by their **HTML templates, without any code**. Special ``` </issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@marbru marbru changed the title [DOCS] Deduplication and clarity in the tutorials [docs] Deduplication and clarity in the tutorials Oct 22, 2025
@marbru marbru changed the title [docs] Deduplication and clarity in the tutorials docs: Deduplication and clarity in the tutorials Oct 22, 2025
@marbru
Copy link
Contributor Author

marbru commented Oct 27, 2025

I renamed the tutorials as suggested in #312 (comment). In the end I'm not doing any name changes in this PR, which is already getting tricky to review. I suggest we do in a followup if we want to change the name of custom (CMS) components to form-based components.

@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.00%. Comparing base (ddb5255) to head (42aa9f2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@ ## main #317 +/- ## ======================================= Coverage 89.00% 89.00% ======================================= Files 124 124 Lines 3383 3383 Branches 287 287 ======================================= Hits 3011 3011 Misses 256 256 Partials 116 116 

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
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.

@marbru Thank you for the great work! Thanks for taking the time to look at many details!!

@fsbraun fsbraun merged commit 7c88aa2 into django-cms:main Oct 28, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants