Skip to content

feat: update markdown help page to match current editor features#4425

Open
SylvainChevalier wants to merge 4 commits intomainfrom
claude/issue-2292-update-and-link-markdown-help
Open

feat: update markdown help page to match current editor features#4425
SylvainChevalier wants to merge 4 commits intomainfrom
claude/issue-2292-update-and-link-markdown-help

Conversation

@SylvainChevalier
Copy link
Contributor

@SylvainChevalier SylvainChevalier commented Feb 25, 2026

Closes #2292

Summary

  • Updated intro to reference KaTeX instead of MathJax
  • Added new sections: Horizontal rules, Mentions, Embedded questions, Twitter embeds
  • Documented image upload (max 3MB) via toolbar
  • Documented code block language support
  • Documented underline formatting from toolbar
  • Updated and improved Portuguese translation

Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated Markdown help to use LaTeX/KaTeX for math rendering and clarified supported languages for code highlighting
    • Added/expanded sections: horizontal rules, mentions, embeds (embedded questions, Twitter/X, iframe) and images (upload + IMG tag)
    • Clarified editor toolbar features (underline, heading selection) and showed rich-text vs source-mode usage
    • Added security note on raw HTML and Portuguese translation of the help doc

- Update intro to reference KaTeX instead of MathJax
- Add new sections: Horizontal rules, Mentions, Embedded questions, Twitter embeds
- Document image upload (max 3MB) via toolbar
- Document code block language support (TypeScript, Python, Bash, etc.)
- Document underline formatting from toolbar
- Update embeds section with sub-sections for questions, tweets, and iframes
- Remove outdated note about embeds only in question bodies
- Mention rich-text and source editing modes
- Update and improve Portuguese translation to match new content

Closes #2292

Co-authored-by: Sylvain <SylvainChevalier@users.noreply.github.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 25, 2026

📝 Walkthrough

Walkthrough

Updated English and Portuguese Markdown help pages: replaced MathJax with KaTeX/LaTeX references, added sections for Horizontal rules, Mentions, and Embeds, expanded editor/toolbar, code, images, and iframe/embed guidance, and added notes about rich-text vs source modes. No API or exported signatures changed.

Changes

Cohort / File(s) Summary
Markdown Help — English
front_end/src/app/(main)/help/markdown/page.tsx
Replaced MathJax wording with KaTeX/LaTeX; added Horizontal rules, Mentions, Embeds (embedded questions, Twitter/X, iframes); expanded editor toolbar, code (inline/block, syntax highlighting, supported languages), images, and security/source-mode notes; many textual refinements and link updates.
Markdown Help — Portuguese
front_end/src/app/(main)/help/markdown/page_pt.tsx
Localized Portuguese translation of the English updates: KaTeX/LaTeX references, new sections (Linhas horizontais, Menções, Incorporações), expanded examples and guidance, editor/source-mode notes, and updated code/table/image examples.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • cemreinanc

Poem

🐇 In burrows of text I nimbly play,
KaTeX sparkles where MathJax used to stay.
Embeds and images hop into sight,
Portuguese and English, both feel right.
🥕 Happy docs — a carrot-coded delight!

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main objective: updating the markdown help page to reflect current editor features.
Linked Issues check ✅ Passed The PR successfully addresses issue #2292 by updating markdown help page content with new sections, editor features documentation, and Portuguese translations.
Out of Scope Changes check ✅ Passed All changes are directly related to updating the markdown help page to match current editor features as specified in issue #2292.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/issue-2292-update-and-link-markdown-help

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 25, 2026

🚀 Preview Environment

Your preview environment is ready!

Resource Details
🌐 Preview URL https://metaculus-pr-4425-claude-issue-2292-update-and-l-preview.mtcl.cc
📦 Docker Image ghcr.io/metaculus/metaculus:claude-issue-2292-update-and-link-markdown-help-46629fc
🗄️ PostgreSQL NeonDB branch preview/pr-4425-claude-issue-2292-update-and-l
Redis Fly Redis mtc-redis-pr-4425-claude-issue-2292-update-and-l

