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

style: Get emoji from github api #1188

Merged
merged 4 commits into from
Jun 7, 2020

Conversation

sy-records
Copy link
Member

Summary

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of default theme, please provide the before/after screenshot:

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

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:


  • DO NOT include files inside lib directory.

@vercel
Copy link

vercel bot commented May 21, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/docsify-core/docsify-preview/8dwzog2a2
✅ Preview: https://docsify-preview-git-fork-sy-records-style-emoji.docsify-core.now.sh

Copy link
Member

@anikethsaha anikethsaha left a comment

Choose a reason for hiding this comment

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

it seems you didnt change the api link in the img src.

let me know if I am missing something

@sy-records
Copy link
Member Author

Yeah, I'll modify it later.

I'm not sure how to use it. What do you think?

use key => value to get the src address directly, or use JavaScript to get the unicode value?

@anikethsaha
Copy link
Member

I am not sure about github's api about emoji.

is there any bug with the current setup ?

@sy-records
Copy link
Member Author

No, but now the effect is the same as without plugin.

It is not a complete emoji. I will modify it later.

@anikethsaha
Copy link
Member

ok cool , you can convert this PR to draft and when ready , mark this as ready to review if its ok

@sy-records sy-records marked this pull request as draft May 21, 2020 05:38
@sy-records sy-records marked this pull request as ready for review May 21, 2020 07:48
@sy-records sy-records requested a review from anikethsaha May 21, 2020 07:48
src/plugins/emoji.js Outdated Show resolved Hide resolved
src/plugins/emoji.js Outdated Show resolved Hide resolved
@sy-records sy-records changed the title style: Get emoji from github api and remove emoji for 404 style: Get emoji from github api May 21, 2020
@anikethsaha anikethsaha mentioned this pull request May 22, 2020
3 tasks
trusktr
trusktr previously approved these changes May 23, 2020
@trusktr
Copy link
Member

trusktr commented May 23, 2020

@anikethsaha @sy-records I'm look at the Now deploy, https://docsify-preview-git-fork-sy-records-style-emoji.docsify-core.now.sh/#/, and if you inspect the ❤️ it seems to use the old URL. Is the Now deploy not working? I thought it would have the new-style URL?

I was expecting to see the URL with emoji/unicode/2764.png at the end, but I see the URL has emoji/heart.png at the end.

@sy-records
Copy link
Member Author

Because there is no emoji plugin loaded.

@trusktr
Copy link
Member

trusktr commented May 23, 2020

I haven't tried it: what's the difference between with and without the emoji plugin?

@sy-records
Copy link
Member Author

sy-records commented May 23, 2020

If not used, some emoji will not be displayed normally, for example :label:

@sy-records sy-records requested a review from anikethsaha May 23, 2020 01:03
Copy link
Member

@anikethsaha anikethsaha left a comment

Choose a reason for hiding this comment

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

@sy-records can you add the emoji plugin in index.html in root directory so that we can have it in the preview.

otherwise looks good

@sy-records
Copy link
Member Author

@anikethsaha OK, I added.

@anikethsaha anikethsaha requested a review from trusktr May 23, 2020 06:53
@anikethsaha anikethsaha added enhancement semver-minor This needs a semver-minor release labels May 23, 2020
@anikethsaha anikethsaha reopened this May 23, 2020
@sy-records sy-records merged commit 7853026 into docsifyjs:develop Jun 7, 2020
@sy-records sy-records deleted the style-emoji branch June 7, 2020 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement semver-minor This needs a semver-minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants