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

Replace source code toggler JavaScript with <details> #252

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

jonathanhefner
Copy link
Member

This commit replaces the javascript:toggleSource(...) links used to show and hide method source with an inherently toggleable <details> element. In addition to reducing JavaScript, this fixes a small horizontal shift that occurred when changing "show" to "hide" (and vice versa).

The external-link.svg file is from Feather icons v4.29.0, and is licensed under the MIT license.

Before After
before1 after1
before2 after2

This commit replaces the `javascript:toggleSource(...)` links used to
show and hide method source with an inherently toggleable `<details>`
element.  In addition to reducing JavaScript, this fixes a small
horizontal shift that occurred when changing "show" to "hide" (and vice
versa).

The `external-link.svg` file is from [Feather icons][feather] v4.29.0,
and is [licensed under the MIT license][license].

[feather]: https://feathericons.com/
[license]: https://github.com/feathericons/feather/blob/v4.29.0/LICENSE
@jonathanhefner jonathanhefner merged commit 5f6a101 into rails:main Jul 31, 2023
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.

2 participants