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

fix: debugger initial frame load + frame ui image loading state on change #279

Merged
merged 6 commits into from
Apr 3, 2024

Conversation

michalkvasnicak
Copy link
Collaborator

Change Summary

This PR fixes:

  • issue when image loading was not correctly detected on image change
  • issue when debugger did not open default URL on initial load

This PR also removes unnecessary url input state, etc.

Merge Checklist

  • PR has a Changeset
  • PR includes documentation if necessary
  • PR updates the boilerplates if necessary

Copy link

vercel bot commented Apr 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frames-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2024 0:55am
framesjs-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2024 0:55am

@michalkvasnicak michalkvasnicak self-assigned this Apr 3, 2024
@michalkvasnicak michalkvasnicak changed the title chore: changeset fix: debugger initial frame load + frame ui image loading state on change Apr 3, 2024
url || process.env.NEXT_PUBLIC_HOST || "http://localhost:3000"
);
const url = useMemo(() => {
const fallbackURL = process.env.NEXT_PUBLIC_HOST || 'http://localhost:3000';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually a client side exception occurs when a server isn't running - does this handle that?

Copy link
Collaborator Author

@michalkvasnicak michalkvasnicak Apr 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this just solves issues with manipulating the URL and also loading the URL on initial load. Not sure what you mean by exceptions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't fix an issue when frames return 500. Now I found out that when the URL is not alive our debugger returns 500 response which causes the debugger to fails as well with the following.

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean this @stephancill ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But then we should probably not fill the URL input with default URL as well right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it's useful to pre-populate the input, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok so if the url query is filled, we should load it automatically. If there is no url query param, then we should just show topbar, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes sounds good

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@stephancill
Copy link
Contributor

lgtm!

@stephancill stephancill merged commit baeb33e into dev Apr 3, 2024
7 checks passed
@stephancill stephancill deleted the fix/debugger-load-url-on-init branch April 3, 2024 12:58
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