Skip to content

fix(web): remove gradient text and side-stripe ban violations#43

Merged
HusseinBaraja merged 9 commits intomainfrom
polish/landing-page
Apr 24, 2026
Merged

fix(web): remove gradient text and side-stripe ban violations#43
HusseinBaraja merged 9 commits intomainfrom
polish/landing-page

Conversation

@HusseinBaraja
Copy link
Copy Markdown
Owner

@HusseinBaraja HusseinBaraja commented Apr 24, 2026

  • Replace bg-clip-text gradient on 'في اليمن' with solid secondary color
  • Remove side-stripe border on inventory status card, use flat bg tint

Summary by CodeRabbit

  • New Features

    • Reduced-motion accessibility support for animations
    • Focus-visible outline for improved keyboard navigation
    • Page title and meta description updated to Arabic
  • Style

    • Refined animation easing across UI components and adjusted scroll/float indicators
    • Updated text colors from gray to primary/secondary tones
    • Simplified trust-section visuals and improved scrollbar color styling
  • Tests

    • Added tests validating reduced-motion behavior and animation suppression

- Replace bg-clip-text gradient on 'في اليمن' with solid secondary color
- Remove side-stripe border on inventory status card, use flat bg tint
- Hero chat timestamps: text-gray-400 → text-primary/35
- Flow subtitle: text-gray-500 → text-primary/50
- Scrollbar: hard-coded grays → oklch tinted toward brand hue (160°)
- Hero scroll indicator: animate-bounce → float-subtle
- Hero chat messages: back.out(1.5) → power3.out
- Problem chaos bubbles: back.out(1.7) → power4.out
- Layout nav links: back.out(2) → power3.out
- Title: CSCB → رضا — خدمة عملاء ذكية عبر واتساب
- Add Arabic meta description for SEO
- Show pain point cards on mobile (was hidden sm:grid → grid)
- Add :focus-visible ring using brand secondary color
- Guard TrustSection ambient animations with prefers-reduced-motion
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 24, 2026

Warning

Rate limit exceeded

@HusseinBaraja has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 42 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 5 minutes and 42 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 416f1510-19b5-4240-94e5-8c338d94928c

📥 Commits

Reviewing files that changed from the base of the PR and between 19cc3b8 and d02de25.

📒 Files selected for processing (1)
  • apps/web/src/index.css
📝 Walkthrough

Walkthrough

Updated landing-page UI: HTML metadata changed to Arabic; multiple components had animation easings and small style tweaks; TrustSection gained reduced-motion handling and visual simplifications; CSS updated for scrollbar and focus-visible styles; tests now mock and assert reduced-motion behavior.

Changes

Cohort / File(s) Summary
Page Metadata
apps/web/index.html
Changed document title and meta description from English to Arabic describing an intelligent WhatsApp customer-service assistant.
Animation Easing Updates
apps/web/src/components/layout/Layout.tsx, apps/web/src/components/sections/HeroSection.tsx, apps/web/src/components/sections/ProblemSection.tsx
Replaced several GSAP back.out(...) easings with power3.out/power4.out; swapped animate-bounce to float-subtle in Hero. Minor entrance animation parameter edits.
Text Color & Styling
apps/web/src/components/sections/FlowSection.tsx, apps/web/src/components/sections/HeroSection.tsx
Adjusted text color classes: FlowSection subtitle to text-primary/50; Hero message timestamps to text-primary/35.
Layout Visibility
apps/web/src/components/sections/ProblemSection.tsx
Removed hidden class from pain-cards container so it always renders as the responsive grid.
Accessibility & Visual Simplification
apps/web/src/components/sections/TrustSection.tsx, apps/web/src/components/sections/TrustSection.vitest.tsx
Added prefers-reduced-motion detection to disable ambient GSAP rotations and strip animation classes when requested; updated trust visuals (class renames, solid text-secondary span, simplified price card overlay); tests mock/restore matchMedia and assert reduced-motion behavior.
Global Styles
apps/web/src/index.css
Updated scrollbar colors to use oklch(...), added :focus-visible outline style, and adjusted reduced-motion media-query formatting/blocks.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰
I hopped through easing curves and hue,
Swapped bouncy springs for power3 true,
I hushed the spins for gentle eyes,
And painted focus where comfort lies,
A tiny rabbit cheers — your site feels new! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title focuses on removing gradient text and side-stripe violations, but the changeset includes broader updates: animation easing changes (back.out to power3.out), color updates, reduced-motion accessibility handling, and scrollbar styling improvements across multiple components. Revise the title to reflect the primary focus. Consider: 'refactor(web): polish animations, colors, and accessibility' or similar to better capture the full scope of visual and animation updates beyond the specific violations mentioned.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch polish/landing-page

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.

