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

No error message when the transition:name property is the wrong type in dev mode, view transitions just don't work #10150

Closed
1 task
godalming123 opened this issue Feb 17, 2024 · 4 comments · Fixed by #10205
Assignees

Comments

@godalming123
Copy link

godalming123 commented Feb 17, 2024

Astro Info

Astro                    v4.4.0
Node                     v20.10.0
System                   Linux (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

View transitions do not work when the transition:name property is a number, their is no error message, and the issue is hard to debug.

What's the expected result?

Either you can use numbers as the transition:name property, or a nice error message should be displayed, EG:

At [insert location here]:

  • transition:name should be a string (recieved [insert value here] which is of type [insert type here])

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-fie6dy?file=src%2Fpages%2Findex.astro

Participation

  • I am willing to submit a pull request for this issue.

Behaviour changed since astro v4.4

Before astro v4.4, a weird error message was returned (look at the changes in this issue to see it). After I have upgraded, the error message has disappeared, but the behaviour is still the same. I have updated this issue accordingly (except the minimal reproducable example) for the behaviour on astro version 4.4.0.

@github-actions github-actions bot added the needs triage Issue needs to be triaged label Feb 17, 2024
@godalming123 godalming123 changed the title Bad error message when the transition:name property is the wrong type No error message when the transition:name property is the wrong type in dev mode, view transitions just don't work Feb 18, 2024
@martrapp martrapp removed the needs triage Issue needs to be triaged label Feb 19, 2024
@martrapp martrapp self-assigned this Feb 19, 2024
@martrapp
Copy link
Member

Hello @godalming123, thank you for opening this issue. I'll take a look at this.

@martrapp
Copy link
Member

This is the output from npx astro check:
image

@martrapp
Copy link
Member

You should also see an error in the IDE (here VS Code) when you write code like this:
image

@godalming123
Copy link
Author

Yeah, I haven't been able to get the LSP working in helix, I think that it's because I didn't specify the typescript install path

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 a pull request may close this issue.

2 participants