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

Skip to content

Conversation

@rinkitadhana
Copy link
Contributor

@rinkitadhana rinkitadhana commented Apr 1, 2025

Fixes #4079

Changes Introduced by this PR:

  • Fixed broken image
  • made new component for posts that look like x post.
  • added a follow OWASP_BLT X account component

Before:

image

After:

image

Summary by CodeRabbit

  • New Features
    • Introduced a promotional section with a call-to-action button to follow our official social media account.
  • Style Improvements
    • Streamlined the page layout and navigation for a cleaner look.
    • Updated header typography and content brevity for improved readability.
    • Refined the feed display to include user interaction elements and repositioned pagination controls for a more consistent user interface.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 1, 2025

Walkthrough

The changes update the social feed page template. Modifications include simplified container classes and adjusted widths, reduced header font sizes with shortened descriptions, and a streamlined navigation structure. The feed list now features an updated layout with an image and user interaction metrics, along with a new section promoting the OWASP_BLT account on X through a call-to-action button. Additionally, the pagination controls have been repositioned and restyled to appear conditionally based on the page count.

Changes

File Change Summary
website/.../social.html - Simplified container classes and adjusted max-width
- Reduced header title font size and shortened description
- Streamlined navigation by removing redundant classes/elements
- Updated feed list layout including image and interaction metrics
- Added CTA button for OWASP_BLT and repositioned pagination controls

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant T as Template Renderer
    U->>T: Request Social Feed Page
    T->>T: Render template with updated layout
    alt Multiple pages available
        T->>U: Display pagination controls
    else
        T->>U: Omit pagination controls
    end
    T->>U: Display updated feed including CTA for OWASP_BLT on X
Loading

Assessment against linked issues

Objective Addressed Explanation
Fix social page (#4079)

📜 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 9fc5d3e and 69ae464.

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

🪧 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 plan to trigger planning for file edits and PR creation.
  • @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: 0

🧹 Nitpick comments (5)
website/templates/social.html (5)

42-55: New "Follow on X" Component Implementation

A dedicated section to promote following OWASP_BLT on X has been introduced. The call-to-action button is clearly styled with a black background and white text.
Suggestion: For external links (target="_blank"), consider adding rel="noopener noreferrer" to the <a> tag (line 48–50) to enhance security and performance.


58-60: Feed Item Link Fallback Logic

The anchor tag conditionally sets its href to {{ item.url }} if available; otherwise, it falls back to #. While this works functionally, consider whether a non-clickable container might communicate a better user experience when no URL is provided.


66-72: Feed Item Header Details

The header within each feed item displays a hard-coded username "OWASP_BLT" alongside the creation date.
Suggestion: If feed items are meant to be dynamic, verify if the username should be populated from a variable rather than hard-coded. If intentional for branding, this is acceptable.


82-115: Interactive Elements for Feed Items

The updated block for interactive elements (comments, retweets, likes, bookmark, and share icons) includes clear hover effects and spacing:

  • Icons are grouped with transitions that improve interactivity.

Suggestion: Consider adding accessible labels (e.g., using aria-label) for these interactive icons if they will have click functionality in the future, to enhance screen reader support.


121-151: Pagination Controls Redesign

The pagination section has been repositioned and styled consistently:

  • It conditionally displays based on the number of pages.
  • The current page is highlighted with a distinct red border and background.

Suggestion: To further improve accessibility, consider adding hidden descriptive text (e.g., using aria-hidden="true" on icons or including an off-screen label) for the chevron icons.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4b9b902 and 49cb20a.

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

22-23: Container Layout and Maximum Width Update

The outer container now uses min-h-screen for full height and a custom maximum width (max-w-[50%]). This appears aligned with the redesigned layout. Please double-check on various screen sizes to ensure responsiveness as intended.


25-31: Header Section Styling Update

The header section has been updated with a simplified style:

  • The container now has a white background with a red left border (using border-l-[#e74c3c]).
  • The title’s font size has been reduced to text-2xl and the description is now text-sm.

These changes enhance the visual hierarchy and readability.


56-56: Feed List Container Border Update

The feed list container now uses border-x and border-t to delineate its boundaries, creating a clean separation of content. This change is consistent with the streamlined design.


61-65: Logo Image Reference

The logo image is rendered using {% static 'img/logo.png' %} with a well-defined alternate text ("BLT Logo"). This should resolve the previously broken image issue.


75-81: Feed Item Content and Conditional Image Rendering

The main content area now displays the item message with reduced opacity and conditionally renders an image if available. The styling (e.g., max-h-[400px] and object-cover) provides a consistent look.


118-118: Feed Item Link Closure

The closing </a> on line 118 properly terminates the clickable area for each feed item.

coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 1, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 1, 2025
@DonnieBLT DonnieBLT enabled auto-merge (squash) April 4, 2025 04:31
@DonnieBLT DonnieBLT disabled auto-merge April 5, 2025 02:31
@DonnieBLT DonnieBLT added this pull request to the merge queue Apr 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Apr 5, 2025
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.

I'm not sure how we would get the stats but maybe we can just remove them instead of hardcoding them

@rinkitadhana
Copy link
Contributor Author

I'm not sure how we would get the stats but maybe we can just remove them instead of hardcoding them

They were only for the design. Should I remove the numbers or the entire component?

@rinkitadhana
Copy link
Contributor Author

@DonnieBLT what about this? I have removed the stats.

image

DonnieBLT
DonnieBLT previously approved these changes Apr 7, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 7, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 7, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 7, 2025
@DonnieBLT DonnieBLT added this pull request to the merge queue Apr 7, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 7, 2025
@DonnieBLT DonnieBLT added this pull request to the merge queue Apr 15, 2025
Merged via the queue into OWASP-BLT:main with commit 884c4b2 Apr 15, 2025
11 checks passed
@rinkitadhana rinkitadhana deleted the fix/social branch April 15, 2025 01:44
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.

Fix social page

2 participants