Skip to content

fix(editor): stretch latex preview content#14857

Merged
darkskygit merged 2 commits intotoeverything:canaryfrom
aisharoslan:fix-latex-preview
May 3, 2026
Merged

fix(editor): stretch latex preview content#14857
darkskygit merged 2 commits intotoeverything:canaryfrom
aisharoslan:fix-latex-preview

Conversation

@aisharoslan
Copy link
Copy Markdown
Contributor

@aisharoslan aisharoslan commented Apr 19, 2026

Summary of Changes

Resolves #13340. Change align-items to stretch to full width to avoid tag/label from overlapping with equation.

Screenshot Verification

Before
Screenshot 2026-04-19 at 5 58 03 PM

After
Screenshot 2026-04-19 at 5 58 16 PM

Summary by CodeRabbit

  • Style
    • Improved the vertical alignment of LaTeX block content to better utilize container space.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 19, 2026

📝 Walkthrough

Walkthrough

Updated the LaTeX block container's flex alignment property from align-items: center to align-items: stretch to adjust how child elements are positioned vertically within the container.

Changes

Cohort / File(s) Summary
LaTeX Styling
blocksuite/affine/blocks/latex/src/styles.ts
Modified .latex-block-container flex alignment from align-items: center to align-items: stretch to fix visual alignment of LaTeX block content.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The PR successfully resolves #13340 by implementing the CSS alignment fix (stretch vs center) to prevent visual overlap between LaTeX equations and labels/tags.
Out of Scope Changes check ✅ Passed The change is narrowly focused on fixing the reported LaTeX preview rendering issue with a single CSS property modification, with no extraneous changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The PR title clearly and specifically summarizes the main change: stretching LaTeX preview content to fix layout issues, which directly addresses the core objective.

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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

@aisharoslan aisharoslan changed the title stretch latex content fix(editor): Stretch latex preview content Apr 19, 2026
@aisharoslan aisharoslan changed the title fix(editor): Stretch latex preview content fix(editor): Stretch LaTeX preview content Apr 19, 2026
@darkskygit darkskygit force-pushed the canary branch 5 times, most recently from 3403237 to 78a9942 Compare April 29, 2026 11:31
@aisharoslan aisharoslan changed the title fix(editor): Stretch LaTeX preview content fix(editor): stretch latex preview content May 3, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.12%. Comparing base (7046ad7) to head (d9cdc70).
⚠️ Report is 7 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff             @@
##           canary   #14857      +/-   ##
==========================================
+ Coverage   47.43%   56.12%   +8.68%     
==========================================
  Files        3162     3166       +4     
  Lines      171118   172189    +1071     
  Branches    22694    24963    +2269     
==========================================
+ Hits        81176    96640   +15464     
+ Misses      86506    72101   -14405     
- Partials     3436     3448      +12     
Flag Coverage Δ
server-test 75.75% <ø> (+17.38%) ⬆️
unittest 34.42% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@darkskygit darkskygit merged commit 74d5eba into toeverything:canary May 3, 2026
111 of 119 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[Bug]: Latex preview error.

2 participants