Closed Bug 2084332 Opened 1 month ago Closed 1 month ago

AITab UX QA - Footer top spacing

Categories

(Core :: Machine Learning: Frontend, defect)

defect

Tracking

()

VERIFIED FIXED
161 Branch
Tracking Status
firefox161 --- verified

People

(Reporter: giulia, Assigned: giulia)

References

(Blocks 1 open bug)

Details

(Whiteboard: [aiaug])

Attachments

(1 external file)

The spacing between the last section and the footer should be 96px.

Right now, it's 128px from the --aitab-sheet-radius and the flexible value for the --aitab-section-vertical-gap.
We need to find a way to reduce that spacing without affecting the border radius.

The extra space comes from two rules that add together:

  • aitab-page.css: .aitab-sheet sets padding-block-end: var(--aitab-sheet-radius), which is 128px. The same variable also sets the bottom corner radius (lines 31–33) and the footer tuck-under (lines 51–53).
  • aitab-base.css: each block component's inner <section> gets margin-block: var(--aitab-section-vertical-gap), which is 56px, or 73px above 900px. Each block is wrapped in a section.aitab-block flex item (aitab-page.mjs), and a flex item contains its children's margins, so the last block's bottom margin doesn't collapse away.

Today's gap is therefore 128px plus 56 or 73px, plus the sheet's 1px transparent bottom border. The footer's −128px top margin and 128px top padding cancel out, so the footer itself adds nothing.

Suggested fix:

  1. Separate the padding from the radius. In aitab-page.css, set .aitab-sheet { padding-block-end: 96px; } and leave --aitab-sheet-radius on the border radius and on the aitab-footer margin/padding.
  2. Remove the last block's bottom margin. In aitab-base.css, add an override hook: margin-block: var(--aitab-section-vertical-gap) var(--aitab-section-margin-block-end, var(--aitab-section-vertical-gap)). In aitab-page.css, add .aitab-block:last-child { --aitab-section-margin-block-end: 0; }. This has to be a custom property because the margin lives inside each block's shadow root. smartwindow-panel-list.css already uses this override-variable shape.

The alternative, padding-block-end: calc(96px - var(--aitab-section-vertical-gap)), is simpler. But it is only correct while the last block keeps the base margin, and it gives about 47–64px on header-only pages. With 96px padding, the 128px corner curve is only about 4px in from the side at the content's bottom edge, so nothing runs into the rounded corner.

Step 2 edits the same section rule in aitab-base.css that bug 2081574 (D335330) may touch for horizontal padding, so rebase onto it.

Test: nothing under browser/components/aiwindow/ui/test/ checks spacing yet. test_renders_page_config in browser_aitab_page.js already finds .aitab-sheet + aitab-footer. It could check that the last block's bottom edge sits 96px above the sheet's bottom edge, at widths both below and above 900px.

Suggested severity: S4. This is a cosmetic spacing difference from the spec on the AITab page; nothing is broken and no functionality is affected.


If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.
If you want to categorize your feedback you can add one of the following tags: ai-triage-{wrong-file, wrong-cause, hallucination, out-of-scope, not-a-bug, wrong-fix, shallow-fix, wrong-severity}.

Needinfo hackbot@mozilla.tld to have a patch generated for this bug, include any questions or directions as needed in your comment.

Assignee: nobody → gcardieri
Attachment #9666838 - Attachment description: WIP: Bug 2084332: Adjust space above footer for AITab → Bug 2084332: Adjust space above footer for AITab
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch

Verified as fixed in our latest Beta 161.0b1

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-ver-done-c161/b160]
QA Contact: rdoghi
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: