Skip to content

Conversation

@rsmithlal
Copy link
Member

Summary

Describe the change and the motivation.

Checklist

  • Tests added/updated and passing (bin/ci).
  • Lint and security checks (rubocop, brakeman, bundler-audit).
  • Documentation updated under docs/ describing new/changed functionality.
  • Mermaid diagrams (docs/*.mmd) updated to reflect changes.
  • Rendered PNGs regenerated with bin/render_diagrams and committed.
  • For DB changes, included any needed backfills/dedupes and noted risks.

Screenshots / Diagrams

If applicable, include screenshots or link to updated diagrams.

Notes

Anything reviewers should be aware of (migration order, flags, feature toggles).

…Content Contributor Agreement, Cookie Policy, Privacy Policy, and Terms of Service for improved clarity
…support, and PIPEDA compliance

- Created a new Platform Administration Guide detailing roles, responsibilities, and dashboard features.
- Added a Security and Privacy Management guide outlining principles, access control, data protection, and incident response.
- Introduced User Support Procedures to streamline support requests, ticket management, and escalation processes.
- Documented PIPEDA compliance updates in privacy policy and cookie consent agreement, ensuring adherence to Canadian privacy laws.
- Updated the Table of Contents to reflect new documentation structure and added relevant links.
- Create a new spec for BetterTogether::Content::Template to test associations, validations, and methods.
- Enhance BetterTogether::Page spec to include tests for template blocks and attributes in indexed JSON.
- Implement request specs for markdown content block previews, covering various markdown features and error handling.
- Add service specs for BetterTogether::MarkdownRendererService, ensuring proper rendering of markdown to HTML and plain text.
- Introduce service specs for BetterTogether::TemplateRendererService, validating rendering for all locales and error handling.
- Create view specs for markdown fields and block types, ensuring proper rendering and accessibility.
- Created factories for BetterTogether content types: Hero, Html, Image, RichText, Css, and Link.
- Implemented RSpec tests for each content model, covering associations, validations, and instance methods.
- Added support for translations and custom attributes in content models.
- Ensured Active Storage attachments are validated and tested for Image model.
- Established nested attributes for PlatformBlock to integrate with BetterTogether platforms.
- Enhanced testing for Action Text integration in RichText model.
…ccounts, website links, and associated models with validations and associations
…leted phases, and detailed coverage analysis
…pletion of background jobs and their coverage
…dStepsController, TranslationsController, and ExternalLinkIconSanitizer

- Implement tests for PlatformInvitationMailer to verify email content and behavior with various scenarios.
- Create comprehensive specs for ReportsController to ensure metrics are correctly assigned and returned.
- Add tests for SetupWizardStepsController to validate platform and admin creation processes.
- Implement tests for TranslationsController to ensure translation functionality works as expected.
- Add specs for ExternalLinkIconSanitizer to verify proper sanitization of links and icon rendering.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +87 to +96
async renderMarkdown(content) {
// Make an AJAX request to render the markdown on the server
const locale = document.documentElement.lang || 'en'
const response = await fetch(`/${locale}/content/blocks/preview_markdown`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-Token': this.csrfToken
},
body: JSON.stringify({ markdown: content })

Choose a reason for hiding this comment

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

P1 Badge Honor route scope when previewing markdown

The markdown block Stimulus controller posts previews to a hard‑coded /${locale}/content/blocks/preview_markdown path, ignoring the engine’s route_scope_path. Engine routes are defined under BetterTogether.route_scope_path (default is 'bt'), so on a standard installation the preview request will 404 because it should be /#{locale}/bt/content/blocks/preview_markdown. The controller should include the configured route scope (like other Better Together JS controllers do) before attempting the fetch.

Useful? React with 👍 / 👎.

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