-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
FIX: UX Document Conversion in multi worker environment #1378
base: main
Are you sure you want to change the base?
FIX: UX Document Conversion in multi worker environment #1378
Conversation
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.
LGTM!
app/client/ui/DocumentSettings.ts
Outdated
const typeList: DocumentTypeItem[] = [{ | ||
label: t('Regular'), | ||
type: '' | ||
}, { | ||
label: t('Template'), | ||
type: 'template' | ||
}, { | ||
label: t('Tutorial'), | ||
type: 'tutorial' | ||
}].map((el) => ({ | ||
...el, | ||
value: el.label, | ||
cleanText: el.label.trim().toLowerCase() | ||
})); |
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.
Calling t
top-level like this can be problematic. I'd suggest wrapping this in a function that returns the array.
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.
Hello @georgegevoian,
For my own culture can you be more explicit on what can be problematic with using t()
at top level?
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.
I think that's because the t
function may not be initialized correctly (it needs to download a JSON file with the locales).
Co-authored-by: hexaltation <[email protected]> Co-authored-by: fflorent <[email protected]>
todo: tests, notification of success
fix: url deduction for page reload to apply new document type
TODO onboarding popup TODO better waiting for url change
remove uneeded async and better function naming
fix: various nitpicks
Co-authored-by: fflorent <[email protected]>
b3e151f
to
e4756cf
Compare
Context
#1181 was revert due to gristlabs internal CI failing in multi-worker environment.
Proposed solution
This PR implements the same user journey fixing inconsistencies with multi-worker.
We will discuss @georgegevoian's remark #1015 (comment) in an other issue if changes are needed in a product point of view.
Related issues
Fixes #1015
Has this been tested?