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

Label Initial Prompt #477

Merged
merged 2 commits into from
Jan 8, 2023
Merged

Label Initial Prompt #477

merged 2 commits into from
Jan 8, 2023

Conversation

AbdBarho
Copy link
Collaborator

@AbdBarho AbdBarho commented Jan 7, 2023

Part of #436

I started to consolidate the shared code with regards to fetching and mutating to its own hook.
The amount of code duplication is starting to get out of hand...

I still need to add the actual flagging, for that I want to refactor FlaggableElement, but maybe in another PR because this will become too big.

Also, now we show the raw labels delivered from the backend, we need to define corresponding texts to display.

@fozziethebeat
Copy link
Collaborator

I like the direction this is going. I agree that the fetching is getting way out of hand.

@AbdBarho AbdBarho force-pushed the label-initial-prompt branch 4 times, most recently from 2ef3192 to bf2ee70 Compare January 7, 2023 15:57
@AbdBarho AbdBarho force-pushed the label-initial-prompt branch 2 times, most recently from f48a715 to 7030882 Compare January 7, 2023 16:27
@AbdBarho AbdBarho force-pushed the label-initial-prompt branch from 7030882 to 2a5d37a Compare January 7, 2023 16:29
@AbdBarho AbdBarho marked this pull request as ready for review January 7, 2023 16:32
});

const submit = (id: string, message_id: string, text: string, labels: Record<string, string>) =>
trigger({ id, update_type: "text_labels", content: { labels, text, message_id } });
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@fozziethebeat I had to override the message_id here otherwise the (real) backend would error.

interaction.id from prisma did not work.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes that looks correct. interaction.id is just a web thing that can be ignored during backend interactions.

@fozziethebeat fozziethebeat merged commit 0d91e74 into main Jan 8, 2023
@fozziethebeat fozziethebeat deleted the label-initial-prompt branch January 8, 2023 01:32
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