Commit graph

18 commits

Author SHA1 Message Date
Stan Lo
c5f0fe1285 [ruby/rdoc] Improve method source toggling
(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
2024-10-10 09:45:41 +00:00
Stan Lo
cbc40bb130 Sync rdoc 2024-08-05 08:27:45 +08:00
gemmaro
62754503d8 [ruby/rdoc] [DOC] Fix to use KeyboardEvent.key over keyCode
663edc807c
2023-07-05 03:39:18 +00:00
gemmaro
77fa4787bd [ruby/rdoc] Add keydown event listener to focus on search field
db62e47df2
2023-07-05 03:37:28 +00:00
Nobuyoshi Nakada
39909d8c18 [ruby/rdoc] Escape search results
https://hackerone.com/reports/1321358

2ebf8fd510
2022-10-07 12:12:09 +09:00
Kazuhiro NISHIYAMA
989e8ad322
Remove debug print [ci skip] 2019-08-28 10:34:56 +09:00
aycabta
f308ab2131 Remove jquery.js 2019-08-28 01:12:14 +09:00
aycabta
39810b4035 Good bye jQuery 2019-08-28 00:48:12 +09:00
aycabta
8bb4892376
[ruby/rdoc] Update jQuery to 3.3.1
17df871ee
2019-07-26 17:32:19 +08:00
hsbt
23863ff75d * lib/rdoc/*, test/rdoc/*: Update rdoc/rdoc master(f191513)
https://github.com/rdoc/rdoc/blob/master/History.rdoc#423--2016--
  https://github.com/rdoc/rdoc/blob/master/History.rdoc#422--2016-02-09

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-05 10:35:30 +00:00
zzak
f0ee1e67d3 * lib/rdoc/generator/template/darkfish/js/jquery.js: Backport
rdoc/rdoc@74f60fcb04


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-05 23:46:11 +00:00
hsbt
d42d6e690e * lib/rdoc.rb, lib/rdoc, test/rdoc: Update to RDoc 4.2.0.alpha(313287)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-05 01:41:25 +00:00
drbrain
23201ab1c4 * lib/rdoc: Update to RDoc master 263a9e5. This improves the
accessibility of the search box.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 22:09:35 +00:00
drbrain
df7dac9174 * lib/rdoc: Update to RDoc 4.1.0.preview.1
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
2013-09-18 23:33:36 +00:00
drbrain
6d0647c350 * lib/rdoc: Import RDoc 4.0.0.rc.2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 08:05:44 +00:00
drbrain
1c279a7d27 * lib/rdoc*: Updated to RDoc 4.0 (pre-release)
* bin/rdoc:  ditto
* test/rdoc:  ditto
* NEWS:  Updated with RDoc 4.0 information


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27 04:28:14 +00:00
nobu
2553a96f9e * {lib,test}/rdoc: removed trailing spaces. reapplied r22784.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-02 04:40:47 +00:00
drbrain
46580b5147 Import RDoc 2.5
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-01 07:45:16 +00:00