feat(plugin/ts): error handling when querying version matching#57
Open
RSS1102 wants to merge 1 commit intoPower-Playground:mainfrom
Open
feat(plugin/ts): error handling when querying version matching#57RSS1102 wants to merge 1 commit intoPower-Playground:mainfrom
RSS1102 wants to merge 1 commit intoPower-Playground:mainfrom
Conversation
NWYLZW
reviewed
Dec 3, 2023
| console.log('text', result) | ||
| const matchVersion = suggestedVersions.filter(({ id }) => id.includes(result.text)) | ||
| matchVersion.length > 0 | ||
| ? onChange?.(matchVersion[0]?.value.toString()) |
Contributor
Author
There was a problem hiding this comment.
可以,但是如果他输入任何以外的值都给一个固定值,是不是不太符合直觉?
要不然在不匹配任何值的时候给一个固定@latest?
Member
There was a problem hiding this comment.
预期的话应该是不管怎么样都设置过去,然后应该会触发 monaco 的加载,最后如果有版本那就会找到对应的版本并加载,如果找不到那么就会在下面编辑框的位置出现一些提示出来,我之前应该是做了这个异常逻辑的 fallback 的。
app/core/src/plugins/typescript/use.tsx
Lines 55 to 79 in 37a8da3
可以检查一下能否强制切换到这个 fallback 逻辑。
Member
There was a problem hiding this comment.
最终 loadingNode 会被加载到这个地方来
app/core/src/components/EditorZone.tsx
Line 234 in 37a8da3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.