Skip to content

[V3] setURL bug fix#3533

Merged
leaanthony merged 2 commits into
wailsapp:v3-alphafrom
atterpac:v3/setUrl-fix
Oct 10, 2024
Merged

[V3] setURL bug fix#3533
leaanthony merged 2 commits into
wailsapp:v3-alphafrom
atterpac:v3/setUrl-fix

Conversation

@atterpac

@atterpac atterpac commented Jun 10, 2024

Copy link
Copy Markdown
Member

Description

Changes setURL implementation to use the assetServer GetStartURL

Fixes # (issue)
SPA style routing from backend to window.SetUrl("/#/about")

Type of change

Please delete options that are not relevant.

  • [ X ] Bug fix (non-breaking change which fixes an issue)

Doctor

# System
| Name         | Ubuntu                             |
| Version      | 22.04                              |
| ID           | ubuntu                             |
| Branding     | 22.04.3 LTS (Jammy Jellyfish)      |
| Platform     | linux                              |
| Architecture | amd64                              |
| CPU          | AMD Ryzen 7 3700X 8-Core Processor |
| GPU 1        | Unknown                            |
| Memory       | 24GB                               |

# Build Environment
| Wails CLI    | v3.0.0-alpha.4                           |
| Go Version   | go1.22.4                                 |
| Revision     | ab06920e74473cb0e34bf2dfffdd8bda023f3ddc |
| Modified     | true                                     |
| -buildmode   | exe                                      |
| -compiler    | gc                                       |
| CGO_CFLAGS   |                                          |
| CGO_CPPFLAGS |                                          |
| CGO_CXXFLAGS |                                          |
| CGO_ENABLED  | 1                                        |
| CGO_LDFLAGS  |                                          |
| GOAMD64      | v1                                       |
| GOARCH       | amd64                                    |
| GOOS         | linux                                    |
| vcs          | git                                      |
| vcs.modified | true                                     |
| vcs.revision | ab06920e74473cb0e34bf2dfffdd8bda023f3ddc |
| vcs.time     | 2024-06-08T22:28:38Z                     |


# Dependencies
| gcc        | 12.9ubuntu3                                                |
| gtk3       | not installed. Install with: sudo apt install libgtk-3-dev |
| npm        | 10.5.0                                                     |
| pkg-config | 0.29.2-1ubuntu3                                            |
| webkit2gtk | 2.44.2-0ubuntu0.22.04.1                                    |

Summary by CodeRabbit

  • New Features

    • Enhanced URL setting for the webview window through integration with the asset server for improved URL retrieval.
  • Bug Fixes

    • Fixed potential issues with direct URL assignments by ensuring URLs are processed through the asset server.

@atterpac atterpac marked this pull request as draft June 10, 2024 19:47
@atterpac atterpac marked this pull request as ready for review June 11, 2024 18:50
@coderabbitai

coderabbitai Bot commented Oct 10, 2024

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Walkthrough

The changes in this pull request involve a modification to the SetURL method of the WebviewWindow struct in the v3/pkg/application/webview_window.go file. The method now retrieves the start URL using the assetserver package instead of directly assigning a URL string. This update affects how the URL is processed before being set for the webview window, and the import section has been updated to include the assetserver package.

Changes

File Path Change Summary
v3/pkg/application/webview_window.go Modified SetURL method to use assetserver.GetStartURL(s) for URL retrieval; updated import section.

Sequence Diagram(s)

sequenceDiagram
    participant W as WebviewWindow
    participant AS as AssetServer

    W->>AS: GetStartURL(s)
    AS-->>W: Return URL
    W->>W: Set w.options.URL
    W->>W.impl: setURL(new URL)
Loading

🐰 "In the webview where URLs play,
The asset server leads the way.
With a hop and a skip, it fetches the link,
Now our windows can truly think!
A change so bright, like morning dew,
Hooray for the code, and the bunnies too!" 🐇


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sonarqubecloud

Copy link
Copy Markdown

@leaanthony leaanthony merged commit fc6f6bd into wailsapp:v3-alpha Oct 10, 2024
Grantmartin2002 pushed a commit to Grantmartin2002/wails that referenced this pull request Apr 29, 2026
setURL bug fix

s

s

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
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