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 scroll-spy behaviour (fixes #1289) #1300

Merged
merged 6 commits into from Oct 11, 2016

Conversation

hargasinski
Copy link
Collaborator

I just wanted a second opinion on this PR because I had to change the ids of the method sections in the body for scroll-spy to work. I just had to remove the . in front the ids (.eachSeries vs eachSeries now). This means that potentially old links to methods in the docs will just point to the top of the old page. I added some js that should minimise this, it replaces the hash in the link with the hash with the . removed. It should direct users to the correct method.

I think the ids are a result of the way minami generates them. Its something I should've changed initially when creating the docs. Sorry about that.

Also, to get scroll-spy to work, I had to rearrange some of the HTML/CSS, but from what I can see, everything looks the same as before. I have a live demo on my fork: http://hargasinski.github.io/async.

Thanks in advance for the feedback.

/cc @megawac @aearly @kalmanh

@megawac
Copy link
Collaborator

megawac commented Oct 9, 2016

I'm fine with these changes in foc structure though it seems kind of weird
how much we're fighting the template...

Also can the .each loop be removed on l135 and be just a .addClass?

On Friday, 7 October 2016, Hubert Argasinski notifications@github.com
wrote:

I just wanted a second opinion on this PR because I had to change the ids
of the method sections in the body for scroll-spy to work. I just had to
remove the . in front the ids (.eachSeries vs eachSeries now). This means
that potentially old links to methods in the docs will just point to the
top of the old page. I added some js that should minimise this, it replaces
the hash in the link with the hash with the . removed. It should direct
users to the correct method.

I think the ids are a result of the way minami generates them. Its
something I should've changed initially when creating the docs. Sorry about
that.

Also, to get scroll-spy to work, I had to rearrange some of the HTML/CSS,
but from what I can see, everything looks the same as before. I have a live
demo on my fork: http://hargasinski.github.io/async.

Thanks in advance for the feedback.

/cc @megawac https://github.com/megawac @aearly

https://github.com/aearly @kalmanh https://github.com/kalmanh

You can view, comment on, or merge this pull request online at:

#1300
Commit Summary

  • docs: combine toc sublists into one list
  • docs: added Bootstrap scroll-spy
  • docs: highlight current method in toc when viewing source file
  • docs: update old id links to new ones

File Changes

Patch Links:


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1300, or mute the thread
https://github.com/notifications/unsubscribe-auth/ADUIEPS8lnfdLi7dV6TstbDAnEPK90dmks5qxvAxgaJpZM4KRlCg
.

@hargasinski
Copy link
Collaborator Author

Fixed, thanks for catching that! Should I squash the commits or is this good to merge?

The main reason I'm changing the template so much after the docs are generated is because it's a lot quicker to support the category tag that way, while keeping all of the main documentation on one page. That being said, I'll start looking into template, and how it can be updated, so we don't need the jsdoc-fix-html.js to be as big as it is. We'll still probably need it for things like copying the dist, and logo files over to the docs.

@megawac
Copy link
Collaborator

megawac commented Oct 10, 2016

Works for me in current state (though I haven't seen the actual behaviour
so I'll leave merging to you or Alex

On Sunday, 9 October 2016, Hubert Argasinski notifications@github.com
wrote:

Fixed, thanks for catching that! Should I squash the commits or is this
good to merge?

The main reason I'm changing the template so much after the docs are
generated is because it's a lot quicker to support the category tag that
way, while keeping all of the main documentation on one page. That being
said, I'll start looking into template, and how it can be updated, so we
don't need the jsdoc-fix-html.js to be as big as it is. We'll still
probably need it for things like copying the dist, and logo files over to
the docs.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1300 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADUIED3MOAaKDKKFNS3AO44BznjgheYWks5qyThGgaJpZM4KRlCg
.

@hargasinski
Copy link
Collaborator Author

Thank you! I just had to fix the searching as it was relying on the old ids. Everything appears to be working now.

@megawac
Copy link
Collaborator

megawac commented Oct 12, 2016

@hargasinski want to tag a release?

v2.0.1...master

@hargasinski
Copy link
Collaborator Author

@megawac, sure! Just to confirm, that'll mean updating the changelog, building the dist files and updating the version to 2.1.0, right? Then creating the actual release on GitHub.

I just want to confirm so I don't mess anything up 😩. Thanks!

@megawac
Copy link
Collaborator

megawac commented Oct 12, 2016

Workflow is updating the changelog and then running make release-[major|minor|patch|prerelease] I believe

@hargasinski
Copy link
Collaborator Author

I should've looked at the make file. Thanks, I'll get right on it!

@hargasinski
Copy link
Collaborator Author

@megawac I tagged the release. Everything went smoothly updating Github, except for one small linting error I fixed. However, make release-minor threw an npm ERR! you do not have permission to publish "async". Are you logged in as the correct user? : async error during the cd build/ && npm publish step as I don't have permission to publish to npm (I think?, I logged in using npm login using hargasinski). You or @aearly will build the files locally, and publish them to npm. The GitHub steps are done.

@megawac
Copy link
Collaborator

megawac commented Oct 12, 2016

done, had to release a 2.1.1 though

On Wed, Oct 12, 2016 at 2:38 PM, Hubert Argasinski <notifications@github.com

wrote:

@megawac https://github.com/megawac I tagged the release. Everything
went smoothly updating Github, except for one small linting error I fixed.
However, make release-minor threw an npm ERR! you do not have permission
to publish "async". Are you logged in as the correct user? : async error
during the cd build/ && npm publish step as I don't have permission to
publish to npm (I think?, I logged in using npm login using hargasinski).
You or @aearly https://github.com/aearly will build the files locally,
and publish them to npm. The GitHub steps are done.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1300 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADUIEAmlBW08lQHt79xYRf6D4hPPDKWqks5qzSkcgaJpZM4KRlCg
.

@hargasinski
Copy link
Collaborator Author

Thanks!

@aearly
Copy link
Collaborator

aearly commented Oct 14, 2016

Good work, I like the enhancement!

One thing to think about for the future is how to simplify the docs generation code. We are fighting the template a lot.

@hargasinski hargasinski deleted the scrollspy branch November 1, 2016 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants