Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: get presets working correctly with dynamic params#17923

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jaaydenh merged 2 commits intomainfromjaaydenh/dynamic-params-presets
May 19, 2025

Conversation

jaaydenh
Copy link
Contributor

@jaaydenhjaaydenh commentedMay 19, 2025
edited
Loading

This adds a few fixes to get presets working correctly with dynamic params

  1. Changes to preset params need to be rendered and displayed correctly
  2. Changes to preset params need to be sent to the websocket
  3. Changes to preset params need to be marked as touched so they won't be automatically changed later because of dynamic defaults. Dynamic defaults means any default parameter value can be changed by the websocket response unless edited by the user, set by autofill or set by a preset.

@jaaydenhjaaydenh self-assigned thisMay 19, 2025
@jaaydenhjaaydenh requested a review fromEmyrkMay 19, 2025 20:46
Copy link
Member

@aslilacaslilac left a comment

Choose a reason for hiding this comment

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

mostly looks good, just had one concern. approving since it's a small thing so that you don't have to wait for me to re-review.

Comment on lines 241 to 244
return null;
}).filter(
(update): update is NonNullable<typeof update> => update !== null,
);
Copy link
Member

@aslilacaslilacMay 19, 2025
edited
Loading

Choose a reason for hiding this comment

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

you could useflatMap here instead ofmap andfilter. just return[] or[x] instead ofnull andx. then we don't need the fancy annotations.

but even that's a bit "clever" for my taste. imho, ideally we'd leave it as afor loop and just have someresult array that wepush to when desired.

jaaydenh reacted with thumbs up emoji
@jaaydenhjaaydenh merged commitdc21016 intomainMay 19, 2025
34 checks passed
@jaaydenhjaaydenh deleted the jaaydenh/dynamic-params-presets branchMay 19, 2025 22:20
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMay 19, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@aslilacaslilacaslilac approved these changes

@EmyrkEmyrkAwaiting requested review from Emyrk

Assignees

@jaaydenhjaaydenh

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@jaaydenh@aslilac

[8]ページ先頭

©2009-2025 Movatter.jp