Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/NestPublic

Adding icons for left headings#1359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
arkid15r merged 4 commits intoOWASP:mainfromshining-bluemoon-11:fix-heading-icons
Apr 15, 2025

Conversation

shining-bluemoon-11
Copy link
Contributor

@shining-bluemoon-11shining-bluemoon-11 commentedApr 13, 2025
edited
Loading

RESOLVE#1344

  • Adding icons alongside heading in left pages to have a consistent behaviour
    17445381591598835894149627792664

17445383601341763423762579848497

17445383825414555222053717555533

@coderabbitaicoderabbitai
Copy link
Contributor

coderabbitaibot commentedApr 13, 2025
edited
Loading

Summary by CodeRabbit

  • New Features

    • Added relevant FontAwesome icons to various cards, lists, and sections throughout the interface for improved visual cues and clarity.
  • Style

    • Enhanced component layouts by wrapping certain elements in additional containers for better structure and presentation.
    • Updated specific icons for sections such as "Upcoming Events" and "Recent Issues" to improve consistency and appearance.
      """

Summary by CodeRabbit

  • New Features

    • Introduced icons for multiple content sections, enhancing visual cues in areas like history, leadership, technologies, roadmap, summary, statistics, and contributor details.
    • Enabled optional icon display within expandable lists, offering clearer visual identification for items such as languages and topics.
  • Refactor

    • Reorganized layout structures to seamlessly integrate the new icons, ensuring a consistent and improved overall user interface appearance.

Walkthrough

The pull request introduces UI enhancements by adding FontAwesome icons to various components. Specifically, it addsicon props to severalSecondaryCard components, theTopContributors component, and theToggleableList component, along with minor JSX restructuring to accommodate these icons. The underlying logic and data handling remain unchanged.

Changes

FilesChange Summary
frontend/.../about/page.tsx
frontend/.../CardDetailsPage.tsx
Addedicon props to multiple components (e.g.,SecondaryCard,TopContributors) with specific FontAwesome icons; restructured JSX to wrap elements for layout adjustments; no changes to public API declarations.
frontend/.../ToggleableList.tsxIntroduced an optionalicon?: IconDefinition prop and updated the rendering logic to conditionally display aFontAwesomeIcon alongside the label.

Assessment against linked issues

ObjectiveAddressedExplanation
Consistent behaviour for Icons in Headings (#1344)
"""

📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between92c4b37 and1650190.

📒 Files selected for processing (4)
  • frontend/src/app/about/page.tsx (4 hunks)
  • frontend/src/app/page.tsx (2 hunks)
  • frontend/src/components/CardDetailsPage.tsx (5 hunks)
  • frontend/src/components/RecentIssues.tsx (2 hunks)
✅ Files skipped from review due to trivial changes (3)
  • frontend/src/app/page.tsx
  • frontend/src/components/RecentIssues.tsx
  • frontend/src/components/CardDetailsPage.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/app/about/page.tsx
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: Run frontend e2e tests
  • GitHub Check: Run backend tests
  • GitHub Check: Run frontend unit tests
  • GitHub Check: CodeQL (python)
  • GitHub Check: CodeQL (javascript-typescript)

🪧 Tips

Chat

There are 3 ways to chat withCodeRabbit:

  • 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 togenerate 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.

Documentation and Community

  • Visit ourDocumentation for detailed information on how to use CodeRabbit.
  • Join ourDiscord Community to get help, request features, and share feedback.
  • Follow us onX/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitaicoderabbitaibot 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: 2

🧹 Nitpick comments (2)
frontend/src/app/about/page.tsx (1)

153-160:Consider simplifying the statistics card structure.

The statistics cards have been wrapped in an extra div which might not be necessary. Consider simplifying this structure for better maintainability.

-  <div key={index}>-    <SecondaryCard className="text-center">-      <div className="mb-2 text-3xl font-bold text-blue-400">-        <AnimatedCounter end={Math.floor(stat.value / 5) * 5} duration={2} />+-      </div>-      <div className="text-gray-600 dark:text-gray-300">{stat.label}</div>-    </SecondaryCard>-  </div>+  <SecondaryCard key={index} className="text-center">+    <div className="mb-2 text-3xl font-bold text-blue-400">+      <AnimatedCounter end={Math.floor(stat.value / 5) * 5} duration={2} />++    </div>+    <div className="text-gray-600 dark:text-gray-300">{stat.label}</div>+  </SecondaryCard>
frontend/src/components/CardDetailsPage.tsx (1)

