-
Notifications
You must be signed in to change notification settings - Fork 10
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
refactor(editor-export): Implement Lars feedback and provide default values again #3606
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
language = 'de', | ||
enableTextAreaExercise = false, | ||
exerciseVisibleInSuggestion = true, | ||
allowImageInTableCells = true, |
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.
Still want to add the default values here in case someone passes in e.g
createBasicPlugin({ language: 'en' as const })
which would make all the booleans undefined, as the defaultPluginConfig
won't be applied. Alternative to that, we could do the merge strategy, I sent you in slack.
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.
This duplication makes me a little bit sad, but I still find it cleaner than
...
enableTextAreaExercise = defaultPluginConfig.enableTextAreaExercise,
exerciseVisibleInSuggestion = defaultPluginConfig.exerciseVisibleInSuggestion,
...
📦 Next.js Bundle Analysis for @serlo/frontendThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! |
…loEditor` and `SerloRenderer`
I hope this addresses your comments #3591.
I think it should not change anything about the logic if I'm not mistaken, but maybe it'll prevent future bugs more easily and increase readability by having the default values in a centralized place.
Feel free to make the changes directly in the PR, if I missed something or you had something else in mind.