@HusseinBaraja
Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 24, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/web/src/components/sections/TrustSection.tsx`:
- Around line 51-68: The component only gates GSAP rotations using
prefersReducedMotion/ambientGlow and ambientGlowReverse but leaves other
infinite animations running (the flow packets, pipeline node pings, Zap icon
pulse, and emerald dot pulse). Stop these by either adding a global CSS
media-query that disables the listed animations for prefers-reduced-motion
(targeting classes like animate-[flowPacket_1.6s_infinite_linear], animate-ping,
animate-[pulse_2s_infinite], and animate-pulse) or by toggling a
“reduced-motion” class from the component (use the existing prefersReducedMotion
variable) and conditionally removing/avoiding those classes on elements
(packets, pipeline nodes, Zap icon, emerald dot) so all continuous animations
respect the user preference.

In `@apps/web/src/index.css`:
- Around line 34-56: The :focus-visible rule is duplicated inside both `@media`
(prefers-reduced-motion: no-preference) and `@media` (prefers-reduced-motion:
reduce) but is identical to the global :focus-visible in the base layer; remove
the redundant :focus-visible blocks from both media queries and keep the single
:focus-visible declaration outside them (ensure the scroll-behavior rules for
html, body remain inside the relevant media queries and that only the duplicated
focus-ring declarations are deleted).
- Around line 27-31: Remove the forced corner rounding from the global
:focus-visible rule by deleting the "border-radius: 4px" declaration so outlines
can inherit each element's own rounding (e.g., classes like rounded-full,
rounded-2xl, rounded-[40px] will remain intact); also remove the duplicated
:focus-visible rules inside both `@media` (prefers-reduced-motion: ...) blocks
since they are identical dead code to the base rule and are unnecessary.
🪄 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: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b35ec84d-72bd-4876-86bc-7f558767f112

📥 Commits

Reviewing files that changed from the base of the PR and between 2c192b4 and e46c4af.

📒 Files selected for processing (7)
  • apps/web/index.html
  • apps/web/src/components/layout/Layout.tsx
  • apps/web/src/components/sections/FlowSection.tsx
  • apps/web/src/components/sections/HeroSection.tsx
  • apps/web/src/components/sections/ProblemSection.tsx
  • apps/web/src/components/sections/TrustSection.tsx
  • apps/web/src/index.css
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use the @cs/* path aliases from tsconfig.base.json for cross-package imports

Files:

  • apps/web/src/components/sections/FlowSection.tsx
  • apps/web/src/components/layout/Layout.tsx
  • apps/web/src/components/sections/TrustSection.tsx
  • apps/web/src/components/sections/HeroSection.tsx
  • apps/web/src/components/sections/ProblemSection.tsx
🔇 Additional comments (9)
apps/web/index.html (1)

7-8: Localized title and description look correct and aligned with page language.

Good update for Arabic SEO/context; both tags are clear, consistent with RTL/Arabic setup, and non-breaking.

apps/web/src/components/sections/FlowSection.tsx (1)

222-224: Looks good — subtitle color update is clean and scoped.

This styling change is consistent with the polish objective and does not introduce behavioral risk.

apps/web/src/components/layout/Layout.tsx (1)

47-55: LGTM — easing swap is safe.

power3.out is a valid GSAP easing and the rest of the tween (duration/stagger/delay) is unchanged, so the pop-in keeps its timing while just losing the overshoot. No functional concerns.

apps/web/src/components/sections/HeroSection.tsx (2)

44-55: LGTM — chat message easing change.

power3.out is valid and the overshoot removal aligns with the broader PR motion cleanup.


229-237: LGTM — scroll indicator animation swap.

float-subtle is defined in apps/web/src/index.css (lines 88-91 keyframes, 120-122 class) with the expected 4s ease-in-out infinite loop, so the class reference resolves correctly.

apps/web/src/components/sections/ProblemSection.tsx (2)

59-72: LGTM — chaos bubble easing change.

power4.out is valid and removes the prior overshoot while keeping the staggered random rotation/translation. No behavior regression.


109-128: LGTM — pain cards now animate on mobile as intended.

Dropping hidden ensures the .pain-card GSAP from tween (registered at lines 75-85) now actually reveals on small viewports since .pain-cards-container is present in the DOM at mount and its ScrollTrigger will fire. This matches the PR's "show certain cards on mobile" goal.

apps/web/src/components/sections/TrustSection.tsx (2)

180-189: LGTM — solid secondary color replaces gradient clip.

Matches the PR's stated goal of removing the bg-clip-text gradient on "في اليمن." in favor of a flat text-secondary. No a11y or RTL concerns introduced.


259-266: LGTM — flat tint replaces side-stripe.

Swapping the absolutely-positioned side stripe for a simple bg-emerald-500/5 tint with a matching border keeps the visual affordance while simplifying the DOM and avoiding the "ban violation" called out in the PR description.

Comment thread apps/web/src/components/sections/TrustSection.tsx
Comment thread apps/web/src/index.css
Comment thread apps/web/src/index.css
HusseinBaraja and others added 3 commits April 24, 2026 11:34
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…ries.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/web/src/index.css (1)

33-43: ⚠️ Potential issue | 🔴 Critical

Critical: literal backticks around @media break both media-query blocks.

Lines 33 and 39 contain `@media` with backtick characters wrapping the at-rule. This is invalid CSS — Biome reports unexpected character \``, and Stylelint parses them as a bogus type selector `` @media `` (selector-type-no-unknown). Neither rule applies at runtime: scroll-behavior: smoothfor users without motion preferences andscroll-behavior: auto` for reduced-motion are both silently dropped, so the intended smooth-scroll behavior on the landing page is gone.

🔧 Proposed fix
-`@media` (prefers-reduced-motion: no-preference) {
+@media (prefers-reduced-motion: no-preference) {
   html, body {
     scroll-behavior: smooth;
   }
 }

-`@media` (prefers-reduced-motion: reduce) {
+@media (prefers-reduced-motion: reduce) {
   html, body {
     scroll-behavior: auto;
   }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/index.css` around lines 33 - 43, The CSS media-query blocks are
