Skip to content

Staging -> Main#420

Merged
akaia-shadowfox merged 5 commits intomainfrom
staging
Jun 26, 2025
Merged

Staging -> Main#420
akaia-shadowfox merged 5 commits intomainfrom
staging

Conversation

@akaia-shadowfox
Copy link
Copy Markdown
Collaborator

@akaia-shadowfox akaia-shadowfox commented Jun 26, 2025

Summary by CodeRabbit

  • New Features

    • Added support for non-fungible token (NFT) data and hooks, enabling NFT profile images and metadata display.
    • Introduced new profile configuration UI components, including improved image upload, linktree, and funding sources sections.
    • Profile editor now supports live updates of profile images and cover photos.
  • Enhancements

    • Unified and refactored profile configuration naming and types for clarity and consistency.
    • Improved validation and normalization of social links and profile data.
    • Added live update options to various token and profile hooks for real-time data fetching.
    • Updated placeholder images to use IPFS URLs.
  • Bug Fixes

    • Improved error handling and robustness in profile and token data fetching.
    • Fixed UI issues in account and campaign components related to image and token data rendering.
  • Removals

    • Removed deprecated profile setup files and types, consolidating all profile editing features under the new profile configuration modules.
    • Deleted legacy image upload and linktree components.
  • Documentation

    • Updated and clarified JSDoc comments and schema descriptions for new and existing types.
  • Style

    • Standardized class names and improved styling consistency across profile and token-related components.
  • Chores

    • Added new words to the spell checker dictionary.

@akaia-shadowfox akaia-shadowfox self-assigned this Jun 26, 2025
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
potlock-next-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 26, 2025 5:56pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 26, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update refactors the "Profile Setup" feature into "Profile Configuration," renaming types, components, schemas, and hooks accordingly. It introduces new utilities, types, and modules for handling profile configuration, live profile data, and NFT-based images. Deprecated and redundant files related to the old setup flow are removed, and feature flags for "Profile configuration" and "Cart" are updated in environment configs.

Changes

