Skip to content

Fixed home page components for mobile view#1260

Merged
arkid15r merged 3 commits intoOWASP:mainfrom
KaranNegi20Feb:fix-release-mobile
Apr 2, 2025
Merged

Fixed home page components for mobile view#1260
arkid15r merged 3 commits intoOWASP:mainfrom
KaranNegi20Feb:fix-release-mobile

Conversation

@KaranNegi20Feb
Copy link
Contributor

@KaranNegi20Feb KaranNegi20Feb commented Apr 2, 2025

Fixed issue: Fix top contributors expanded look #1259

Fixed the card width which was overflowing in small screen.
Screenshot 2025-04-02 at 8 15 08 AM

Screenshot 2025-04-02 at 7 53 40 AM Screenshot 2025-04-02 at 8 04 32 AM

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 2, 2025

Summary by CodeRabbit

  • Refactor

    • Redesigned the contributor display with a card-based layout for a more encapsulated presentation.
    • Revised the organization of recent activity sections to better separate dates, counts, and tags.
  • Style

    • Adjusted grid spacing and column layouts across key sections for improved alignment and visual balance.
    • Updated styling of contributor items to enhance overall consistency.

Walkthrough

The changes update two frontend components. In TopContributors.tsx, the component now uses a SecondaryCard instead of a div, removes the className prop, and adjusts its grid and button styling. In Home.tsx, the layout for "Recent Issues," "Recent Pull Requests," and "Recent Releases" has been restructured, with date and metadata elements now wrapped in separate flex containers and an extra class added to the SecondaryCard for the releases section.

Changes

File(s) Summary
frontend/src/components/TopContributors.tsx Removed the className prop and its usage; replaced the div with a SecondaryCard component utilizing icon and title props; adjusted grid gap from gap-x-5 to gap-4, modified column layout, and updated contributor button styling from mb-4 w-full to overflow-hidden.
frontend/src/pages/Home.tsx Refactored the rendering layout for "Recent Issues" and "Recent Pull Requests" by splitting the date and metadata into distinct flex containers; restructured the "Recent Releases" section and added an overflow-hidden class to the SecondaryCard component.

Possibly related PRs

Suggested labels

frontend

Suggested reviewers

  • kasya
  • aramattamara
  • arkid15r

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bccefd1 and 992c769.

📒 Files selected for processing (2)
  • frontend/src/components/TopContributors.tsx (3 hunks)
  • frontend/src/pages/Home.tsx (3 hunks)
🧰 Additional context used
🧬 Code Definitions (1)
frontend/src/pages/Home.tsx (1)
frontend/src/utils/dateFormatter.ts (1)
  • formatDate (1-16)
🔇 Additional comments (12)
frontend/src/components/TopContributors.tsx (5)

10-10: Improved component organization with SecondaryCard.

Good addition of the SecondaryCard import, which helps standardize the UI across the application.


37-38: Enhanced layout structure.

Excellent refactoring to use SecondaryCard instead of a plain div. This provides consistent styling and header structure for the component.


38-38: Improved grid layout for mobile compatibility.

The grid layout changes from the previous gap-x-5 sm:grid-cols-2 md:grid-cols-3 to gap-4 sm:grid-cols-1 md:grid-cols-2 improve the mobile experience by reducing the number of columns on smaller screens.


43-43: Better button styling for mobile view.

The button class change from mb-4 w-full to overflow-hidden rounded-lg bg-gray-200 p-4 dark:bg-gray-700 improves the appearance and prevents content overflow on mobile devices.


81-81: Properly implemented SecondaryCard closing tag.

The proper closing tag for SecondaryCard completes the refactoring of the component structure.

frontend/src/pages/Home.tsx (7)

275-279: Improved layout structure for date display.

Good refactoring of the date display into its own flex container with proper alignment. This enhances the mobile layout by allowing proper wrapping of content.


281-284: Better organization of metadata elements.

The comment count is now properly contained in its own flex container, improving layout consistency across different screen sizes.


294-299: Consistent date display formatting.

Good job applying the same date display pattern to the Pull Requests section as was done for the Issues section, maintaining consistency throughout the UI.


301-305: Consistent author information display.

The author information is now properly contained in its own flex container, matching the pattern used elsewhere.


310-310: Added overflow protection for Recent Releases.

Good addition of the overflow-hidden class to the SecondaryCard, which prevents content from breaking out of the container on smaller screens.


316-316: Improved card styling for consistency.

The change to include overflow-hidden in the card class ensures content stays within bounds on mobile views, matching the pattern used in other cards.


341-348: Reorganized metadata display for Recent Releases.

Excellent refactoring of the date and tag display into separate flex containers, consistent with the changes made to other sections and improving the mobile layout.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 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.

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.

@KaranNegi20Feb
Copy link
Contributor Author

KaranNegi20Feb commented Apr 2, 2025

Hey @arkid15r i have fixed the issue and also fixing some other issue similar to it in the home page as discussed in the issue comments #1259 (comment).

@arkid15r arkid15r linked an issue Apr 2, 2025 that may be closed by this pull request
2 tasks
@arkid15r
Copy link
Collaborator

arkid15r commented Apr 2, 2025

@KaranNegi20Feb as you worked on the main page could you take care of those bright commas and make sure only one leader's name appear upon hovering? Thank you!

Screenshot 2025-04-02 at 9 59 48 AM

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 2, 2025

@KaranNegi20Feb
Copy link
Contributor Author

@KaranNegi20Feb as you worked on the main page could you take care of those bright commas and make sure only one leader's name appear upon hovering? Thank you!

Screenshot 2025-04-02 at 9 59 48 AM

I suppose you meant to say the tool tip right? Would it be ok if i address it in another issue?

@arkid15r arkid15r enabled auto-merge April 2, 2025 17:11
@arkid15r
Copy link
Collaborator

arkid15r commented Apr 2, 2025

@KaranNegi20Feb as you worked on the main page could you take care of those bright commas and make sure only one leader's name appear upon hovering? Thank you!
Screenshot 2025-04-02 at 9 59 48 AM

I suppose you meant to say the tool tip right? Would it be ok if i address it in another issue?

Yes, as you prefer.

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

LGTM

@arkid15r arkid15r added this pull request to the merge queue Apr 2, 2025
Merged via the queue into OWASP:main with commit 4d3d014 Apr 2, 2025
22 checks passed
shdwcodr pushed a commit to shdwcodr/Nest that referenced this pull request Jun 5, 2025
Co-authored-by: Arkadii Yakovets <2201626+arkid15r@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix top contributors expanded look

2 participants