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

chore: use static params when dynamic param metadata is missing#17836

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
Emyrk merged 25 commits intomainfromstevenmasley/use_static_as_dynamic
May 16, 2025

Conversation

Emyrk
Copy link
Member

@EmyrkEmyrk commentedMay 14, 2025
edited
Loading

Existing template versions do not have the metadata (modules + plan) in the db. So revert to using static parameter information from the original template import.

This data will still be served over the websocket.

TODO

Improve the error message when using static params.

@EmyrkEmyrk marked this pull request as ready for reviewMay 15, 2025 02:10
@EmyrkEmyrk changed the titlechore: static params as dynmaicchore: use static params when dynamic param metadata is missingMay 15, 2025
@Emyrk
Copy link
MemberAuthor

Emyrk commentedMay 15, 2025
edited
Loading

@aslilac I took your suggestion and it is way cleaner 👍

handleDynamicParameters andhandleStaticParameters are now their own functions with no returns.

Therender function is still created, as I can reuse the websocket logic:handleParameterWebsocket

@EmyrkEmyrk requested a review fromaslilacMay 15, 2025 19: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.

closer! still some issues tho

})
}

func (api *API) handleParameterWebsocket(rw http.ResponseWriter, r *http.Request, render previewFunction) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
func (api*API)handleParameterWebsocket(rw http.ResponseWriter,r*http.Request,renderpreviewFunction) {
func (api*API)handleParameterWebsocket(rw http.ResponseWriter,r*http.Request,previewpreviewFunction) {

still think we should call it preview, especially since that's what you named the type

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

It will collide with the package name 😢

@EmyrkEmyrkforce-pushed thestevenmasley/use_static_as_dynamic branch from9f3529a toa6ce197CompareMay 15, 2025 23:48
@EmyrkEmyrkforce-pushed thestevenmasley/use_static_as_dynamic branch froma6ce197 todf65b92CompareMay 15, 2025 23:50
@EmyrkEmyrk merged commitf36fb67 intomainMay 16, 2025
29 checks passed
@EmyrkEmyrk deleted the stevenmasley/use_static_as_dynamic branchMay 16, 2025 16:48
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMay 16, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@aslilacaslilacaslilac approved these changes

Assignees

@EmyrkEmyrk

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Emyrk@aslilac

[8]ページ先頭

©2009-2025 Movatter.jp