Hi there 👏
| 🌸 Tech |
| 5 high, 5 medium, 6 low |
The merge request introduces flexbox to several components (.small-action, .extra-info-wrapper, .contents) as part of a header optimization effort. While the direction is sound, the implementation contains several critical and medium-severity issues that must be addressed before merging. Key problems include: (1) dead CSS and ignored float declarations in topic-post.scss due to flexbox conversion, (2) removal of essential padding/margins causing cramped text, (3) clearfix conflict with flexbox in header.scss, (4) missing flex-wrap and flex-shrink protection leading to potential layout collapse, (5) an invalid vendor prefix -ms-align-items in the new flexbox mixins that will produce dead CSS, and (6) inconsistent prefix ordering in the inline-flex() mixin. The badges.css.scss change is clean and well-motivated. Ensure all findings are resolved particularly the critical float and pseudo-element issues.
These might need a close look
- 🔴 app/assets/stylesheets/common/base/topic-post.scss (L312)
CRITICAL: clear: both on .small-action (now a flex container) has no effect per CSS spec and should be removed.
- 🔴 app/assets/stylesheets/common/base/topic-post.scss (L282)
CRITICAL: float: left on .topic-avatar is ignored as flex items do not float. Use flex properties (e.g., order or margin) instead.
- 🔴 app/assets/stylesheets/common/base/topic-post.scss (L309)
CRITICAL: float: right on button is ignored; use margin-left: auto to push button to the right edge.
- 🔴 app/assets/stylesheets/common/base/header.scss (L14)
CRITICAL: .contents has class clearfix which adds :before/:after pseudo-elements with display: table. These become anonymous flex items and disrupt layout. Override or remove the clearfix class.
- 🔴 app/assets/stylesheets/common/foundation/mixins.scss (L118)
BUG: -ms-align-items is invalid; IE10/IE11 use -ms-flex-align. Remove this line.
Worth checking
- app/assets/stylesheets/common/base/topic-post.scss (L290)
MAJOR: .small-action-desc padding changed to 0 1.5%, removing vertical padding. Consider retaining at least 0.5em 0.
- app/assets/stylesheets/common/base/topic-post.scss (L296)
MAJOR: margin removed from p inside .custom-message. Multiple <p> elements will appear as a single block. Retain margin-bottom for readability.
- app/assets/stylesheets/common/base/topic.scss (L33)
MEDIUM: margin-top: 5px removed from .badge-wrapper.bullet inside .extra-info-wrapper. Verify vertical alignment with flexbox baseline.
- app/assets/stylesheets/common/base/header.scss (L18)
MAJOR: .contents flex container lacks flex-wrap. Items may overflow or shrink on narrow viewports. Add flex-wrap: wrap.
- app/assets/stylesheets/common/base/header.scss (L19)
MAJOR: .title block removed entirely; .title now has zero base styling and can shrink. Add flex-shrink: 0 to prevent collapse.
Small things (take or leave)
- 🔵 app/assets/stylesheets/common/base/topic-post.scss (L307)
MINOR: padding-top: 4px removed from .small-action-desc > p. Verify vertical spacing is adequate.
- 🔵 app/assets/stylesheets/common/base/topic.scss (L30)
MINOR: @include order(2) on .extra-info-wrapper is valid but order values skip 1. Could simplify to consecutive values.
- 🔵 app/assets/stylesheets/common/base/header.scss (L30)
MINOR: .valign-helper is vestigial with align-items: center on parent. Consider removing from template or hiding.
- 🔵 app/assets/stylesheets/common/foundation/mixins.scss (L119)
STYLE: Missing space after colon in align-items:$alignment;. Should be align-items: $alignment;.
- 🔵 app/assets/stylesheets/common/foundation/mixins.scss (L106)
STYLE: Vendor prefix ordering in inline-flex() mixin is inconsistent with flexbox(). Reorder to oldest-to-newest cascade.
- 🔵 app/assets/stylesheets/common/foundation/mixins.scss (L114)
CONSIDERATION: -webkit-box-align uses old value keywords (start/end). Passing flex-start/flex-end would be ignored by old WebKit. Add value mapping or document limitation.
This PR is purely CSS/SCSS — no Ruby or JavaScript involved. FriendlyReviewer handled it well overall, though with some systematic over-classification.
Golden #2 (
-ms-align-items) was found perfectly, with an exact fix suggestion matching the reference benchmark. Golden #1 (float+flexbox conflict) was partially detected: FriendlyReviewer identified 4 instances of the conflict (topic-avatar, button, clear:both, and the clearfix on.contents), but missed the specific scenario of.panelin a noscript context — a narrow edge case.FriendlyReviewer systematically over-classified severity: the float+flexbox findings were rated RED/CRITICAL, while the golden benchmark rates them as LOW. The
-ms-align-itemsissue was also marked RED despite being a straightforward invalid vendor prefix.The supplementary findings are mostly legitimate. The visual regression flags (padding removed, margin stripped, missing flex-wrap and flex-shrink) are genuine concerns that would affect real users. The style-level findings (vendor prefix ordering, missing space, vestigial markup) are noise — technically valid but inconsequential. This is an acceptable trade-off: the wide net catches real issues, and the noise ratio is low.
Overall, FriendlyReviewer is performant on pure CSS/SCSS PRs — it finds structural bugs (float+flexbox incompatibility, invalid prefixes) and visual regressions (padding, margin, flex-wrap, flex-shrink). The only notable defect is the consistent over-classification of severity.