Skip to content

#1061 Fix footnote being shifted to the right#1072

Merged
chrisvire merged 3 commits into
sillsdev:mainfrom
benpaj-cps:fix/center-footnotes/1061
Jul 17, 2026
Merged

#1061 Fix footnote being shifted to the right#1072
chrisvire merged 3 commits into
sillsdev:mainfrom
benpaj-cps:fix/center-footnotes/1061

Conversation

@benpaj-cps

@benpaj-cps benpaj-cps commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Closes #1061.

DaisyUI stacks after v5 don't have these styles by default, so I re-added them in the app.css.

Before:
image

After:
image

Summary by CodeRabbit

  • Style
    • Centered footnote content within its container for improved layout consistency by refining the footnote layout wrapper and centering each footnote card.

@benpaj-cps
benpaj-cps requested review from FyreByrd and chrisvire July 14, 2026 17:58
@benpaj-cps benpaj-cps self-assigned this Jul 14, 2026
@benpaj-cps benpaj-cps added the bug Something isn't working label Jul 14, 2026
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@benpaj-cps, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 56 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5312013d-4bea-416d-8c3e-c333eef7a796

📥 Commits

Reviewing files that changed from the base of the PR and between 17bee82 and 64fcceb.

📒 Files selected for processing (1)
  • src/routes/text/+page.svelte
📝 Walkthrough

Walkthrough

The rendered footnote stack in StackView.svelte now uses a centering wrapper, and each footnote container adds place-self-center while retaining its existing styling and click behavior.

Changes

Footnote Alignment

Layer / File(s) Summary
Center footnote stack
src/lib/components/StackView.svelte
Wraps the stack in flex justify-center and adds place-self-center to each footnote container.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested labels: bug

Suggested reviewers: chrisvire, fyrebyrd

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the main change: fixing the footnote alignment regression.
Linked Issues check ✅ Passed The changes restore horizontal centering for footnotes, matching issue #1061.
Out of Scope Changes check ✅ Passed The edits are limited to the StackView layout fix and stay within the issue scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@benpaj-cps benpaj-cps changed the title Fix footnote being shifted to the right #1061 Fix footnote being shifted to the right Jul 14, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/lib/styles/app.css (1)

156-156: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Configure Stylelint to recognize Tailwind’s @utility directive.

Stylelint currently reports scss/at-rule-no-unknown on this line. If CSS linting is blocking, this change can fail CI even though @utility is valid Tailwind CSS v4 syntax. (tailwindcss.com)

Add utility to the rule’s allowed at-rules or use a Tailwind-aware Stylelint configuration.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/lib/styles/app.css` at line 156, Update the Stylelint configuration for
scss/at-rule-no-unknown to recognize Tailwind CSS v4’s utility at-rule by adding
utility to its allowed at-rules, or apply the project’s Tailwind-aware
configuration. Keep the existing lint rules unchanged otherwise.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/lib/styles/app.css`:
- Around line 156-159: Update the dy-stack utility in the app stylesheet to
include display: grid alongside its existing place-items and align-items
declarations, ensuring the footnotes wrapper applies those alignment properties.

---

Nitpick comments:
In `@src/lib/styles/app.css`:
- Line 156: Update the Stylelint configuration for scss/at-rule-no-unknown to
recognize Tailwind CSS v4’s utility at-rule by adding utility to its allowed
at-rules, or apply the project’s Tailwind-aware configuration. Keep the existing
lint rules unchanged otherwise.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1ae3b3fb-8f1d-41aa-8d88-5afabb1c036a

📥 Commits

Reviewing files that changed from the base of the PR and between 0d717bc and f7373a3.

📒 Files selected for processing (1)
  • src/lib/styles/app.css

Comment thread src/lib/styles/app.css Outdated
Comment on lines +156 to +159
@utility dy-stack {
place-items: center;
align-items: flex-end;
}

@coderabbitai coderabbitai Bot Jul 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -n -C3 'dy-stack|display:\s*(grid|flex)' \
  src/lib/styles/app.css \
  src/lib/components/StackView.svelte

Repository: sillsdev/appbuilder-pwa

Length of output: 1932


🏁 Script executed:

#!/bin/bash
sed -n '100,170p' src/lib/styles/app.css
printf '\n----\n'
sed -n '100,140p' src/lib/components/StackView.svelte
printf '\n----\n'
rg -n '`@utility` dy-|display:\s*(grid|flex)' src/lib/styles/app.css

Repository: sillsdev/appbuilder-pwa

Length of output: 3515


Add display: grid to src/lib/styles/app.css:156-159. dy-stack is applied to the footnotes wrapper, but place-items and align-items need a grid or flex container to take effect.

🧰 Tools
🪛 Stylelint (17.14.0)

[error] 156-156: Unexpected unknown at-rule "@utility" (scss/at-rule-no-unknown)

(scss/at-rule-no-unknown)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/lib/styles/app.css` around lines 156 - 159, Update the dy-stack utility
in the app stylesheet to include display: grid alongside its existing
place-items and align-items declarations, ensuring the footnotes wrapper applies
those alignment properties.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@benpaj-cps I looked at this. I see in the text route that the is a container div with flex. Should that be inside the StackView and have the appropriate tailwind equivalent classes applied?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done. That's probably the better way to do it, since after a quick grep the StackView is the only place in the PWA that dy-stack is used.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

@benpaj-cps
benpaj-cps force-pushed the fix/center-footnotes/1061 branch from f7373a3 to 4690a97 Compare July 15, 2026 13:56
@benpaj-cps

Copy link
Copy Markdown
Contributor Author

@chrisvire A minor style difference: v4 DaisyUI applies custom scaling to successive children of the top-of-stack container, while v5 doesn't. Is it worth porting the scaling rules to keep the look, or is this not an issue?

Before:
image

After:
image

@chrisvire

Copy link
Copy Markdown
Member

Remove the flex div from the route/text/+page.svelte and we should be good to go.

As for the minor style difference between DaisyUI v4 and v5, I think it is fine how it is. If I remember correctly, there was some concern on smaller phones if there was too big a stack that this effect could cause problems. So it is probably better to leave it out.

@chrisvire chrisvire left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@chrisvire
chrisvire merged commit 30a37a4 into sillsdev:main Jul 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

Footnotes are not horizontally centered

2 participants