written with literal backticks around `@media`, making selectors invalid and
dropping scroll-behavior rules; remove the backticks so the at-rule reads `@media`
(prefers-reduced-motion: no-preference) { html, body { scroll-behavior: smooth;
} } and `@media` (prefers-reduced-motion: reduce) { html, body { scroll-behavior:
auto; } } — locate the two blocks containing `@media` and replace the
backtick-wrapped token with the correct `@media` at-rule so the scroll-behavior
declarations on html and body take effect.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@apps/web/src/index.css`:
- Around line 33-43: The CSS media-query blocks are written with literal
backticks around `@media`, making selectors invalid and dropping scroll-behavior
rules; remove the backticks so the at-rule reads `@media` (prefers-reduced-motion:
no-preference) { html, body { scroll-behavior: smooth; } } and `@media`
(prefers-reduced-motion: reduce) { html, body { scroll-behavior: auto; } } —
locate the two blocks containing `@media` and replace the backtick-wrapped token
with the correct `@media` at-rule so the scroll-behavior declarations on html and
body take effect.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4a49925e-f992-4832-847e-1fc723041df8

📥 Commits

Reviewing files that changed from the base of the PR and between e46c4af and 19cc3b8.

📒 Files selected for processing (3)
  • apps/web/src/components/sections/TrustSection.tsx
  • apps/web/src/components/sections/TrustSection.vitest.tsx
  • apps/web/src/index.css
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use the @cs/* path aliases from tsconfig.base.json for cross-package imports

Files:

  • apps/web/src/components/sections/TrustSection.vitest.tsx
  • apps/web/src/components/sections/TrustSection.tsx
🪛 Biome (2.4.12)
apps/web/src/index.css

[error] 33-33: unexpected character ```

(parse)


[error] 33-33: unexpected character ```

(parse)


[error] 39-39: unexpected character ```

(parse)


[error] 39-39: unexpected character ```

(parse)

🪛 Stylelint (17.9.0)
apps/web/src/index.css

[error] 33-33: Unknown type selector "@media" (selector-type-no-unknown)

(selector-type-no-unknown)


[error] 39-39: Unknown type selector "@media" (selector-type-no-unknown)

(selector-type-no-unknown)

🔇 Additional comments (5)
apps/web/src/components/sections/TrustSection.vitest.tsx (2)

52-84: LGTM — reduced-motion test is well-scoped.

The mock is configured before the dynamic import of TrustSection, so useGSAP reads the stubbed matchMedia at render time. The dual assertions (no gsapTo for either ambient glow + no animate-* classes on all four trust sub-elements) cleanly cover the runtime guard in TrustSection.tsx L53-81. Nice coverage.


24-36: The current Object.defineProperty approach for mocking matchMedia is correct and aligns with Vitest best practices.

The suggestion to use vi.stubGlobal is not recommended for matchMedia. According to Vitest documentation and common practices, Object.defineProperty is the preferred pattern for matchMedia mocking because vi.stubGlobal may be too late if the mocked property is accessed during module evaluation. The current implementation correctly handles this by setting up the mock in beforeEach before dynamically importing TrustSection.

apps/web/src/components/sections/TrustSection.tsx (3)

51-81: LGTM — reduced-motion gate now covers the loud, continuous animations.

matchMedia is read via optional chaining with a safe fallback, class stripping happens inside useGSAP (i.e., in a layout effect, before paint, so no flash-of-animation), and the selector list correctly targets all four infinite-loop elements in the markup (trust-flow-packet × 2, trust-pipeline-ping × 2, trust-zap-pulse, trust-availability-pulse). Ambient rotations are correctly skipped under reduced motion.

One caveat worth knowing: there's no listener for motion-preference changes mid-session, so the decision is latched at mount. Acceptable for a landing page, but worth keeping in mind if the section ever gains client-side re-mount scenarios.


196-196: LGTM — gradient-text ban resolved.

Replacing the bg-clip-text gradient with a solid text-secondary span satisfies the PR objective; the warm gold on the light alabaster background clears WCAG AA at this font weight/size. No accessibility regression.


272-279: LGTM — side-stripe removed, flat tint applied.

bg-emerald-500/5 + border border-emerald-500/15 matches the PR objective of a flat background tint without the previous inline absolute side-stripe. relative overflow-hidden are now only carrying their weight for rounded-corner clipping, which is fine.

@HusseinBaraja HusseinBaraja merged commit 068a18f into main Apr 24, 2026
1 check passed
@HusseinBaraja HusseinBaraja deleted the polish/landing-page branch April 24, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant