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

DEV: Hydrate theme setting uploads#36696

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

Draft
janzenisaac wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromhydrate-theme-settings

Conversation

@janzenisaac
Copy link
Contributor

@janzenisaacjanzenisaac commentedDec 15, 2025
edited
Loading

After the changes#36665, we needed to hydrate uploads for themes as well. This PR introduces the necessary changes:

  • Makehydrate_uploads_in_objects andhydrate_uploads_in_object non-private to call them fromapp/serializers/theme_settings_serializer.rb
  • Add tests

Copy link
Contributor

@Grubba27Grubba27 left a comment

Choose a reason for hiding this comment

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

I think it makes sense!

MultiJson.dump(ThemeSiteSetting.generate_defaults_map)
else
MultiJson.dump(theme_site_settings[theme_id])
settings=theme_site_settings[theme_id].dup
Copy link
Contributor

Choose a reason for hiding this comment

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

Why isdup needed here? not calling it mutates@theme_site_settings[provider.current_site]?

Comment on lines +290 to +291
# Hydrate uploads in object settings for themes
settings.eachdo |name,value|
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be possible to skip this loop if we knew that there would be no upload to hydrate?

@janzenisaacjanzenisaac marked this pull request as draftDecember 15, 2025 17:32
}
if (Number.isInteger(value)) {
constcachedUpload=uploadCache.get(value);
return cachedUpload?.url||null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason for this|| null?

If there is nourl property, it will returnundefined and I think Ember treats both null and undefined in a similar manner(both arefalsy)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@Grubba27Grubba27Grubba27 approved these changes

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@janzenisaac@Grubba27

[8]ページ先頭

©2009-2025 Movatter.jp