Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@igennova
Copy link
Contributor

@igennova igennova commented Apr 16, 2025

Before :
image

After:
image

Fixes #4153

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Redesigned the blog post listing with a header, responsive blog cards, and enhanced accessibility.
    • Added live search filtering by post title and author with dynamic empty state messaging.
    • Introduced a floating action button for creating new posts, replacing the previous button.
  • Style

    • Updated styling for improved visual appeal, accessibility, and user interaction.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 16, 2025

"""

Walkthrough

The blog post listing template was completely overhauled to provide a modern, visually rich, and interactive interface. Key additions include a hero section with heading and search input, a responsive grid of blog cards featuring images, author badges, and metadata, and a floating action button for creating new posts. Client-side JavaScript enables live filtering of blog cards by post title or author name, dynamically showing or hiding cards and displaying an empty state message when no matches exist. Styling and transitions use Tailwind CSS. All changes are confined to the template file without modifying any exported or public entities.

Changes

File(s) Change Summary
website/templates/blog/post_list.html Complete redesign of blog post listing template with: hero section including search input; responsive grid of blog cards with images or fallback initials, author badges, titles with hover effects, post dates, read time labels, and "Read more" links; full-card invisible link overlay; empty state UI with icon and call-to-action button; floating action button for new posts; client-side JavaScript for live filtering by title and author; Tailwind CSS styling and transitions.

Assessment against linked issues

Objective Addressed Explanation
Align blog cards properly on the blog page (#4153)
"""

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 497af83 and 61f6e91.

📒 Files selected for processing (1)
  • website/templates/blog/post_list.html (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • website/templates/blog/post_list.html
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Run Tests
  • GitHub Check: Analyze (python)
  • GitHub Check: docker-test

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
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

🧹 Nitpick comments (1)
website/templates/blog/post_list.html (1)

21-277: Accessibility and overall maintainability: Strong, but test with screen readers.

  • Good use of sr-only, focus rings, and semantic HTML.
  • All interactive elements are keyboard accessible.
  • Consider testing with screen readers to ensure all dynamic content (like empty state) is announced properly.
  • For maintainability, move inline JS to a static file if the logic grows.

No critical issues, but keep accessibility testing in mind as you iterate.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a4840a and 13f7255.

📒 Files selected for processing (1)
  • website/templates/blog/post_list.html (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Run Tests
  • GitHub Check: Analyze (python)
  • GitHub Check: docker-test
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
website/templates/blog/post_list.html (2)

21-56: Hero section and search bar are visually appealing and accessible.

The hero section uses a visually rich gradient, clear heading, and a search bar with accessible labels and focus styles. The use of SVGs and background overlays is modern and effective.

No issues found here.


175-185: Floating action button: Good accessibility and design.

The floating action button is visually prominent, uses accessible labels, and has appropriate focus styles.

No issues found here.

coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 16, 2025
Copy link
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: 0

♻️ Duplicate comments (1)
website/templates/blog/post_list.html (1)

166-211: JavaScript search filtering: Robust, but category filtering is not implemented.

  • The search logic is robust, filtering by post title and author in real time.
  • The empty state logic is well-implemented and user-friendly.
  • However, there is no category filtering logic, nor any category data on cards, as previously suggested.

If category filtering is planned, add data-category attributes to cards and update the JS to filter by category as well. See previous review for example code.

🧹 Nitpick comments (1)
website/templates/blog/post_list.html (1)

58-134: Blog cards grid: Modern, accessible, but lacks category data for future filtering.

  • The card design is visually rich, responsive, and accessible (keyboard/focusable overlays, alt text, fallback for missing images).
  • Author badge, post details, and "Read more" links are clear and user-friendly.
  • However, as noted in previous reviews, the cards do not include category data attributes (e.g., data-category="{{ post.category|slugify }}"). This limits future scalability if category-based filtering is desired.

Consider adding a data-category attribute to each card for future-proofing, even if not used yet.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 13f7255 and 497af83.

📒 Files selected for processing (1)
  • website/templates/blog/post_list.html (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Run Tests
  • GitHub Check: docker-test
🔇 Additional comments (4)
website/templates/blog/post_list.html (4)

21-56: Hero section and search bar: Strong visual and accessibility improvements.

The hero section and search bar are visually appealing, accessible, and provide a clear entry point for users. The use of semantic HTML, ARIA-friendly input, and SVG icons is well executed.

No issues found in this segment.


135-151: Empty state: Clear, inviting, and accessible.

The empty state UI is visually clear, uses accessible SVGs and text, and provides a strong call to action.

No issues found in this segment.


154-165: Floating action button: Modern, accessible, and discoverable.

The floating action button is visually prominent, accessible (screen reader label), and follows modern UI conventions.

No issues found in this segment.


1-213: General: Excellent UI/UX overhaul, but consider future-proofing for category filtering.

  • The template is a significant improvement in terms of design, accessibility, and interactivity.
  • All changes are confined to the template, with no backend or exported entity changes.
  • For maintainability and scalability, consider implementing category data and filtering as outlined in previous reviews.

Overall, this is a strong, production-ready UI update with only minor suggestions for future enhancements.

Copy link
Collaborator

@DonnieBLT DonnieBLT left a comment

Choose a reason for hiding this comment

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

Can you make the images square and make the header match more with the theme of the site - red lines etc...

@igennova
Copy link
Contributor Author

Can you make the images square and make the header match more with the theme of the site - red lines etc...

image

@DonnieBLT DonnieBLT enabled auto-merge May 1, 2025 23:50
@DonnieBLT DonnieBLT added this pull request to the merge queue May 1, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 1, 2025
@DonnieBLT DonnieBLT enabled auto-merge May 2, 2025 06:38
@DonnieBLT DonnieBLT added this pull request to the merge queue May 2, 2025
Merged via the queue into OWASP-BLT:main with commit 2c022f0 May 2, 2025
12 checks passed
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.

The Cards of Blog Page is not aligned

2 participants