Skip to content
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

feat(vscode-extension): add varlet documentation and varlet playground btns #962

Merged
merged 8 commits into from
Apr 16, 2023

Conversation

ErKeLost
Copy link
Member

Checklist


  • Fix linting errors
  • Tests have been added / updated (or snapshots)

Change information


close #955

@vercel
Copy link

vercel bot commented Apr 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
varlet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 15, 2023 2:38pm
varlet-ui-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 15, 2023 2:38pm

@codecov-commenter
Copy link

codecov-commenter commented Apr 15, 2023

Codecov Report

Merging #962 (87235d2) into dev (c054e21) will not change coverage.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##              dev     #962   +/-   ##
=======================================
  Coverage   91.33%   91.33%           
=======================================
  Files         278      278           
  Lines        5909     5909           
  Branches     1332     1332           
=======================================
  Hits         5397     5397           
  Misses        467      467           
  Partials       45       45           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@haoziqaq haoziqaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btn.ts -> statusBarItems

@@ -15,6 +15,10 @@
],
"contributes": {
"commands": [
{
"command": "varlet.open-documentation",
"title": "Varlet: Open Varlet UI Doc"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc -> Documentation


export function registerBtns(context: ExtensionContext) {
const language = getLanguage()
console.log(language === 'en-US')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean console

export function registerBtns(context: ExtensionContext) {
const language = getLanguage()
console.log(language === 'en-US')
const BtnList = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

statusBarItems

Comment on lines 30 to 32
const disposable = commands.registerCommand(item.command, () => {
env.openExternal(Uri.parse(item.url))
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

命令注册建议放在 commands 里,与 statusBar 解耦


export function activate(context: ExtensionContext) {
registerCommands()
registerCompletions(context)
registerHover(context)
registerBtns(context)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

registerStatusBarItems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extension supports documentation site button and playground button
3 participants