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: add markdown preview for post and reply #7

Merged
merged 3 commits into from
Jun 25, 2020

Conversation

ashawkey
Copy link

添加了markdown预览功能。
可能需要进一步测试。

preview-post
preview-reply

@ashawkey ashawkey mentioned this pull request Jun 24, 2020
@thuhole
Copy link
Collaborator

thuhole commented Jun 25, 2020

looks great!
但是现在有一个CDN cache可能不同步的问题。。。就是我目前用的这个CDN的purge cache功能的API我还在申请,还没申请下来。等申请下来之后merge吧,不然容易出bug。

@thuhole
Copy link
Collaborator

thuhole commented Jun 25, 2020

Thank you so much!

Copy link
Collaborator

@thuhole thuhole left a comment

Choose a reason for hiding this comment

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

话说ttf字体文件为啥会变

@ashawkey
Copy link
Author

ashawkey commented Jun 25, 2020

好的!ttf还真不太清楚,因为用了两个新的icon,就直接用重新生成的文件替换了,暂时也没发现会导致什么问题...

@thuhole
Copy link
Collaborator

thuhole commented Jun 25, 2020

image
看起来手机界面有些丑。。。

@ashawkey
Copy link
Author

忘记这个了...那我再修改一下

@ashawkey
Copy link
Author

ashawkey commented Jun 25, 2020

最窄屏的图片文件信息几乎放不进去,不过还是尽量保持了原来的样子:
preview-post-320px
preview-post-375px

@thuhole thuhole merged commit 65c43fc into treehollow:master Jun 25, 2020
@thuhole
Copy link
Collaborator

thuhole commented Jun 25, 2020

顺便,“进一步测试”你还有什么想法嘛

@ashawkey
Copy link
Author

我主要调用了写好的markdown组件,测试的话主要还是markdown组件那边?比如#6214
(而且其实我是隔壁哒0v0,所以没法实际上的发帖。。。

@thuhole
Copy link
Collaborator

thuhole commented Jun 25, 2020

顺便,眼睛的icon我看这边刷新还显示不出来,应该是浏览器缓存的原因。无痕模式看一下发现能显示。CDN cache已经purge了。

@thuhole
Copy link
Collaborator

thuhole commented Jun 25, 2020

好像测出来一个bug:输入[Eve]预览就会黑屏。但是这个bug仅存在于预览上,不存在于看树洞。
我来修吧

@ashawkey
Copy link
Author

是因为color_picker没创建,疏忽了

@thuhole
Copy link
Collaborator

thuhole commented Jun 25, 2020

我修了

@ashawkey
Copy link
Author

ashawkey commented Jun 25, 2020

同样的show_pid也有问题,输入#123预览点击会报错
感觉可以取消预览界面的树洞号跳转功能,改成这样:
<HighlightedMarkdown text={this.state.text} color_picker={this.color_picker} show_pid={()=>{}} />

@thuhole
Copy link
Collaborator

thuhole commented Jun 25, 2020

哦对那个key={this.props.pid}是干啥的

@ashawkey
Copy link
Author

ashawkey commented Jun 25, 2020

应该也没用,本来想修一下那个unique key warning,但看起来是HighlightedMarkdown 的问题...
这两个也麻烦您直接修了?

@thuhole
Copy link
Collaborator

thuhole commented Jun 25, 2020

unique key warning我还不知道咋修。。

@ashawkey
Copy link
Author

我修了一下: #8

@thuhole
Copy link
Collaborator

thuhole commented Nov 27, 2020

@ashawkey 你好,请问能麻烦你提供一下icomoon导出的工程文件吗?我们最近打算加一些图标,才发现以前P大树洞的图标不是那么好改。可以想象你当时应该花了很大功夫才完成这个功能,再次感谢你的pull request!

@ashawkey
Copy link
Author

不好意思orz,太久没看邮箱,不过好像现在好像已经不需要了?

@thuhole
Copy link
Collaborator

thuhole commented Dec 16, 2020

不好意思orz,太久没看邮箱,不过好像现在好像已经不需要了?

@ashawkey 嗯,已经不需要了,感谢!

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.

2 participants