Skip to content

Add rich text field to school profile#8480

Open
richardpattinson wants to merge 1 commit intomainfrom
school-profile-rich-text
Open

Add rich text field to school profile#8480
richardpattinson wants to merge 1 commit intomainfrom
school-profile-rich-text

Conversation

@richardpattinson
Copy link
Contributor

Trello card URL

https://trello.com/c/y33lZvtU/2461-update-school-profiles-school-description-page-to-have-the-rich-text-editor

Changes in this PR:

This PR updates the School/Organisation profile description to use the rich text editor (Trix), creating a consistent experience with the Personal Statement editor. This allows schools to add formatting (bullets, bolding, etc.) to their profiles.

Technical Implementation:

  • Views: Replaced the standard govuk_text_area in the profile edit form with rich_text_area (including a <noscript> fallback).

  • Model: Updated Organisation.rb to use has_rich_text :description.

  • Migration & Safety: - Added a migration MigrateSchoolDescriptionToRichText to safely copy existing description text from the organisations table to the action_text_rich_texts table so no data is lost.

    • Implemented self.ignored_columns += %w[description] on the Organisation model. This allows us to switch to the ActionText association immediately without needing to drop or rename the column in a way that would cause downtime or lock the database (avoiding online_migrations conflicts).
  • Is there anything specific you want feedback on?

    • Please review the migration logic to ensure the backfill strategy (find_each loop) is performant and safe for production.

Checklists:

Data & Schema Changes

If this PR modifies data structures or validations, check the following:

  • Adds/removes model validations
  • Adds/removes database fields (Migrating data to ActionText and ignoring the legacy column)
  • Modifies Vacancy enumerables (phases, working patterns, job roles, key stages, etc.)
If any of the above options has changed then the author must check/resolve all of the following...

Integration Impact

Does this change affect any of these integrations?

  • DfE Analytics platform
  • Legacy imports mappings
  • DWP Find a Job export mappings
  • Publisher ATS API (may require mapping updates or API versioning)

User Experience & Data Integrity

Could this change impact:

  • Existing subscription alerts (will legacy subscription search filters break?)
  • Legacy vacancy copying (will copied vacancies fail new validations?)
  • In-progress drafts for Vacancies or Job Applications

@richardpattinson richardpattinson force-pushed the school-profile-rich-text branch 6 times, most recently from 567b8b0 to d83dada Compare February 3, 2026 09:33
@richardpattinson richardpattinson force-pushed the school-profile-rich-text branch from d83dada to 18d07aa Compare February 3, 2026 09:36
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.

1 participant