Skip to content
This repository has been archived by the owner on Dec 30, 2021. It is now read-only.

Back button #11

Open
chrismou opened this issue Jun 7, 2016 · 5 comments
Open

Back button #11

chrismou opened this issue Jun 7, 2016 · 5 comments
Labels

Comments

@chrismou
Copy link
Member

chrismou commented Jun 7, 2016

Implement a back button for navigating back from within the player.

For bonus points, also implement a forward button (as Radiant v1 currently has)

@chrismou chrismou added the core label Jun 7, 2016
@jacobwgillespie
Copy link
Member

Back / forward are already implemented as keyboard shortcuts, just need to get their state into the shared redux store and add buttons to the custom titlebar.

@matthewdias
Copy link

from what I can tell theyre already in the store via menu.js? If i tried to tackle this, what would be the best method to insert the buttons in the webview? Or should I just put them in the titlebar? They would look kind of out of place to the left of the hamburger menu.

@jacobwgillespie
Copy link
Member

The buttons are there yes, but the state of webview.canGoBack() and webview.canGoForward() would need to exist in the redux store so that the buttons could be enabled or disabled conditionally. As a plus the menu items could enable / disable conditionally as well.

https://github.com/electron/electron/blob/master/docs/api/web-view-tag.md#webviewcangoback

I would either add the buttons to the titlebar and somehow detect when the menu opens on GPM to dynamically move / hide them, or I would extend the gpm module (the one here) that is injected into the webview to mount a new react component for the back/forward buttons to the right of the hamburger menu and connect its props to the IPC interface. Either isn't necessarily trivial, though I suspect that the second option will work out to be the "best" option.

@matthewdias
Copy link

Ah I didnt see that module. That indeed sounds like the better option.

@jacobwgillespie
Copy link
Member

I should probably update the README / docs to better cover what's already been written. 😃

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

No branches or pull requests

3 participants