Files/Group Change Summary
.vscode/settings.json Added "Metaverse" and "Mochi" to spell checker dictionary.
src/common/_config/production.env-config.ts, staging.env-config.ts, test.env-config.ts Enabled "Profile configuration" feature flag and added new "Cart" feature flag (disabled).
src/common/api/.../hooks.ts (coingecko, indexer, intear-token-indexer, near-social-indexer, near-protocol) Refactored hooks to use enabled/live flags, improved SWR config, error handling, and client-side checks.
src/common/constants.ts Updated deprecation note for SUPPORTED_FTS to reference useFungibleTokenAllowlist.
src/common/contracts/tokens/fungible/* Updated imports, replaced disabled with enabled/live, and improved SWR logic.
src/common/contracts/tokens/non-fungible/* Introduced NFT client, hooks, interfaces, and index module for non-fungible token support.
src/common/lib/object.ts Added nullifyEmptyStrings utility.
src/common/lib/string.ts Removed extractFromUrl, added isValidHttpUrl, rewrote truncate.
src/common/services/images.ts Deleted image retrieval utility for social/NFT/IPFS images.
src/common/services/pinata/hooks.ts Added handleFileBufferChange callback for file uploads.
src/common/types.ts Added FeatureId.Cart, new type aliases, removed deprecated WithDisabled.
src/common/ui/form/components/text.tsx Added inputExtension className prop to TextFieldProps.
src/common/ui/layout/components/molecules/multi-select.tsx Updated dependencies in callbacks and adjusted styling.
src/common/ui/layout/svg/CameraIcon.tsx, camera.tsx Deleted camera SVG icon components.
src/entities/_shared/account/components/AccountFollowButton.tsx, AccountFollowStats.tsx, profile-images.tsx Streamlined loading logic, improved profile image handling, updated links.
src/entities/_shared/account/constants.ts Updated placeholder image URLs to IPFS, added description max length, improved regex patterns.
src/entities/_shared/account/hooks/social-image.ts Added hook to resolve social image URLs, including NFT and IPFS logic.
src/entities/_shared/account/hooks/social-profile.ts Updated to use live flag, improved image resolution via new hook.
src/entities/_shared/account/index.ts Exported linktree utilities.
src/entities/_shared/account/types.ts Minor JSDoc comment style update.
src/entities/_shared/account/utils/linktree.ts Added utility to extract social handles from URLs.
src/entities/_shared/index.ts Deleted barrel export file.
src/entities/_shared/token/components/* Switched from useToken to useFungibleToken hooks.
src/entities/_shared/token/hooks/_deprecated.ts, fungible.ts Deprecated hooks updated to use fungible token logic, renamed hooks, added live support.
src/entities/_shared/token/index.ts Changed export source to fungible hooks.
src/entities/campaign/components/*, src/entities/pot/components/*, etc. Updated token hooks and imports to use fungible token logic.
src/features/donation/components/*, src/features/donation/hooks/form.ts Updated token hooks, improved loading and feature flag logic, improved recipient profile fetching.
src/features/profile-configuration/components/* Major refactor: renamed all "ProfileSetup" to "ProfileConfiguration", added new image upload and linktree section components, improved form field components, updated logic for live profile images and validation.
src/features/profile-configuration/hooks/forms.ts Renamed and extended form hook, improved default values and data normalization.
src/features/profile-configuration/index.ts Re-exported editor components.
src/features/profile-configuration/models/* Updated schemas, types, and effects for new profile configuration model; added deprecated model for reference.
src/features/profile-configuration/types.ts Added ProfileConfigurationMode type.
src/features/profile-configuration/utils/normalization.ts Added normalization utilities for profile configuration.
src/features/profile-setup/* Deleted all files: image upload, linktree section, index, models, types, and normalization utilities.
src/features/proportional-funding/components/payout-manager.tsx Updated token hook to use fungible token logic.
src/layout/components/user-dropdown.tsx Enabled live profile fetching for the signed-in user.
src/layout/profile/_deprecated/DonationItem.tsx Updated avatar prop and Big.js import style.
src/layout/profile/components/header.tsx, hero.tsx, layout.tsx Improved styling, error handling, and account view fetching logic.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ProfileEditor
    participant SocialProfileHook
    participant ImageUpload
    participant NFTClient
    participant PinataUpload
    participant SocialDb

    User->>ProfileEditor: Open profile configuration
    ProfileEditor->>SocialProfileHook: Fetch live profile data
    SocialProfileHook->>SocialDb: Get profile info
    SocialProfileHook-->>ProfileEditor: Return profile data (avatar, cover, etc.)
    User->>ImageUpload: Upload new avatar/cover
    ImageUpload->>PinataUpload: Upload file to IPFS
    PinataUpload-->>ImageUpload: Return IPFS URL
    ImageUpload-->>ProfileEditor: Update image URL
    ProfileEditor->>NFTClient: (If image is NFT) Fetch NFT metadata
    NFTClient-->>ProfileEditor: Return NFT media URL
    ProfileEditor->>SocialDb: Save updated profile data
Loading

Possibly related PRs

Suggested reviewers

  • carina-akaia

Poem

A bunny hops through fields anew,
Refactoring names, as devs often do.
Profile Setup is gone, Configuration shines,
With NFTs and images, all in new lines.
Feature flags toggled, code cleaned with care—
The garden of profiles is fresh as spring air!
🐇✨

✨ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in 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 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.

@akaia-shadowfox akaia-shadowfox marked this pull request as ready for review June 26, 2025 17:57
@akaia-shadowfox akaia-shadowfox removed the request for review from Ebube111 June 26, 2025 17:57
@akaia-shadowfox akaia-shadowfox merged commit 2e357c3 into main Jun 26, 2025
2 of 6 checks passed
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.

1 participant