Repository navigation
www: blog - #47236
www: blog#47236
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR adds a shared blog layout hero, moves blog list/grid preference from local storage to cookies, refactors blog index/category/author listing clients around shared filters, restyles listing and post components, and adds a new CTA section plus author avatar reuse. ChangesBlog experience refresh
Sequence Diagram(s)sequenceDiagram
participant Browser
participant BlogPage
participant BlogClient
participant BlogFilters
participant BlogViewToggle
Browser->>BlogPage: request blog route
BlogPage->>BlogPage: read BLOG_VIEW_COOKIE
BlogPage->>BlogClient: render initialBlogs, totalPosts, initialView
BlogClient->>BlogFilters: pass view, setView, filter handlers
BlogFilters->>BlogViewToggle: render toggle
BlogViewToggle->>BlogClient: setView(nextView)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/www/components/Blog/BlogFilters.tsx (1)
216-219: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winMobile close hides the search UI but does not clear active filtering.
On Line 216-219, the close button only calls
setSearchTerm('')and hides the input. It never callshandleSearchByText(''), so parent filtering and URL query state can remain active while the input appears cleared.Proposed fix
<InputGroupButton onClick={() => { - setSearchTerm('') + handleSearchByText('') setShowSearchInput(false) }} >🤖 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 `@apps/www/components/Blog/BlogFilters.tsx` around lines 216 - 219, The close button onClick handler in BlogFilters only clears the local search input state with setSearchTerm('') and hides the input with setShowSearchInput(false), but does not clear the active filtering in the parent component. Add a call to handleSearchByText('') in the onClick handler alongside the existing state updates to ensure that the search filtering is properly reset and the URL query state is updated when the close button is clicked on mobile.
🤖 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 `@apps/www/app/blog/authors/`[author]/AuthorClient.tsx:
- Around line 97-101: The BlogFilters component is configured with an
onFilterChange callback that triggers navigation to the /blog page when
filtering occurs, but on the author page we want to filter the current author's
posts locally without navigating away. Remove the onFilterChange prop from the
BlogFilters component in AuthorClient.tsx, and instead handle the search
functionality locally by binding the search input directly to the existing
setSearchTerm state setter to filter posts on the current author page only.
In `@apps/www/components/CTASection.tsx`:
- Around line 152-157: Remove the unused `useContributors()` hook call on line
152 in the CTASection component. Since the AvatarCloud component that consumes
the contributors data is commented out on line 156, the hook is fetching GitHub
API data that is never used, creating unnecessary third-party API requests and
rate-limit risk. Delete the entire line declaring the contributors constant and
the corresponding commented AvatarCloud component reference if it remains
unused.
---
Outside diff comments:
In `@apps/www/components/Blog/BlogFilters.tsx`:
- Around line 216-219: The close button onClick handler in BlogFilters only
clears the local search input state with setSearchTerm('') and hides the input
with setShowSearchInput(false), but does not clear the active filtering in the
parent component. Add a call to handleSearchByText('') in the onClick handler
alongside the existing state updates to ensure that the search filtering is
properly reset and the URL query state is updated when the close button is
clicked on mobile.
🪄 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 (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: f0af61af-b803-4543-8bc5-3207a8137beb
📒 Files selected for processing (19)
apps/www/app/blog/BlogClient.tsxapps/www/app/blog/BlogHero.tsxapps/www/app/blog/BlogLayoutShell.tsxapps/www/app/blog/authors/[author]/AuthorClient.tsxapps/www/app/blog/authors/[author]/page.tsxapps/www/app/blog/blog-view.tsapps/www/app/blog/categories/[category]/CategoryClient.tsxapps/www/app/blog/categories/[category]/page.tsxapps/www/app/blog/layout.tsxapps/www/app/blog/page.tsxapps/www/components/Blog/AuthorAvatars.tsxapps/www/components/Blog/BlogFilters.tsxapps/www/components/Blog/BlogGridItem.tsxapps/www/components/Blog/BlogListItem.tsxapps/www/components/Blog/BlogPostRenderer.tsxapps/www/components/Blog/BlogViewToggle.tsxapps/www/components/Blog/FeaturedThumb.tsxapps/www/components/CTASection.tsxapps/www/components/ScrollProgress.tsx
dnywh
left a comment
There was a problem hiding this comment.
Minor whitespace bug as mentioned!
There was a problem hiding this comment.
Again, this is not an exhaustive list of a11y errors, but this is what stood out to me.
Search icon is missing discernible text
Author's name read twice
Screenreaders read the thumbnail as his name and his name, which is redundant information. You can probably put aria-hidden on the tiny thumbnail.
Blog title read twice
Same problem here. The thumbnail is the title, so the title is read aloud twice in a row.
Invisible Blog h1, read after the first h2
I went through the hero post before hearing the h1.
Violates rules WCAG 1.3.1 – Info and Relationships (Level A) and WCAG 2.4.6 – Headings and Labels (Level AA)
If, for style reasons, you do not want a big, bold "Blog," maybe you can de-emphasize it and make it look more like a breadcrumb?
Magnifying glass icon is read aloud
The magnifying glass can be made aria-hidden="true"
Views do not say when they are toggled on and off
These just say they are 'buttons' and I can't tell which is enabled on screenreader.
Context is missing on categories
I hear links read aloud like "Engineering," but I don't know what it does. It's helpful to include extra context in the aria label, like Filter blogs by category: Engineering.
Other missing context
It is helpful to label the information with aria-labels.
For example, Author: John Doe
Or Publication Date: June 23rd, 2026
Hero blog post is not grouped
There is no semantic grouping for the hero post.
Blog post scroll is seemingly endless
There is no end to the blog posts on the page, seemingly, but there is. It might be nice to put the blog posts in an ul so that the screenreader would read aloud the number of items.
|
@czenko addressed the a11y issues |
czenko
left a comment
There was a problem hiding this comment.
Ran is through a screenreader again. 😁 Greatly improved. Thank you!
Noticed:
- h1 is moved to correct placement. Still not visible, but I understand.
- Hero blog post is wrapped in a link and an article. Reads aloud with context.
- Secondary blog posts are wrapped in a list with context. Nice!
- Buttons and links have context
- The screenreader reads aloud the number of blog links on the scroll.
dnywh
left a comment
There was a problem hiding this comment.
Tested on staging, all good!
dnywh
left a comment
There was a problem hiding this comment.
Re-checked customers page on preview. All good!
Braintrust eval report
|
Update blog layout.
PR breakdown of #43455
Related: #47226 #47227 #47228
Summary by CodeRabbit
New Features
Enhancements