Skip to content

fix: install mdi icons locally #11539

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

Merged
merged 3 commits into from
Apr 21, 2025
Merged

fix: install mdi icons locally #11539

merged 3 commits into from
Apr 21, 2025

Conversation

preschian
Copy link
Member

@preschian preschian commented Apr 16, 2025

Thank you for your contribution to the Koda - Generative Art Marketplace.

👇 __ Let's make a quick check before the contribution.

PR Type

  • Bugfix
  • Feature
  • Refactoring

Context

  • install MDI icons locally. while checking the styles and layout in some pages, I just realized that some of the icons render differently between local and deployed versions
  • fix warning on drop-checker page

Summary by CodeRabbit

  • Bug Fixes

    • Resolved potential errors when displaying images, banners, and prices by improving handling of missing or undefined data.
    • Corrected the route parameter for collection ID to ensure accurate data retrieval.
  • Chores

    • Updated and added development dependencies to improve package management and compatibility.

Copy link

coderabbitai bot commented Apr 16, 2025

Walkthrough

The updates involve modifications to the package.json file and a Vue component responsible for displaying collection drop information. In package.json, a new icon package was added and the version constraint for an existing icon package was relaxed to allow newer versions. In the Vue component, optional chaining was introduced to prevent runtime errors when accessing potentially undefined or null values, and the route parameter for the collection ID was corrected to use the appropriate key.

Changes

File(s) Change Summary
package.json Added @iconify-json/mdi to devDependencies; updated @nuxt/icon version to use a caret range.
pages/drop-checker/[chain]/[collection].vue Added optional chaining to drop[1] accesses; fixed route param from collectionid to collection.

Poem

In the warren of code, a hop and a skip,
New icons arrive, dependencies equip.
With careful chains, errors now hide,
Collection keys corrected, no need to chide.
The drop-checker smiles, all neat and precise—
A rabbit’s delight, in code that’s concise!
🐇✨

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.

🪧 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

netlify bot commented Apr 16, 2025

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit de58c74
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/67ffcb9a7faee9000874f082
😎 Deploy Preview https://deploy-preview-11539--koda-canary.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

socket-security bot commented Apr 16, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​iconify-json/​mdi@​1.2.31001008189100
Updated@​nuxt/​icon@​1.10.3 ⏵ 1.12.098 +210010097 -1100

View full report

Copy link

socket-security bot commented Apr 16, 2025

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert (click for details)
Warn High
@polkadot/[email protected] has Obfuscated code.

Confidence: 0.91

Location: Package overview

Source: package.json

Source: pnpm-lock.yaml

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@polkadot/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Copy link

cloudflare-workers-and-pages bot commented Apr 16, 2025

Deploying koda-art-prod with  Cloudflare Pages  Cloudflare Pages

Latest commit: de58c74
Status: ✅  Deploy successful!
Preview URL: https://2f9d9986.kodaart-production.pages.dev
Branch Preview URL: https://fix--install-mdi-icons-local.kodaart-production.pages.dev

View logs

Copy link

@preschian preschian marked this pull request as ready for review April 16, 2025 15:28
@preschian preschian requested a review from a team as a code owner April 16, 2025 15:28
@preschian preschian requested review from Jarsen136 and hassnian and removed request for a team April 16, 2025 15:28
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: 1

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 359750b and de58c74.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • package.json (1 hunks)
  • pages/drop-checker/[chain]/[collection].vue (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: shard (1, 10)
🔇 Additional comments (5)
package.json (2)

117-117: Good addition of Material Design Icons package.

Adding the @iconify-json/mdi package as a local dependency ensures consistent icon rendering between development and production environments. This addresses the issue mentioned in the PR where icons were rendering differently.


120-120: Appropriate version update for @nuxt/icon.

Updating the version constraint from a fixed version to a caret range (^1.12.0) allows for compatible minor and patch updates. This is a good practice for keeping dependencies up-to-date while maintaining compatibility.

pages/drop-checker/[chain]/[collection].vue (3)

203-203: Added null check with optional chaining - good defensive coding.

Adding optional chaining (?.) before calling toString() prevents potential errors if drop[1] is null or undefined. This improves the robustness of the code.


209-209: Added null check with optional chaining - good defensive coding.

Similar to the previous change, adding optional chaining prevents errors when rendering the iframe source URL.


215-215: Improved error handling with optional chaining and default value.

This change adds both optional chaining (?.) and a fallback empty string (|| '') when formatting amounts. This ensures the function receives a valid string even if drop[1] is null or undefined.

@vikiival vikiival added this pull request to the merge queue Apr 21, 2025
Merged via the queue into main with commit 7d128bb Apr 21, 2025
26 of 27 checks passed
@vikiival vikiival deleted the fix--install-mdi-icons-locally branch April 21, 2025 12:43
@vikiival vikiival mentioned this pull request Jun 10, 2025
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.

4 participants