PWA alerts (PR #6850)

GitHub

You’ve signed the CLA, xfalcox. Thank you! This pull request is ready for review.

Should we force a max length for that setting instead of adding a warning? site_settings.yml has an option to define the max length.

Good Idea!

Added a max to the setting, but letting the warning there for now so we can guide sites who already filled it.

@tgxworld I think this is ready for a review

    pwa_config_icon_warning: 'The server is missing a proper large icon which allows users to add a homescreen shortcut to this site on Android devices. Go to <a href="%{base_path}/admin/site_settings/category/all_results?filter=large_icon">the Site Settings</a> and upload an icon of the recommended size.'

%{base_path}/admin/site_settings/category/all_results?filter=large_icon One thing I learnt when building Discobot is to keep full paths out of translations. Translators can always find ways to mess this up and this make updating the URLs less brittle.

    pwa_config_title_warning: 'The server is missing a short title which allows users to add a homescreen shortcut to this site on Android devices. Go to <a href="%{base_path}/admin/site_settings/category/all_results?filter=short_title">the Site Settings</a> and configure a title of the recommended length.'

Perhaps we can test for the exact object here? to_not be_nil is too generic and returning an incorrect object will cause this test to pass.

Looks good to me :+1: