Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Set icon for app in windows and mac #596

Merged
merged 4 commits into from
Dec 16, 2024
Merged

Fix: Set icon for app in windows and mac #596

merged 4 commits into from
Dec 16, 2024

Conversation

brafdlog
Copy link
Owner

@brafdlog brafdlog commented Sep 21, 2024

Summary by CodeRabbit

  • New Features

    • Added specific icons for macOS and Windows applications to enhance visual branding.
  • Bug Fixes

    • Updated the logo import path in the TopBar component to reflect the new directory structure.

Copy link
Contributor

Please fix the title of this PR.

Examples:

Breaking: I broke something
Fix: fix (fixes #1234)
Update: some packages updates (refs #123)
New: Added a new feature

See more in release.config.js.

@brafdlog brafdlog changed the title Set icon for app in windows and mac Update: Set icon for app in windows and mac Sep 21, 2024
@brafdlog brafdlog requested a review from baruchiro September 21, 2024 18:37
baruchiro
baruchiro previously approved these changes Sep 21, 2024
@baruchiro baruchiro dismissed their stale review September 21, 2024 20:01

The Windows logo failed on build

Copy link
Collaborator

@baruchiro baruchiro left a comment

Choose a reason for hiding this comment

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

The Windows logo failed on build

Copy link
Contributor

Pull request has been marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Dec 14, 2024
Copy link

coderabbitai bot commented Dec 14, 2024

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • packages/renderer/src/assets/logos/fishOnlyLogo.ico is excluded by !**/*.ico

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes in this pull request involve updates to the electron-builder.yml file and the TopBar.tsx component. The electron-builder.yml file now includes specific icon paths for macOS and Windows applications. The TopBar.tsx file has an updated import statement for the logo asset, reflecting a change in the directory structure where the logo file is located.

Changes

File Change Summary
electron-builder.yml Added icon property for macOS (packages/renderer/src/assets/logos/fishLogo.icns) and Windows (packages/renderer/src/assets/logos/fishOnlyLogo.ico).
packages/renderer/src/components/topBar/TopBar.tsx Updated logo import path from ../../assets/logoFishOnly.svg to ../../assets/logos/logoFishOnly.svg.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant Builder

    User->>App: Launch Application
    App->>Builder: Build for macOS/Windows
    Builder->>Builder: Set Icon for macOS
    Builder->>Builder: Set Icon for Windows
    Builder->>App: Build Complete
    App->>User: Display Application
Loading

🐇 "In the land of code where changes flow,
New icons shine with a vibrant glow.
From fish logos bright, to paths anew,
Our TopBar's ready, with a fresh debut!
With every build, our dreams take flight,
Hop along, dear coder, to a future bright!" 🐟✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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. (Beta)
  • @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

@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

🧹 Outside diff range and nitpick comments (2)
electron-builder.yml (2)

18-18: Add newline at end of file

The file is missing a newline character at the end, which is a POSIX requirement.

 win:
   icon: packages/renderer/src/assets/logos/fishOnlyLogo.ico
+
🧰 Tools
🪛 yamllint (1.35.1)

[error] 18-18: no new line character at the end of file

(new-line-at-end-of-file)


15-18: Consider moving icons to buildResources directory

Currently, the icons are placed in the renderer package's assets directory. Since these are build-time resources, it would be more appropriate to move them to the buildResources directory that's already configured in this file.

This separation would:

  • Keep build assets separate from application code
  • Follow electron-builder's conventional structure
  • Make it easier to manage build resources

Suggested structure:

buildResources/
  icons/
    fishLogo.icns     # macOS icon
    fishOnlyLogo.ico  # Windows icon

Then update the paths:

 mac:
-  icon: packages/renderer/src/assets/logos/fishLogo.icns
+  icon: buildResources/icons/fishLogo.icns
 win:
-  icon: packages/renderer/src/assets/logos/fishOnlyLogo.ico
+  icon: buildResources/icons/fishOnlyLogo.ico
🧰 Tools
🪛 yamllint (1.35.1)

[error] 18-18: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d37057e and a525d58.

⛔ Files ignored due to path filters (4)
  • packages/renderer/src/assets/logos/fishOnlyLogo.ico is excluded by !**/*.ico
  • packages/renderer/src/assets/logos/logoFishAndText.jpg is excluded by !**/*.jpg
  • packages/renderer/src/assets/logos/logoFishOnly.png is excluded by !**/*.png
  • packages/renderer/src/assets/logos/logoFishOnly.svg is excluded by !**/*.svg
📒 Files selected for processing (2)
  • electron-builder.yml (1 hunks)
  • packages/renderer/src/components/topBar/TopBar.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/renderer/src/components/topBar/TopBar.tsx
🧰 Additional context used
🪛 yamllint (1.35.1)
electron-builder.yml

[error] 18-18: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (1)
electron-builder.yml (1)

15-18: Verify icon file paths exist

The icon paths look correct in terms of format (.icns for macOS, .ico for Windows). Let's verify these files exist in the repository.

✅ Verification successful

Icon paths verified successfully

Both icon files exist at the specified locations:

  • packages/renderer/src/assets/logos/fishLogo.icns for macOS
  • packages/renderer/src/assets/logos/fishOnlyLogo.ico for Windows
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the specified icon files exist in the repository

# Check for macOS icon
if fd "fishLogo.icns" packages/renderer/src/assets/logos/; then
  echo "✓ macOS icon found"
else
  echo "✗ macOS icon missing"
fi

# Check for Windows icon
if fd "fishOnlyLogo.ico" packages/renderer/src/assets/logos/; then
  echo "✓ Windows icon found"
else
  echo "✗ Windows icon missing"
fi

Length of output: 311

🧰 Tools
🪛 yamllint (1.35.1)

[error] 18-18: no new line character at the end of file

(new-line-at-end-of-file)

@github-actions github-actions bot removed the Stale label Dec 15, 2024
Copy link

@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 (1)
electron-builder.yml (1)

20-20: Add newline at end of file

Add a newline character at the end of the file to comply with POSIX standards.

 win:
   icon: packages/renderer/src/assets/logos/fishOnlyLogo.ico
+
🧰 Tools
🪛 yamllint (1.35.1)

[error] 20-20: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a525d58 and ea77923.

📒 Files selected for processing (2)
  • electron-builder.yml (1 hunks)
  • packages/renderer/src/components/topBar/TopBar.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/renderer/src/components/topBar/TopBar.tsx
🧰 Additional context used
🪛 yamllint (1.35.1)
electron-builder.yml

[error] 20-20: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (1)
electron-builder.yml (1)

17-20: Verify icon files existence and formats

The icon paths look correct, but let's verify:

  1. The icon files exist in the specified locations
  2. The files are in the correct format for their respective platforms
✅ Verification successful

Icon files are present and correctly configured

Both icon files exist at the specified paths and are being used exclusively for their respective platforms. The search also revealed another icon file at buildResources/icon.icns, but this doesn't conflict with our configuration as we're explicitly setting platform-specific icons.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify icon files existence and basic format validation

# Check if files exist
echo "Checking if icon files exist..."
for icon_path in "packages/renderer/src/assets/logos/fishLogo.icns" "packages/renderer/src/assets/logos/fishOnlyLogo.ico"; do
  if [ -f "$icon_path" ]; then
    echo "✓ Found: $icon_path"
    # Check file type
    file "$icon_path"
  else
    echo "✗ Missing: $icon_path"
  fi
done

# Search for any other icon files to ensure we're using the right ones
echo -e "\nListing all icon files in the project..."
fd -e icns -e ico

Length of output: 1253

🧰 Tools
🪛 yamllint (1.35.1)

[error] 20-20: no new line character at the end of file

(new-line-at-end-of-file)

@baruchiro baruchiro changed the title Update: Set icon for app in windows and mac Fix: Set icon for app in windows and mac Dec 15, 2024
@baruchiro baruchiro merged commit f494a72 into master Dec 16, 2024
11 checks passed
@baruchiro baruchiro deleted the setLogo branch December 16, 2024 08:27
Copy link
Contributor

🎉 This PR is included in version 2.5.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

2 participants