55-58:Ensure consistency in Summary section structure between regular and user summary.

Both summary sections now have icons, but they have slightly different structures. For consistency, consider using the same pattern for both.

 {summary && (   <SecondaryCard icon={faFileAlt} title="Summary">     <p>{summary}</p>   </SecondaryCard> )} {userSummary && (   <SecondaryCard icon={faFileAlt} title="Summary">-    {userSummary}+    <p>{userSummary}</p>   </SecondaryCard> )}

Also applies to: 60-64

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between0784518 and790b866.

📒 Files selected for processing (3)
  • frontend/src/app/about/page.tsx (4 hunks)
  • frontend/src/components/CardDetailsPage.tsx (5 hunks)
  • frontend/src/components/ToggleableList.tsx (3 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
frontend/src/app/about/page.tsx (3)
frontend/src/utils/aboutData.ts (1)
  • aboutText (1-5)
frontend/src/components/MarkdownWrapper.tsx (1)
  • Markdown (4-17)
frontend/src/components/AnimatedCounter.tsx (1)
  • AnimatedCounter (10-35)
🔇 Additional comments (8)
frontend/src/components/ToggleableList.tsx (3)

1-1:Good addition of IconDefinition import.

The import of IconDefinition from FontAwesome is correctly added to support the new icon feature.


10-10:LGTM - Well-typed optional icon prop added.

The optional icon prop is correctly added to the component props with the proper TypeScript type definition, making it type-safe while maintaining backward compatibility.

Also applies to: 16-16


27-30:Good implementation of icon rendering.

The icon rendering implementation is clean and uses conditional rendering properly. The spacing withmr-2 class and icon sizing withh-5 w-5 classes ensure consistent visual appearance.

frontend/src/app/about/page.tsx (3)

3-3:LGTM - FontAwesome icons properly imported.

All the necessary icons are imported correctly from FontAwesome, with appropriate semantic choices for each section.


89-89:LGTM - Icon added to TopContributors component.

The icon prop is correctly added to the TopContributors component, maintaining consistency with other heading components.


96-96:LGTM - Icons added to Technologies & Tools and Roadmap sections.

Appropriate icons selected for these sections that visually represent their content.

Also applies to: 129-129

frontend/src/components/CardDetailsPage.tsx (2)

1-9:LGTM - FontAwesome icons properly imported with good organization.

The FontAwesome icons are properly imported and grouped, with appropriate icons selected for each section.


67-70:LGTM - Icons consistently applied across all sections.

Icons have been added to all relevant sections (Contribution Heatmap, Details, Statistics, Languages, Topics, Contributors, and Repositories) with appropriate icon choices that visually represent their content.

Also applies to: 73-74, 98-98, 132-134, 139-140, 167-167

Copy link
Collaborator

@aramattamaraaramattamara left a comment
edited
Loading

Choose a reason for hiding this comment

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

I really like these changes, thank you! Would it be possible to switch the icon for the Summary section to something different, so it’s not the same as the one in User Details and Project Details? Just to make them easier to tell apart visually. Thanks a lot!

shining-bluemoon-11 reacted with thumbs up emoji
@shining-bluemoon-11
Copy link
ContributorAuthor

@aramattamara , I will update it

@shining-bluemoon-11
Copy link
ContributorAuthor

shining-bluemoon-11 commentedApr 14, 2025
edited
Loading

@aramattamara done , updated the icon to {faBookOpen}

aramattamara reacted with thumbs up emoji

aramattamara
aramattamara previously approved these changesApr 14, 2025
Copy link
Collaborator

@aramattamaraaramattamara left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

@arkid15rarkid15r left a comment

Choose a reason for hiding this comment

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

Thanks for making it look better@shining-bluemoon-11 !

shining-bluemoon-11 reacted with heart emoji
@arkid15rarkid15r added this pull request to themerge queueApr 15, 2025
Merged via the queue intoOWASP:main with commit317b881Apr 15, 2025
22 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@coderabbitaicoderabbitai[bot]coderabbitai[bot] left review comments

@arkid15rarkid15rarkid15r approved these changes

@aramattamaraaramattamaraaramattamara left review comments

@kasyakasyaAwaiting requested review from kasyakasya is a code owner

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Consistent behaviour for Icons in Headings
3 participants
@shining-bluemoon-11@arkid15r@aramattamara

[8]ページ先頭

©2009-2025 Movatter.jp