Details

  • Commit: 46629fcdf38e275da5e2fd5389160eed8481c3ed
  • Branch: claude/issue-2292-update-and-link-markdown-help
  • Fly App: metaculus-pr-4425-claude-issue-2292-update-and-l

ℹ️ Preview Environment Info

Isolation:

  • PostgreSQL and Redis are fully isolated from production
  • Each PR gets its own database branch and Redis instance
  • Changes pushed to this PR will trigger a new deployment

Limitations:

  • Background workers and cron jobs are not deployed in preview environments
  • If you need to test background jobs, use Heroku staging environments

Cleanup:

  • This preview will be automatically destroyed when the PR is closed

@SylvainChevalier
Copy link
Contributor Author

@claude

  • The toolbar does not allow strikethrough.
  • Don't mention the Legacy MathJax syntax, we'll remove it soon.

@claude
Copy link

claude bot commented Feb 26, 2026

Claude finished @SylvainChevalier's task in 1m 18s —— View job


Changes applied

  • Read current files and identify changes needed
  • Remove Legacy MathJax syntax mentions (English page)
  • Remove Legacy MathJax syntax mentions (Portuguese page)
  • Verify no strikethrough toolbar claims exist (confirmed: none found)
  • Commit and push changes

Removed the Legacy MathJax syntax paragraphs from both page.tsx and page_pt.tsx. Confirmed that neither file claims the toolbar supports strikethrough.
|

Remove the Legacy MathJax syntax paragraphs from both English and
Portuguese markdown help pages, as this feature is being removed.

Co-authored-by: Sylvain <SylvainChevalier@users.noreply.github.com>
@SylvainChevalier
Copy link
Contributor Author

lgtm.

@SylvainChevalier SylvainChevalier marked this pull request as ready for review February 26, 2026 15:13
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
front_end/src/app/(main)/help/markdown/page.tsx (1)

450-454: ⚠️ Potential issue | 🟠 Major

Add a descriptive title to the iframe embed example.

The example iframe is missing title, which creates an accessibility gap for screen-reader users.

♿ Suggested fix
       <iframe
+        title="Embedded Metaculus question example"
         src="https://www.metaculus.com/questions/embed/8/"
         height="320"
         width="550"
       ></iframe>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@front_end/src/app/`(main)/help/markdown/page.tsx around lines 450 - 454, The
iframe embed is missing a descriptive title attribute which is required for
accessibility; update the iframe element in page.tsx (the <iframe
src="https://www.metaculus.com/questions/embed/8/"> instance) to include a
concise, descriptive title such as "Metaculus question `#8` embed" (or similar
text that clearly describes the embedded content) so screen readers can convey
its purpose.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@front_end/src/app/`(main)/help/markdown/page_pt.tsx:
- Line 18: Update the insecure http links to use HTTPS: find the anchor elements
(e.g., the <a href="http://daringfireball.net/projects/markdown/">Markdown</a>{"
"} instance and the other similar <a href="http://daringfireball.net/...">
occurrences referenced) in page_pt.tsx and change their href values to start
with "https://", ensuring all Daring Fireball links (and any other http:// links
at the same locations) use "https://" instead.
- Around line 438-442: The iframe embed for
src="https://www.metaculus.com/questions/embed/8/" is missing a descriptive
title attribute; update the iframe element in page_pt.tsx to include a
meaningful title (e.g., "Metaculus question embed" or a Portuguese equivalent)
so assistive tech can describe the content, keeping the src, height, and width
attributes unchanged.

In `@front_end/src/app/`(main)/help/markdown/page.tsx:
- Line 26: Update the outbound documentation anchors in page.tsx to use HTTPS
instead of HTTP: replace href="http://daringfireball.net/projects/markdown/"
(and any other hrefs in the same file that start with "http://") with
"https://..." so all external Markdown/doc links (e.g., the anchor with link
text "Markdown" and the other occurrences flagged) use secure transport; ensure
you update every occurrence in the file (including the two additional instances
noted) so no external links remain on http.

---

Outside diff comments:
In `@front_end/src/app/`(main)/help/markdown/page.tsx:
- Around line 450-454: The iframe embed is missing a descriptive title attribute
which is required for accessibility; update the iframe element in page.tsx (the
<iframe src="https://www.metaculus.com/questions/embed/8/"> instance) to include
a concise, descriptive title such as "Metaculus question `#8` embed" (or similar
text that clearly describes the embedded content) so screen readers can convey
its purpose.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 116385f and 0d1b5a7.

