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(comments): add "Disqus_click_to_load" to improve in-GFW-users #182

Merged
merged 2 commits into from
Feb 10, 2017

Conversation

Kitcham
Copy link
Contributor

@Kitcham Kitcham commented Jan 26, 2017

Contributing rules

  • Fork the repo and create your branch from canary. Then be sure to put the canary branch as the target for your pull request.
  • Please be sure to follow the contributing guidelines, especially for commit message
  • Remove the Contributing rules part from this description
  • Fill out the other parts from this description

What kind of change does this PR introduce? (check one with "x")

  • Bug fix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

Description

English:

  • Add a way to load Disqus comments:“Dissqus_click_to_load”. It means that Disqus will be load after your click. Useful as it is, it help improve experience of Chinese who are trapped by the GFW so that avoid progress bar pause.

  • The style of “Read Comments” button is based on Material Design, Click-effect will be added next release

  • Thanks to button's js git: https://github.com/davinder17s/material-ripple-effect

  • Add multilingual support for the button and fix the text in the button: "Read Comments 「Be sure 'disq.us & disquscdn.com & disqus.com' can be loaded 」" (IN dbef40c )

中文:

  • 增加一种Disqus的手动加载方式,点击后加载Disqus评论。对墙内用户更加友好,避免有部分浏览器加载卡进度条(如Via,Chrome等浏览器)

  • 采用MD风格的”阅读评论“ button

  • button的JS引用自: https://github.com/davinder17s/material-ripple-effect

  • 增加了手动加载button的文字提示:“阅读评论 「请确保 disq.us & disquscdn.com & disqus.com 可以正常加载」”,并加入多语言支持 (在 dbef40c 中)


Verification steps

  • Open /material/_config.yml . Input below atLine 170 to turn on.

comment:
use: disqus_click

  • hexo g,you will see the different

@neoFelhz
Copy link
Collaborator

neoFelhz commented Jan 26, 2017

Well,I personally think we needn't that button.This theme is face to users from the whole world.Not all the countries have the same Internet problem like China.So I think we need a way to judge whether the vistor can load Disqus or not,then automaticlly decide if it is nesscary to load Disqus.

@neoFelhz neoFelhz changed the title feat(comments): add "Disqus_click_to_load" to improve in-GFW-users‘ … feat(comments): add "Disqus_click_to_load" to improve in-GFW-users Jan 26, 2017
@Kitcham
Copy link
Contributor Author

Kitcham commented Jan 26, 2017

@neoFelhz Oh. As that we face to the whole world users, we need to consider users' local net situation. Personally,I think we should give the right to the user, Let them could choose if they need to turn it on.
In that , I remain the "Disqus-load- right-now" before,,I just add a new way. Thanks for your comment

@Kitcham
Copy link
Contributor Author

Kitcham commented Jan 27, 2017

@neoFelhz Multilingual support for the button is added, also the text updated

@Kitcham
Copy link
Contributor Author

Kitcham commented Jan 27, 2017

@viosey Multilingual support for the button is added, also the text is updated
New feat has already optimized

@cubesky
Copy link
Collaborator

cubesky commented Jan 28, 2017

I think we can judgment if visitor can access google.com, if they can access google.com, disqus will automatically loaded. If not, we can display this button.
What do you think about this? @neoFelhz @viosey

@neoFelhz
Copy link
Collaborator

@cubesky No.
I have hosts that I can visit Google in China,but the hosts I use didn't contains Disqus.
Maybe we should judge the disqus's favicon instead.

@neoFelhz neoFelhz merged commit eae6960 into iblh:canary Feb 10, 2017
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.

None yet

3 participants