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

Make the back/forward buttons of the editor documentation window remember past same-page locations #8000

Open
ershn opened this issue Oct 6, 2023 · 3 comments

Comments

@ershn
Copy link

ershn commented Oct 6, 2023

Describe the project you are working on

A 2D top-down colony survival game set in space (but I think that's unrelated though).

Describe the problem or limitation you are having in your project

In the current implementation, the back/forward buttons of the editor documentation window can be hard to use since they don't remember same-page past locations. They behave rather differently from the back/forward buttons of web browsers. And since web browsers are probably what most users are familiar with, it can be confusing.

Right now, the back/forward buttons seem to always move you between pages, for example between the Node and Sprite2D class reference pages. Movements within the same page, like jumping to a member description by clicking a link, are not registered in the browsing history.

So for example, after you click a method link in a class reference page, clicking the back button will not get you back to where you were before clicking the link. It will move you back to the class reference page you were browsing beforehand.

When you want to move back to a previous location on the same page, you cannot use the back button. You have to manually move back to where you were by scrolling or using the side menu. This can be time consuming.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Make the back/forward buttons of the documentation window also remember previous same-page positions, i.e. make the buttons follow web browsers' behavior.

This way, the back/forward buttons will allow faster navigation by limiting scrolls and clicks. It will also prevent usage mistakes for users that expect the buttons to work like in web browsers.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Here is a possible algorithm to implement the described changes:

  • when clicking a link that keeps you on the same page (whether directly within the page or from the side menu), register the current scroll position in the browsing history
  • when clicking the back/forward button, if the corresponding browsing history entry is one we registered in the above scenario, scroll to the saved position

If this enhancement will not be used often, can it be worked around with a few lines of script?

I think it will be used very often. It also cannot be worked around easily.

Is there a reason why this should be core and not an add-on in the asset library?

I think it's essential enough to be in core.

@ershn ershn changed the title Make the back/forward button of the editor documentation window behave the same as in web browsers Make the back/forward button of the editor documentation window follow web browser conventions Oct 6, 2023
@ershn ershn changed the title Make the back/forward button of the editor documentation window follow web browser conventions Make the back/forward buttons of the editor documentation window remember past same-page locations Oct 6, 2023
@ershn
Copy link
Author

ershn commented Oct 6, 2023

Sorry for the edits (I was a bit tired when I wrote it at first). This should be the final form of the proposal.

@ershn
Copy link
Author

ershn commented Oct 22, 2023

The problem described is probably the same as in godotengine/godot#82293.

@aXu-AP
Copy link

aXu-AP commented Sep 4, 2024

This seems to be implemented by godotengine/godot#63515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants