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

Be able to more consistently reference array element fields #50

Open
wbern opened this issue Aug 21, 2024 · 0 comments
Open

Be able to more consistently reference array element fields #50

wbern opened this issue Aug 21, 2024 · 0 comments

Comments

@wbern
Copy link

wbern commented Aug 21, 2024

Is your feature request related to a problem? Please describe.
When we used Sanity Assist for a lot of fields in our content, the AI was almost never lazy when we referenced other fields from the same element.

We could have fields like this
contentSv (contains language field, headline, salesPitch, description)
contentEn (^)
contentNo (^)

and easily have an instruction that said "translate all fields [...] based on [contentSv]". The AI would almost always nail it spot on.

The problem now is that we have a field called content which is an array of elements, each containing a localization content type (with headline, description, salesPitch etc inside of it).

When we use the instructions, we can say something like "translate based on the first element in the content array and create new content entries from it for languages [...]".

This sort of works, but the problem is that the AI becomes incredibly lazy and only translates the first paragraph of for example description field inside the first content array element.

Describe the solution you'd like
Somehow we'd like to be able to select a field inside the array of content elements, or in some other way, make sure that the Sanity Assist plugin is not being lazy when translating from one content element to new ones.

Describe alternatives you've considered
We've considered moving back to a flat structure without the array, the problem with this is that we have a field called language but additionally a field called countries, so that we can serve for example english that is differently written depending on if it's the US or the GB country. That's why we created an array of content elements.

We've also considered using references to content entries, but as we have over 10+ translations to manage, it creates an insane amount of documents.

Additional context
Slack thread in #ai channel: https://sanity-io-land.slack.com/archives/C05U6P1SWH0/p1723713361461479

Video: https://sanity-io-land.slack.com/files/U05NHEU3REY/F07GQA1HMM5/screen_recording_2024-08-15_at_22.25.23.mov

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

No branches or pull requests

1 participant