Multiple Containers in the same Window
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 36.3k
- Forks
- 1.9k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 33
Description
Is your feature request related to a problem? Please describe.
I want to have two web views (containers) in one Window, allowing me to show an external website.
Many sites block iframe usage, and I assume that's true with something like Wails. In addition, when using an iframe, you can't use JavaScript to interact with the contents frame, for example, being able to read the title of the page.
Use case one is a live-reload app that will run a Go web app and rebuild, then reload it when something changes. In the app, I will have buttons and a log viewer. The Go app is running as a web server and is shown inside the app but is not part of it.
Use case two, a hacker news client, where I'd like to show the comments with the linked external website. The comments are part of the local app, and the website is not.
Describe the solution you'd like
For a window, I'd like to have a way to indicate that I want another container and how I want the containers laid out. For example, I want to add a container to the left of the "main" container or the new container below the main container.
- For the added container, I want to be able to set the initial URL.
- For the added container, I want to be able to change the URL.
- For the added container, I want to execute arbitrary JavaScript and receive a response.
- I want to be able to show and hide the added container without removing the container (keeping the website as is)
- When the added container is hidden, I want the main container to resize to cover the whole window or have a way to do that manually.
Describe alternatives you've considered
With an iframe, I can load local sites, but it doesn't allow me to read things like the page title or to use JavaScript to reload the page. In my current web app, I use a reverse proxy, which makes the web app and iframe contents appear on the same domain and port, and I can use JavaScript to interact with the iframe's contents.
Additional context
It's common for desktop apps to show websites in a web view so the user doesn't need to leave the app to view the external website. For example, news aggregators show news articles. To show pages for help and support. To show an e-commerce site.
While not considered the best practice anymore (a web vire is less capable than a real browser) it is a feature often required by less technical decision makers in companies. Not having this feature could prevent a developer from using Wails as they would not be able to implement this feature.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by locating the window and web-view implementation, then assess how multiple containers, layout, navigation, JavaScript execution, visibility, and resizing would be covered. Done means the requested container behaviors work for the stated use cases across the supported desktop platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, javascript
- Domain
- desktop-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100