feat(next): version view overhaul (#12027)
#11769 improved the lexical version view diff component. This PR improves the rest of the version view. ## What changed - Column layout when selecting a version: - Previously: Selected version on the left, latest version on the left - Now: Previous version on the left, previous version on the right (mimics behavior of GitHub) - Locale selector now displayed in pill selector, rather than react-select - Smoother, more reliable locale, modifiedOnly and version selection. Now uses clean event callbacks rather than useEffects - React-diff-viewer-continued has been replaced with the html differ we use in lexical - Updated Design for all field diffs - Version columns now have a clearly defined separator line - Fixed collapsibles showing in version view despite having no modified fields if modifiedOnly is true - New, redesigned header ## Screenshots ### Before   ### After    
This commit is contained in:
@@ -5,6 +5,7 @@ const filename = fileURLToPath(import.meta.url)
|
||||
const dirname = path.dirname(filename)
|
||||
|
||||
dotenv.config({ path: path.resolve(dirname, '../../../../', '.env') })
|
||||
dotenv.config({ path: path.resolve(dirname, '../../../../../', '.env') })
|
||||
|
||||
type TranslationMessage = {
|
||||
role: 'system' | 'user'
|
||||
@@ -78,7 +79,7 @@ export async function translateText(text: string, targetLang: string) {
|
||||
console.log(' Old text:', text, 'New text:', data.choices[0].message.content.trim())
|
||||
return data.choices[0].message.content.trim()
|
||||
} else {
|
||||
console.log(`Could not translate: ${text} in lang: ${targetLang}`)
|
||||
console.log(`Could not translate: ${text} in lang: ${targetLang}`, data.error)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user