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

Added anchors to headers in documentation #1395

Merged
merged 9 commits into from
Jul 24, 2013
Merged

Conversation

kenearley
Copy link

@harvesthq/chosen-developers We can now give people links to the sections in the documentation to help answer their questions.

image

@starzonmyarmz Could you give me a hand to replace the 'link' text with a nice icon?

Open Issues

  • Add anchors to documentation pages
  • Replace link text with icon
  • Decide if we want icon to always display or only on hover

@tjschuck
Copy link
Member

Github does it natively on READMEs and stuff using their Octicons font. Dunno what the support is for hotlinking their shit and using it on GH Pages, but you could attempt to use their same octicon-link that they use if you're into that.

@kenearley
Copy link
Author

Github does it natively on READMEs and stuff using their Octicons font.

Yeah. And I could not find anywhere that allowed me to download or use it. I figured it would be in bad style to do so.

@starzonmyarmz
Copy link
Member

I think we should make the entire title be a link, and on :hover have an icon appear next to the title to emphasise that its a link. It's typically bad UX to hide a link behind a :hover like it currently is.

@kenearley
Copy link
Author

@starzonmyarmz Fine by me. Do you want me to update it now before you mess with an icon?

@starzonmyarmz
Copy link
Member

I'll take care of it!

Wrapped the text inside of the <h2> tags with anchors, and added
an icon to appear on :hover.
@starzonmyarmz
Copy link
Member

On :hover state:
screen shot 2013-07-24 at 2 34 26 pm

@kenearley
Copy link
Author

Nice. One small thing, though. Since this is very similar to the way GH anchor links work, it might be confusing that the icon goes away when you try to directly click on it. How much trouble would it be to have that stay visible and clickable?

@starzonmyarmz
Copy link
Member

Fixed

@stof
Copy link
Collaborator

stof commented Jul 24, 2013

great idea !

@kenearley
Copy link
Author

@starzonmyarmz Cool. Although we need to update the index.proto.html and options.html, as well.

@@ -199,6 +199,10 @@
</tr>
</table>

<footer>
&copy; 2011 <a href="http://www.getharvest.com/">Harvest</a> - Chosen is licensed under the <a href="http://en.wikipedia.org/wiki/MIT_License">MIT license</a>.
Copy link
Member

Choose a reason for hiding this comment

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

Two space indent instead of the one that's here.

Copy link
Member

Choose a reason for hiding this comment

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

I did this myself in 07ef9da, and I also updated the link to match the other change made in #1397

@starzonmyarmz
Copy link
Member

@kenearley I'll grab that tomorrow

@kenearley
Copy link
Author

@starzonmyarmz I'll do it. :)

@kenearley
Copy link
Author

@pfiller I believe this is good to go now.

@@ -16,7 +16,7 @@
<div id="container">
<div id="content">
<header>
<h1>Chosen</h1>
<h1>Chosen</h1>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did this indent go away?

Copy link
Author

Choose a reason for hiding this comment

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

Not sure. I'll fix it.

@kenearley
Copy link
Author

done

pfiller added a commit that referenced this pull request Jul 24, 2013
@pfiller pfiller merged commit b7f5f74 into master Jul 24, 2013
@pfiller pfiller deleted the anchors_on_doc_headers branch July 24, 2013 22:26
@pfiller
Copy link
Contributor

pfiller commented Jul 24, 2013

Thanks @kenearley and @starzonmyarmz

pfiller added a commit that referenced this pull request Jul 26, 2013
- CSS Updates #1368, #1371
- Prevent text selection on Chosen #1374
- single_backstroke_delete defaults to true #1375
- No longer expose classes to window context #1389
- Single select value fix #1392
- Remove javascript:void and attr references #1385, #1377
- Disable Chosen on iPhone / iPod and Android mobile devices
  by default #1388
- Add Destroy Method #1396
- Option to Hide Selected & Disabled Options #1404
- Always clear result highlight #1407
- Replace characters only once #1411

- Document all the things. #1366, #1376, #1383
- Add Gemfile for compass dependency #1373
- Update copyright and license link #1397
- Add @koenpunt as a maintainer #1399
- Add anchors to documentation headers #1395
- Updated stackoverflow instructions #1403
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.

5 participants