Conversation
Contributor
Reviewer's GuideIntroduces a dedicated MilestoneCard CMS component for timeline milestones, updates the timeline container template to use it instead of generic cards, adds a matching milestone card template, adjusts SCSS for contrast and spacing, and performs light formatting/PEP8 cleanups in cms_components.py. Sequence diagram for rendering timeline with MilestoneCard pluginssequenceDiagram
actor Editor
participant CMSAdmin
participant TimelineContainerPlugin as TimelineContainer
participant MilestoneCardPlugin as MilestoneCard
participant TemplateEngine
participant Browser
Editor->>CMSAdmin: Open page with TimelineContainer
Editor->>CMSAdmin: Add MilestoneCard child
CMSAdmin->>MilestoneCard: Create instance(label, heading, text)
CMSAdmin->>MilestoneCard: Add child plugins to slots(links, image_top, image_bottom)
Editor->>CMSAdmin: Publish page
Browser->>CMSAdmin: GET timeline page
CMSAdmin->>TemplateEngine: Render template timeline_timeline_html
TemplateEngine->>TimelineContainer: Iterate child_plugin_instances
TimelineContainer->>TemplateEngine: For non_MilestoneCardPlugin children render as header
TimelineContainer->>TemplateEngine: For MilestoneCardPlugin children render as timeline items
TemplateEngine->>MilestoneCard: Render template timeline_milestone_card_html
MilestoneCard->>TemplateEngine: Output label, heading, text, slot content
TemplateEngine-->>Browser: HTML with milestone_card structure
Class diagram for new MilestoneCard CMS component and timeline integrationclassDiagram
class CMSFrontendComponent {
}
class TimelineContainer {
+Meta.render_template = timeline_timeline_html
+Meta.allow_children = True
+Meta.child_classes = [MilestoneCardPlugin, TextPlugin, HeadingPlugin, SpacingPlugin, ButtonGroupPlugin, TimelineSpacerPlugin]
}
class MilestoneCard {
+CharField label
+CharField heading
+HTMLFormField text
+Meta.name = Milestone_Card
+Meta.render_template = timeline_milestone_card_html
+Meta.allow_children = True
+Meta.parent_classes = [TimelineContainerPlugin]
+Meta.mixins = [Background, Spacing]
+Meta.slots = links, image_top, image_bottom
+Meta.frontend_editable_fields = [label, heading, text]
}
class Slot {
+name
+label
+child_classes
}
class TextLinkPlugin {
}
class ImagePlugin {
}
CMSFrontendComponent <|-- TimelineContainer
CMSFrontendComponent <|-- MilestoneCard
TimelineContainer o-- MilestoneCard : child_classes
MilestoneCard o-- Slot : slots
Slot --> TextLinkPlugin : links
Slot --> ImagePlugin : image_top
Slot --> ImagePlugin : image_bottom
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The newly added
ColorChoiceFieldimport incms_components.pydoesn't appear to be used in the diff; consider removing it to avoid an unused import.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The newly added `ColorChoiceField` import in `cms_components.py` doesn't appear to be used in the diff; consider removing it to avoid an unused import.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
…nd update timeline template
…CodeBlock, CounterContainer, Heading, MilestoneCard, ResponsiveTable, and Spacing
fsbraun
reviewed
Mar 25, 2026
| @@ -0,0 +1,32 @@ | |||
| {% load cms_tags frontend %} | |||
|
|
|||
| <article id="milestone-{{ instance.id }}" class="milestone-card"> | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new
MilestoneCardcomponent for the timeline feature, updates the timeline's template and styling to support this new card, and improves code formatting and maintainability in several places. The most significant changes are the addition of theMilestoneCardplugin (replacing the previous card type in timelines), the corresponding template, and SCSS updates for better visual consistency.Timeline component and plugin updates:
MilestoneCardcomponent (MilestoneCardPlugin) tocms_theme/cms_components.py, with support for label, heading, text, images (top/bottom), and links. This replaces the previousCardPluginin timeline containers. [1] [2]timeline.html) to renderMilestoneCardPlugininstances instead of the old card type.milestone_card.html), supporting inline editing and slot rendering for images and links.Styling and accessibility improvements:
.milestone-cardto ensure white text on dark backgrounds and removed extra margin from milestone text paragraphs for better visual consistency. [1] [2]General code maintenance and formatting:
cms_theme/cms_components.pyfor clarity and consistency. [1] [2]cms_theme/cms_components.py. [1] [2] [3] [4] [5] [6]Summary by Sourcery
Introduce a dedicated Milestone card component for timelines and update templates and styles to support it.
New Features:
Enhancements: