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

Updating or Removing URL Query Params not updating the page #1273

Open
joshuacue opened this issue Aug 5, 2024 · 11 comments
Open

Updating or Removing URL Query Params not updating the page #1273

joshuacue opened this issue Aug 5, 2024 · 11 comments
Labels
awaiting triage Needs debugging to know the root cause good first issue Good for newcomers help wanted Extra attention is needed

Comments

@joshuacue
Copy link

🐞 bug report

URL/URL Query not updating

✍️ Description

Page doesn't update when you manuall change/remove query URL params.

🔬 Minimal Reproduction

-Go to -- > localhost:4000/xxxx-xx?queryKey=query-value
-Manually change localhost:4000/xxxx-xx to see variant of the page without queryKey
-It will suggest the localhost:4000/xxxx-xx?queryKey=query-value, ignore it by either pressing Escape or click outside so suggestion disappears
-URL will change to the localhost:4000/xxxx-xx but page won't rerender/update to the variant without the URL query params so you will assume you need to reopen the app
-Reopen the app, enter the localhost:4000/xxxx-xx again and ignore the suggestion
-Press Enter and you will be redirected to localhost:4000/xxxx-xx?queryKey=query-value 😆

🌍 Your Environment


MacOS Sonoma 14.3
Chrome Version 127.0.6533.89 (Official Build) (arm64)
NextJs 14 + nuqs -- could be helpful 

Work around:

Clear History

@pradeepbgs
Copy link

looks interesting issue , let me see and test the issue

@pradeepbgs
Copy link

Hey can you share the video ? So it would be helpful for me to see the problem and contribute to it

@violetadev violetadev added help wanted Extra attention is needed good first issue Good for newcomers awaiting triage Needs debugging to know the root cause labels Oct 12, 2024
@happymvp
Copy link
Contributor

@pradeepbgs Any updates?

@mini96
Copy link

mini96 commented Oct 28, 2024

Hi, I was wondering if I can help solve this issue. I have free time laying around and wanted to contribute in any way shape or form.

@happymvp
Copy link
Contributor

You can do it! I do something else.
Also you can join discord chat, Contributors responding there quite often.

@mini96
Copy link

mini96 commented Oct 29, 2024

Thanks mate, joining the dc now. I will keep you in the loop of how I go, btw do I get assigned the task here or in dc

@happymvp
Copy link
Contributor

I guess nowhere, by my experience. People will just see that you are doing it by reading thread.
I'm also new in this community, so don't get me wrong, I'm not source of truth, I just was last person in the task you wrote, so I respond to you =)

@mini96
Copy link

mini96 commented Oct 29, 2024

I see, well all is good. I will just start working on it now. Gonna have a field day trying to replicate the issue as I am on windows so wish me luck ahahahah

@mini96
Copy link

mini96 commented Nov 2, 2024

So I found a simple workaround until I fix this issue

  • Copy the desired URL in this case localhost:4000/xxxx-xx
  • Go to a separate URL such as https://www.google.com/
  • Then simply copy paste your desired URL then press enter

mini96 added a commit to mini96/responsively-app that referenced this issue Nov 8, 2024
Resolve the issue where updating the URL in the address bar and pressing Enter does not cause the webview to navigate to the new URL. Modified `processAddressChangeEvent` in the `WebView` component to always call `loadURL(address)` when the address changes, ensuring the webview navigates correctly upon address bar updates.

Closes responsively-org#1273
@mohamed1408
Copy link

mohamed1408 commented Nov 17, 2024

Found the issue.

When hitting enter from the address box if you have suggestions you are sending the url from the active suggestions
suggestions[activeIndex] != null ? suggestions[activeIndex].url
but I think what you really need to do is to send the typedAddress to dispatchAddress: (url?; string)

mohamed1408 added a commit to mohamed1408/responsively-app that referenced this issue Nov 17, 2024
@mohamed1408
Copy link

mohamed1408 commented Nov 17, 2024

I think I fixed some issues - if those weren't issues sorry to bother you.

  1. While pressing escape the suggestions were not closing - not set to false.
  2. Due to the above issue whenever we press Enter from the address bar the first or active suggestion's url get dispatched.
  3. Enter key press is not handled from Address Bar

Check the Commit#f305210 for code changes.

mohamed1408 added a commit to mohamed1408/responsively-app that referenced this issue Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting triage Needs debugging to know the root cause good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants