-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Crosspost replies to nostr #1093
base: master
Are you sure you want to change the base?
Conversation
…ost button on item-info for reply
WalkthroughWalkthroughThe updates focus on enhancing the functionality related to crossposting and handling replies in a web application. New functionalities include fetching and displaying parent item details, managing replies through a specialized function, and refining event creation logic. Additionally, a minor update was made to include a new field in comment data structures. Changes
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (3)
Additional comments not posted (5)
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Awesome! I wasn't expecting this one.
I think the hard part of this is going to be getting all the data we need in a performant/consistent way.
const [meTotalSats, setMeTotalSats] = useState(0) | ||
const root = useRoot() | ||
const sub = item?.sub || root?.sub | ||
|
||
const { data } = useQuery(ITEM_FULL, { variables: { id: item?.parentId } }) |
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.
The performance implications of this are significant. For every comment, it queries the server for the entire parent. In a comment thread with 100 comments, this will make 100 requests to the server.
I think what we want to do instead is when rendering a Comment
component from a parent item/comment, send it this info as props.
When a comment is in list of comments like on a profile, you'll want to use a different query fragment with a nested resolver for parent
so that this data is gathered when all the other data is. An example of this is the nested resolver for root
.
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.
Sweet thanks for the feedback! I'll get right on this
Description
Allows for crossposting of replies IF both root and parent have been crossposted already
Screenshots
walkthrough
Additional Context
Checklist
Are your changes backwards compatible?
Did you QA this? Could we deploy this straight to production?
For frontend changes: Tested on mobile?
Did you introduce any new environment variables? If so, call them out explicitly in the PR description.
Summary by CodeRabbit
noteId
in comment data fields to ensure complete information retrieval.