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

Cannot scroll output with --one-file #1428

Open
jacob-carlborg opened this issue Jan 23, 2022 · 0 comments
Open

Cannot scroll output with --one-file #1428

jacob-carlborg opened this issue Jan 23, 2022 · 0 comments
Labels

Comments

@jacob-carlborg
Copy link

jacob-carlborg commented Jan 23, 2022

When generating the documentation using the --one-file flag and opening the result in the browser, it's not possible to scroll the website.

Steps to reproduce

  1. Run the following commands:
cat << EOF >> foo.rb
# Foobar
# * asd
class Foo
end
EOF

cat << EOF >> README.md
# Foobar

## Installation

Add this line to your application's Gemfile:

gem 'foobar'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install foobar

## Usage

TODO: Write usage instructions here

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run
`rake spec` to run the tests. You can also run `bin/console` for an interactive
prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To
release a new version, update the version number in `version.rb`, and then run
`bundle exec rake release`, which will create a git tag for the version, push
git commits and the created tag, and push the `.gem` file to
[rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at
https://github.com/foobar.
EOF

yard doc --one-file --no-save -o . foo.rb

The readme is to get enough output to need to scroll.

  1. Open the generated index.html in the browser

Actual Output

I expect to be able to scroll the website to see all output. But it's not possible. As you can see on the screen recording below, when I zoom out, additional content is present. The same issue happens with both Safari and Chrome. This issue does not occur when the --one-file flag is not used.

no_scroll.mov

Expected Output

I expect to be able to scroll the website.

Environment details:

  • OS: macOS 12.0.1
  • Ruby version (ruby -v): ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-darwin20]
  • YARD version (yard -v): yard 0.9.27
@lsegal lsegal added the Bug label Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants