-
Notifications
You must be signed in to change notification settings - Fork 35
feat: add farcaster to space profile #1402
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
Conversation
Co-authored-by: Copilot <[email protected]>
a5a3efc
to
ad17a48
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for a new farcaster
social handle across the UI, type definitions, GraphQL/API layers, and backend metadata handling so that farcaster can be displayed and saved in space profiles.
- Introduce
farcaster
field in UI forms, settings composables, and GraphQL queries/mappings - Extend TypeScript types and API schema to include
farcaster
- Initialize and parse
farcaster
in backend IPFS handlers and add tests for metadata utils
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
apps/ui/src/views/CreateSpaceSnapshotX.vue | Added farcaster to initial space creation form data |
apps/ui/src/views/CreateSpaceSnapshot.vue | Included farcaster in default settings and formatted payload |
apps/ui/src/types.ts | Extended SpaceMetadata and Space types with farcaster |
apps/ui/src/networks/offchain/api/types.ts | Added farcaster to ApiSpace type |
apps/ui/src/networks/offchain/api/queries.ts | Queried farcaster in GraphQL SPACE_FRAGMENT |
apps/ui/src/networks/offchain/api/index.ts | Mapped farcaster in formatSpace for offchain API |
apps/ui/src/networks/common/graphqlApi/queries.ts | Queried farcaster for common GraphQL API |
apps/ui/src/networks/common/graphqlApi/index.ts | Mapped farcaster in common formatSpace |
apps/ui/src/helpers/utils.ts | Included farcaster in createErc1155Metadata |
apps/ui/src/helpers/utils.test.ts | Added test entries for farcaster in metadata utils |
apps/ui/src/composables/useSpaceSettings.ts | Integrated farcaster in settings composable (types, defaults, mappings) |
apps/ui/src/components/FormSpaceProfile.vue | Defined farcaster schema in social accounts definition |
apps/api/src/schema.gql | Added farcaster: String! to SpaceMetadataItem type |
apps/api/src/starknet/ipfs.ts | Initialized and parsed farcaster in StarkNet handler |
apps/api/src/evm/ipfs.ts | Same initialization/parsing for EVM handler |
Comments suppressed due to low confidence (1)
apps/ui/src/composables/useSpaceSettings.ts:77
- Consider adding unit tests for the
farcaster
field inuseSpaceSettings
to verify both default initialization and update mappings, ensuring this new property flows correctly through the composable.
farcaster: '',
type: 'string', | ||
title: 'Farcaster', | ||
examples: ['Farcaster handle'], | ||
maxLength: 256 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The magic number 256
for maxLength
could be extracted into a constant or documented to clarify why farcaster handles allow a different length than other social handles.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you extract API changes into separate PR? It takes quite a bit of time to resync API and UI would be broken until we can switch to synced instance, so we can't merge it at once.
Can you rebase this PR? Overall it looks good to me, but we will need to update production API before it can be merged. Hopefully new API will be released today. |
This PR should now work with production APIs. Can you check if everything looks good? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK, tested on Snapshot and SX EVM/Starknet
Summary
Closes: https://github.com/snapshot-labs/workflow/issues/565
Adds
farcaster
handle to space profileHow to test
Notes
Depends on