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

DEV: migrate deprecated icon names in settings and update banner_links to objects schema #36

Merged
merged 2 commits into from
Dec 27, 2024

Conversation

tyb-talks
Copy link
Contributor

@tyb-talks tyb-talks commented Dec 27, 2024

This PR migrates deprecated Font Awesome icon names saved in settings. For more detail, refer to the announcement at https://meta.discourse.org/t/-/325349.

The migration function is intentionally copying the same type of operations in https://github.com/discourse/discourse/blob/435fbb74082e1d060f97267a62dfa29c73979127/lib/svg_sprite.rb#L519 as that's used to convert the icon names in core.

This also includes a migration of the banner_links setting from json schema to objects typed setting (see discourse/Discourse-easy-footer#45 for another example of a similar links setting migration).

Testing

Migration worked for settings that were in json-schema.
setting2
setting1

@tyb-talks tyb-talks force-pushed the dev-migrate-deprecated-icon-names-in-settings branch from 4af0f75 to e3eb1bd Compare December 27, 2024 03:17
Comment on lines +6 to +7
icon: convertIconName(link.icon),
text: link.text.substring(0, 1000),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No null checks on these since the previous json schema already has minLength: 1 validations.

@tyb-talks tyb-talks merged commit c967b7e into main Dec 27, 2024
4 checks passed
@tyb-talks tyb-talks deleted the dev-migrate-deprecated-icon-names-in-settings branch December 27, 2024 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants