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 title to sidebar links #1286

Merged
merged 2 commits into from
Jul 19, 2020
Merged

Conversation

sy-records
Copy link
Member

Summary

fix #1178
replace #1179

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 Jul 16, 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/1zudvdmwd
✅ Preview: https://docsify-preview-git-fork-sy-records-fix-1178.docsify-core.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 16, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2a2465b:

Sandbox Source
docsify-template Configuration

Copy link
Member

@jhildenbiddle jhildenbiddle left a comment

Choose a reason for hiding this comment

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

Looks good. I'd like to revisit wrapping sidebar links in v5, but for v4 I think title attributes are the right solution for this issue.

Copy link
Member

@trusktr trusktr left a comment

Choose a reason for hiding this comment

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

Nice. I think this is something we can merge without tests.

If we did test it, what would we test? Maybe there's not much to test other than just checking that the attribute is there. Not sure that's worth it. @jhildenbiddle wdyt?

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.

Though I know this is fairly a predictable change and small one,
Can we still add a small test case with and without the innerText i.e it in one test case there will be no title and in other there would be a title

@sy-records
Copy link
Member Author

@anikethsaha If the sidebar does not have a title, it was not displayed before.

image

image

After adding:

image

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.

I will add tests for this later. anyway that was a non blocker request.

@sy-records sy-records merged commit 667496b into docsifyjs:develop Jul 19, 2020
@sy-records sy-records deleted the fix-1178 branch July 19, 2020 01:00
@sy-records sy-records mentioned this pull request Aug 18, 2020
1 task
@sy-records sy-records mentioned this pull request Aug 26, 2020
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants