meteorlxy / vssue

:mailbox: A Vue-powered Issue-based Comment Plugin
https://vssue.js.org
MIT License
775 stars 105 forks source link

GitHub API V3/V4 issues track #62

Open meteorlxy opened 5 years ago

meteorlxy commented 5 years ago

Common

GitHub API V3

syhyz1990 commented 4 years ago

vuepress 插件 设置为github-v4时 , 模板指定issueId

会返回错误 无法将值“ 270”强制转换为Int

image

meteorlxy commented 4 years ago

@syhyz1990

// wrong
<Vssue issue-id="270" />

// correct
<Vssue :issue-id="270" />
DynamicLoader commented 4 years ago

I found a way to use github app with API v4 instead of using github oauth app with API v3.Just need to create a new github app,and give it issue R/W permission,and use vssue.github-v4.js instead of vssue-github.js.

meteorlxy commented 4 years ago

@Lucy2003 Sounds cool! I'll take a look

DynamicLoader commented 4 years ago

packages\@vssue\api-github-v4\src\index.ts

Github API v4版本的请求头accept是否应改为 'application/vnd.github.v4+json' ?

还是说,由于要用一部分API v3的功能,所以要用 'application/vnd.github.v3+json' ?

meteorlxy commented 4 years ago

还是说,由于要用一部分API v3的功能,所以要用 'application/vnd.github.v3+json' ?

后者

RehanSaeed commented 4 years ago

Any progress on reducing the amount of permissions required?

realpdai commented 4 years ago

@meteorlxy

Vssue 不支持IE 11,可以看所有vssue demo页面在IE下的表现,需要考虑下兼容性问题。

meteorlxy commented 4 years ago

@realpdai 你说的可能是 vuepress 在 ie11 的兼容问题?

realpdai commented 4 years ago

@realpdai 你说的可能是 vuepress 在 ie11 的兼容问题?

是的,可以看下你所有demo页面 https://vssue.js.org/zh/demo/github-v4.html, 在IE11下都无法正常显示。也可以看下https://www.pdai.tech。 看似因为ts转换引起的吧

meteorlxy commented 4 years ago

@realpdai 这个是 vuepress 的问题,下个版本会修复

https://github.com/vuejs/vuepress/commit/69c193a00b7dbee49b8ce20e0ba9fb4f0c125f42

realpdai commented 4 years ago

@realpdai 这个是 vuepress 的问题,下个版本会修复

vuejs/vuepress@69c193a

Greate, thx, 坐等出修复后的版本。

meteorlxy commented 4 years ago

所以其实和 vssue 没啥关系,你要急着用的话手动引用 ployfill 的版本

realpdai commented 4 years ago

所以其实和 vssue 没啥关系,你要急着用的话手动引用 ployfill 的版本

秒回够赞,暂时还没那么急,我就不引babel-polyfill了,等你出新版本,O(∩_∩)O

realpdai commented 4 years ago

@meteorlxy

Hi, 我注意到vuepress v1.5.0 已经修复了ployfill (https://github.com/vuejs/vuepress/releases/tag/v1.5.0), 但是使用了Vssue插件的vuepress网站依然存在问题(在IE 9/IE 11/edge下报错)。

经测试,删除vssue插件后IE下能正常打开。楼主是否可以将vssue插件的Demo页面升级至最新的vuepress v1.5.0,看下是否兼容IE。

thx.

meteorlxy commented 4 years ago

@realpdai 已更新,看起来没啥问题

image

realpdai commented 4 years ago

@realpdai 已更新,看起来没啥问题

感谢回复,我明天看下公司电脑上IE的显示vssue demo页的显示状况及其版本。

realpdai commented 4 years ago

@meteorlxy

多次测试,还是发现报错:

环境信息:

System:
    OS: Windows 10 10.0.14393
    CPU: (8) x64 Intel(R) Core(TM) i7-6700T CPU @ 2.80GHz
  Binaries:
    Node: 12.9.1 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 6.10.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 38.14393.2068.0
  npmPackages:
    @vuepress/core:  1.5.0
    @vuepress/theme-default:  1.5.0
    vuepress: ^1.5.0 => 1.5.0

引用最基本vuepress+vssue(都采用最简默认配置排除干扰)

  "devDependencies": {
    "@vuepress/plugin-back-to-top": "^1.5.0",
    "@vuepress/plugin-medium-zoom": "^1.5.0",
    "vuepress": "^1.5.0",
    "webpack-dev-server": "^3.11.0"
  },
  "dependencies": {
    "@vssue/api-github-v4": "^1.4.0",
    "@vssue/vuepress-plugin-vssue": "^1.4.4"
  }

错误信息:

SCRIPT1005: Expected '(' 链接到如下:

this.vssue.API.platform.meta.reactable&&this.comment.reactions&&!this.editMode)}get reactionKeys(){return["heart","like","unlike"]}get editContentRows(){return this.editContent.split("\n").length-1}get editInputRows(){return this.editContentRows<3?5:this.editContentRows+2}async postReaction({reaction:t}){try{if(this.creatingReactions.includes(t))return;this.creatingReactions.push(t),await this.vssue.postCommentReaction({commentId:this.comment.id,reaction:t})||this.vssue.$emit("error",new Error(this.vssue.$t("reactionGiven",

另外一些表象:

meteorlxy commented 4 years ago

@realpdai https://github.com/vuejs/vuepress/issues/2031

另外这个 issue 只是为了记录已知的 github 平台问题,不要在这里反馈新的问题。