📒 Files selected for processing (2)
  • front_end/src/app/(main)/help/markdown/page.tsx
  • front_end/src/app/(main)/help/markdown/page_pt.tsx

@SylvainChevalier
Copy link
Contributor Author

@claude address the failed tests and the review comments.

@claude
Copy link

claude bot commented Feb 27, 2026

Claude finished @SylvainChevalier's task in 3m 0s —— View job


Addressing failed tests and review comments

  • Check CI failures — Prettier formatting check failed on both files
  • Fix HTTP → HTTPS links in page.tsx (3 occurrences)
  • Fix HTTP → HTTPS links in page_pt.tsx (3 occurrences)
  • Add title to iframe embeds in page.tsx and page_pt.tsx
  • Run Prettier to fix formatting
  • Commit and push fixes

All issues addressed in commit 46629fc:

  • Switched all http://daringfireball.net links to https:// in both English and Portuguese pages
  • Added descriptive title attributes to iframe embeds for accessibility ("Metaculus question #8 embed" / "Incorporação da pergunta #8 do Metaculus")
  • Ran Prettier to fix formatting — format:check now passes
    |

- Switch http:// to https:// for Daring Fireball links in both pages
- Add descriptive title attribute to iframe embeds for accessibility
- Fix Prettier formatting

Co-authored-by: Sylvain <SylvainChevalier@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@front_end/src/app/`(main)/help/markdown/page.tsx:
- Around line 441-446: The hostname is inconsistent: the trusted-sites list
shows "<li>metaculus.com</li>" while the iframe example uses
"www.metaculus.com"; standardize them by making the iframe example use the same
root host or explicitly list both. Update the iframe string from `<iframe
src="https://www.metaculus.com/questions/embed/8/" ...>` to use
`https://metaculus.com/questions/embed/8/` (or alternatively change the list
item to include both "metaculus.com" and "www.metaculus.com") so the
trusted-sites list and the iframe example match; look for the list item
"<li>metaculus.com</li>" and the template string containing `<iframe
src="https://www.metaculus.com/questions/embed/8/"` to apply the change.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0d1b5a7 and 46629fc.

📒 Files selected for processing (2)
  • front_end/src/app/(main)/help/markdown/page.tsx
  • front_end/src/app/(main)/help/markdown/page_pt.tsx

Comment on lines 441 to 446
<li>metaculus.com</li>
</ul>
<p>Note that this means you can embed Metaculus questions:</p>
<p>For example, you can embed a Metaculus question via iframe:</p>
<pre>
{`<iframe src="https://www.metaculus.com/questions/embed/8/" height="320" width="550"></iframe>`}
</pre>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Align the Metaculus hostname between the trusted-sites list and iframe example.

Line 441 lists metaculus.com, while Line 445 uses www.metaculus.com. Please standardize this (or explicitly mention both) to avoid ambiguity about accepted iframe sources.

🛠️ Suggested docs-only fix
-        <li>metaculus.com</li>
+        <li>metaculus.com (including www.metaculus.com)</li>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@front_end/src/app/`(main)/help/markdown/page.tsx around lines 441 - 446, The
hostname is inconsistent: the trusted-sites list shows "<li>metaculus.com</li>"
while the iframe example uses "www.metaculus.com"; standardize them by making
the iframe example use the same root host or explicitly list both. Update the
iframe string from `<iframe src="https://www.metaculus.com/questions/embed/8/"
...>` to use `https://metaculus.com/questions/embed/8/` (or alternatively change
the list item to include both "metaculus.com" and "www.metaculus.com") so the
trusted-sites list and the iframe example match; look for the list item
"<li>metaculus.com</li>" and the template string containing `<iframe
src="https://www.metaculus.com/questions/embed/8/"` to apply the change.

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.

Update and link markdown help

1 participant