Skip to content

Story #2111: Form post wisiwyg#2149

Merged
herzog0 merged 95 commits intodevelopfrom
form-post-wisiwyg
Apr 9, 2026
Merged

Story #2111: Form post wisiwyg#2149
herzog0 merged 95 commits intodevelopfrom
form-post-wisiwyg

Conversation

@DrJfrost
Copy link
Copy Markdown
Collaborator

@DrJfrost DrJfrost commented Mar 10, 2026

Issue: #2111

Summary & Context

This pull request introduces a new version of the Create Post component. It also introduces some input component variants, new event triggering mechanisms for dropdowns and adds a small adaptation in the backend, so it supports input validation when knocking on endpoints for this new component.

Changes

  • WYSIWYG Editor Integration: Implements a basic no-JavaScript fallback on top of some fixes.
  • V3 Post Creation Form: Introduces a new news/create_v3.html template for post creation.
  • Form Component Styling Overhaul: Improves styles in js-less versions of dropdowns, comboboxes and input.
  • Backend Integration: Updates core/views.py and news/views.py to conditionally serve V3 templates and populate context data (like dropdown options and initial values) for the modernized post creation flow when the v3 flag is active.
  • UI Refinements: Includes minor design corrections across V3 components, such as wrong variable names, coloring and font sizes.

‼️ Risks & Considerations ‼️

Although I did my best to try and review what I could, there's much work from the previous iteration of developers that I don't clearly understand, like why we're importing the whole WYSIWYG js file in this branch while develop already has that file, or why wasn't it updated in a separate branch and then merged to this one.

Screenshots

  • Desktop Light Mode
image
  • Desktop Dark Mode
image
  • Mobile
image

Self-review Checklist

  • Tag at least one team member from each team to review this PR
  • Link this PR to the related GitHub Project ticket

Frontend

  • UI implementation matches Figma design
  • Tested in light and dark mode
  • Responsive / mobile verified
  • Accessibility checked (keyboard navigation, etc.)
  • Ensure design tokens are used for colors, spacing, typography, etc. – No hardcoded values
  • Test without JavaScript (if applicable)
  • No console errors or warnings

Copy link
Copy Markdown
Collaborator

@gregjkal gregjkal left a comment

Choose a reason for hiding this comment

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

Looking really good! Few requests.

Comment thread static/js/wysiwyg-editor.js Outdated
Comment thread static/js/wysiwyg-editor.js Outdated
Comment thread templates/base.html Outdated
Comment thread news/views.py Outdated
Comment thread templates/v3/includes/_field_combo.html Outdated
Comment thread static/css/v3/forms.css Outdated
Copy link
Copy Markdown
Collaborator

@julhoang julhoang left a comment

Choose a reason for hiding this comment

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

Hi @DrJfrost , I added some comments mostly around UI styling but just wanted to say overall this is looking really great!

Comment thread templates/includes/icon.html Outdated
Comment thread templates/includes/icon.html Outdated
Comment thread templates/v3/includes/_field_textarea.html
Comment thread templates/news/create_v3.html Outdated
Comment thread templates/news/create_v3.html Outdated
Comment thread templates/news/create_v3.html Outdated
Comment thread templates/base.html Outdated
Comment thread static/js/wysiwyg-editor.js
Copy link
Copy Markdown
Collaborator

@julhoang julhoang left a comment

Choose a reason for hiding this comment

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

We're so close to the finish line!! I just left some questions and suggestions down below but overall this is looking great!

Comment thread news/views.py Outdated
Comment thread news/views.py
Comment thread templates/news/v3/create.html
Comment thread news/views.py
Copy link
Copy Markdown
Collaborator

@julhoang julhoang left a comment

Choose a reason for hiding this comment

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

Small UI issue: We're missing a margin for this section on mobile:
image

@julhoang
Copy link
Copy Markdown
Collaborator

julhoang commented Apr 6, 2026

@herzog0 Hmmm I'm not sure what's going on here, but the checks for your last 2 commits have been running for a long while:
Screenshot 2026-04-06 at 3 21 23 PM

@herzog0 herzog0 changed the title Form post wisiwyg Story #2111: Form post wisiwyg Apr 7, 2026
@herzog0
Copy link
Copy Markdown
Collaborator

herzog0 commented Apr 7, 2026

@julhoang all addressed, I think that CI run was some outlier, cause I can't even find it in the logs 🤷

@herzog0
Copy link
Copy Markdown
Collaborator

herzog0 commented Apr 7, 2026

image

Copy link
Copy Markdown
Collaborator

@julhoang julhoang left a comment

Choose a reason for hiding this comment

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

Fantastic work!! Everything looks great to me 🙌 🎉

Comment thread news/views.py
Comment on lines +382 to +391
except IntegrityError as e:
if "slug" in str(e):
form.add_error(
"title",
"A post with this title already exists. Please choose a different title.",
)
else:
form.add_error(
None, "An unexpected error occurred. Please try again."
)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This string-matching (if "slug" in str(e):) seems a lil fragile, though at the same time I'm not sure how else we can robustly check for it since the save() function didn't specifically raise any Exceptions that we can catch 🤷‍♀️

@herzog0 herzog0 force-pushed the form-post-wisiwyg branch from 914d6ce to 064e9cb Compare April 8, 2026 18:24
Comment thread templates/base.html
Comment thread static/css/v3/components.css Outdated
Copy link
Copy Markdown
Collaborator

@kattyode kattyode left a comment

Choose a reason for hiding this comment

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

QA Approved

@herzog0 herzog0 merged commit 26e8902 into develop Apr 9, 2026
4 checks passed
@herzog0 herzog0 deleted the form-post-wisiwyg branch April 9, 2026 23:00
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.

Additional Input Component Variants Webpage UI: Create a Post

6 participants