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 frames based implementation with a frames-like css implementa… #137

Merged
merged 2 commits into from
Oct 21, 2020

Conversation

p8
Copy link
Member

@p8 p8 commented Apr 16, 2019

…tion

The current Rails documentation has a frames based implementation. This
prevents deep linking to documentation and removes navigation if the page
is opened without frames.

We can keep the same layout with a css based implementation.

Fixes #135

@p8
Copy link
Member Author

p8 commented Apr 16, 2019

The build is failing because rubygems can't be upgraded for deprecated ruby versions. This has been fixed by #134.

@p8
Copy link
Member Author

p8 commented Apr 19, 2019

A rails example can be found here: http://deheus.net/rdoc/

@sunny
Copy link

sunny commented May 10, 2020

Such a great change to the layout 😍

@p8: Since #134 has been merged, could you fix the conflicts with master to help this get merged?

@p8
Copy link
Member Author

p8 commented May 10, 2020

@sunny Thanks and done :) The biggest blocker I think is that the side panel collapse when clicking an item.

@p8
Copy link
Member Author

p8 commented May 10, 2020

I think I can solve the side panel stuff as well..

…tion

The current Rails documentation has a frames based implementation. This
prevents deep linking to documentation and removes navigation if the page
is opened without frames.

We can keep the same layout with a css based implementation.
@p8
Copy link
Member Author

p8 commented May 10, 2020

It now also opens the panel for the current page. For example:
http://deheus.net/rdoc/classes/ActionText/Attachments/Minification.html

@matthewd
Copy link
Member

Neat!

I honestly don't know how hard this would be, so I'll just write some words, and feel free to jump to a quick "no":

Do you think it would be possible (either now, or in the future) to make this do a turbolinks-y replacement of the content on the right without replacing the leftnav at all? I can't speak for others, but I find I often click quickly between several opened nodes to compare two entries, or to find exactly which I need -- especially when navigating search results. Having the navigation pre-expanded is much better than it re-collapsing, but it does still feel less friendly than something that seems truly persistent. (While totally acknowledging all the disadvantages of frames, and reasons this otherwise is a very good idea.)

@p8
Copy link
Member Author

p8 commented May 13, 2020

@matthewd I think that would be possible with turbolinks and data-turbolinks-permanent

@p8 p8 force-pushed the without-frames branch 2 times, most recently from d0619ed to 4c5d4a0 Compare May 15, 2020 07:24
@p8
Copy link
Member Author

p8 commented Jun 26, 2020

@matthewd I have a proof of concept working with turbolinks.
It keeps the left navigation when navigating to other pages.
New demo is here: https://sdoc.deheus.net

By abandoning frames the side panel no longer persists after clicking on
links in the panel. With turbolinks we can make the panel persistent
across requests by setting data-turbolinks-permanent attribute on the
panel.

Generated pages can be in multiple sub directories so we link to the
assets with relative urls. Turbolinks does not consider relative urls
similar, resulting in page reloads and losing the context of the panel.
This has been fixed by making the assets urls absolute. This breaks
opening the docs locally. Maybe all generated docs should be in the same
folder?

This change also upgrade jQuery to 3.5.1.
Removes ie hack
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.

Being able to have links when navigating
4 participants