Stray divider and bottom dead space in resource-box
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
Research direction
Start with add_resource_box_slide in src/presentations/slides.py, especially the divider code at slides.py:404-411 and row positioning near line 415. Run the provided uv MRE to inspect the rendered deck. Done means dividers appear only between adjacent rows and rows are vertically distributed without the visible bottom gap.
Written by the indexing model from the issue text.
Description
Summary
Every resource-box box draws exactly one horizontal divider at a fixed offset regardless of row count: in a single-row box it becomes a stray underline beneath the lone row, and all boxes show empty space at the bottom because rows cluster near the top.
Impact
Medium — cosmetic but consistently wrong on every resource box (stray line on one-row boxes; unused bottom padding on all).
Environment
ms-presentationsversion: 0.1.6- Python version: 3.10+
- OS / version: reproduces on all (verified on Windows 11)
- Install method: pip / from source
- Relevant deps (if Azure path): n/a — renders fully locally, no Azure
- Azure / model config: n/a
Steps to Reproduce
- Author a
resource-boxslide with a mix of one-row and multi-row boxes. - Render and open the
.pptx.
Minimal Reproducible Example (MRE)
# /// script
# requires-python = ">=3.10"
# dependencies = ["ms-presentations==0.1.6"]
# ///
"""Self-contained MRE — stray divider and bottom dead space in resource-box.
Run with: uv run mse.py (no venv, no Azure, no network)
One divider is drawn at a fixed 0.38" offset per box regardless of row count, and
rows are top-anchored leaving unused bottom padding. The one-row "Solo" box shows
a stray underline with empty space below; every box clusters rows at the top with
a gap at the bottom. Open the rendered deck and inspect the dividers and bottom
margins — the deck is the only output.
"""
import os
import tempfile
from presentations.cli import main
SPEC = """\
---
title: Repro - Stray divider + bottom dead space
output: Stray_Divider_Deadspace.pptx
---
## [resource-box] Getting started
**Subtitle**: Resources
**Box**: Two
- Row One | https://example.com/1
- Row Two | https://example.com/2
**Box**: Solo
- Lonely Row | https://example.com/solo
**Box**: Three
- Row A | https://example.com/a
- Row B | https://example.com/b
- Row C | https://example.com/c
"""
with tempfile.TemporaryDirectory() as d:
spec_path = os.path.join(d, "minimal.spec.md")
with open(spec_path, "w", encoding="utf-8") as f:
f.write(SPEC)
main([spec_path, "-o", os.getcwd()]) # renders the deck into the PWD
uv run mse.py
Expected Behavior
A divider appears only between adjacent rows (none in a single-row box), and rows are distributed so the box isn't bottom-heavy with whitespace.
Actual Behavior
The one-row "Solo" box has a stray underline with empty space below; "Two" and "Three" cluster rows at the top with a visible gap at the bottom.
Additional Context
Root cause in add_resource_box_slide (src/presentations/slides.py):
- Divider drawn once at a fixed offset regardless of row count:
div_y = box_top + Inches(0.38)(slides.py:404-411). - Rows top-anchored at
box_top + 0.08, 0.5" apart (slides.py:415), whilecontainer_height = 0.5*num_rows + 0.35— the trailing +0.35" is never used → bottom dead space.
Suggested fix: draw inter-row dividers inside the row loop (skip for num_rows == 1) and vertically center the row block within the container. Keep container_height unchanged so this composes with the badge-height clamp fix (they touch disjoint lines in the same function).
- Dominant language
- Python
- Stars
- 10
- Forks
- 3
- Avg merge
- 24d 6h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/presentations
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/presentations#11 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
microsoft/presentations#10 ·
-
Difficulty 2/5 Half a day Newbie friendliness 82/100
-
Difficulty 5/5 Over a week Newbie friendliness 48/100
microsoft/presentations#18 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
microsoft/presentations#17 · 1 comment ·
All issues in microsoft/presentations
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100