(https://github.com/ruby/rdoc/pull/1238)
Hide navigation sidebar when clicking anchor links on mobile devices.
Previously, anchor links would change the page but the navigation
sidebar would block the view.
f12a96b7fa
(https://github.com/ruby/rdoc/pull/1236)
Found this issue when I was debugging the navigation toggle. I noticed
it first in the chrome dev tools, but it was also reproducible on
an iPad Pro.
Symptom:
- On iPad Pro, the navigation section is hidden but there's enough
space to show it. Making the user have to click the hamburger
button to show it but it's not necessary to hide the navigation
section.
- On desktop, the navigation section is shown.
- On mobile, the navigation section is hidden until the hamburger
button is clicked.
Fix:
- The javascript code was matching 1024px instead of 1023px. The media
sections of the css was altering the layout on 1024px. So ipad got
the full desktop layout but the navigation section was hidden.
1794e59755
(https://github.com/ruby/rdoc/pull/1176)
* Move method source block to the top
Currently, if a method description is long (e.g. `Array.new`), users need
to click the method toggle button next to the method title, and then scroll
down to the source code expanded below the description.
This commit changes the behavior so that the source code is expanded
immediately below the method title.
* Update method toggle's interface
1. Display the method toggle button by default instead of displaying on hover
2. Only toggle the source code when clicking the method toggle button, not
when clicking the entire method title section. This will allow us to display
an anchor link next to the method title
3. Simplify the toggle source button's appearance
* Use details tag for method toggling
* Rename method-click-advice to method-source-toggle
* Improve method controls' display on mobile
By moving the method controls out of the method header, we can display
them to the right of the method name on desktop, and below the method name
on mobile.
* Add "Example" label to example code blocks
The label should help users distinguish example code blocks from other
code blocks, such as method source code.
It's only applied to Ruby code examples.
* Revert "Add "Example" label to example code blocks"
This reverts commit 69fc9ce6a3.
* Give source code blocks a different background color
* Change targeted method's highlighting color to work better with the new method source
e608a84af3
RDoc 4.1.0 contains a number of enhancements including a new default
style and accessibility support. You can see the changelog here:
https://github.com/rdoc/rdoc/blob/v4.1.0.preview.1/History.rdoc
* test/rdoc: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e