-
Notifications
You must be signed in to change notification settings - Fork 374
feat: lg/lu editor support warning message style #2289
Conversation
a-b-r-o-w-n
left a comment
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.
There are some duplicate code paths here that I'm concerned about. Is it possible to rethink how the shell shares errors to the LU/LG fields instead of each component needing to parse/format the diagnostics?
One solution is moving the knowledge of the diagnostics into the code editors themselves because their domain is already aware of the lg/lu diagnostic.
I also thought about that, accept diagnostics instead of errorMsg or warningMsg can simplify a lot usage scenarios. only if we don't want customize the message, directly show the message from diagnostics. For example, same diagnostic in inline editor show less message compare to all up view, cause form have less space. |
Composer/packages/client/src/pages/language-generation/code-editor.tsx
Outdated
Show resolved
Hide resolved
Composer/packages/extensions/obiformeditor/src/Form/widgets/LgEditorWidget.tsx
Outdated
Show resolved
Hide resolved
Composer/packages/extensions/obiformeditor/src/Form/widgets/LuEditorWidget.tsx
Outdated
Show resolved
Hide resolved
|
I worked out a solution to move to pass diagnostics:
|
* lg/lu editor support warning message * pass diagnostics to editor * update Co-authored-by: Andy Brown <asbrown002@gmail.com>
Description
Distinguish warning message and error message.
Task Item
refs #2261
Screenshots