-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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(web): admin settings number input validation #9470
fix(web): admin settings number input validation #9470
Conversation
Deploying immich with Cloudflare Pages
|
@@ -0,0 +1,30 @@ | |||
import { render } from '@testing-library/svelte'; | |||
import userEvent from '@testing-library/user-event'; | |||
// @ts-expect-error import works |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be unnecessary, I pulled the branch locally and after an npm install the error went away, lets remove this then I am good to merge it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import does work, only typescript complains about it. Initially @ts-expect-error
wasn't included but that failed: https://github.com/immich-app/immich/actions/runs/9078498613/job/24945653995
There are three possible solutions I came up with:
- Move
<script lang="ts" context="module">
to a dedicated .ts file and change all imports - Manually declare the type in
module '*.svelte'
- Just ignore the error
I chose for the easy option 3, but if another solution is desirable we can also do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I see that now, why that doesn't error in the IDE that also runs typescript against the file, I have no idea...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The annoying part for me is that the ts-expect-error line errors because my IDE doesn't believe there is actually an error there 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have only seen and run into issues when using <script lang="ts" context="module">
. Personally, I just prefer to externalize it into a dedicated ts file.
c5db8c1
to
ac7ef2c
Compare
Thank you, thank you, thank you! This is a huge relief. It's working great. |
Fixes #9361 by performing input validation
on:blur
instead ofon:input