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

fix: meta tags for public form pages #5799

Merged
merged 5 commits into from
Feb 21, 2023
Merged

fix: meta tags for public form pages #5799

merged 5 commits into from
Feb 21, 2023

Conversation

wanlingt
Copy link
Contributor

@wanlingt wanlingt commented Feb 21, 2023

Problem

Social media previews were not being generated correctly for public forms.

formResult.value.status was undefined as status was not retrieved in the form result. Hence the check for public forms was always returning false, and the default meta tags would be used for public forms, instead of the public form-specific meta tags.

Closes #5589

Solution

To fix this, I specified status when retrieving the form using FormService.retrieveFormKeysById.

Breaking Changes

  • No - this PR is backwards compatible

Before & After Screenshots

AFTER:

Public form
image

Private form
image

Tests

Preview and generate Open Graph meta tags, check that title, description and image are populated for

  • public form
  • private form

Copy link
Contributor

@tshuli tshuli left a comment

Choose a reason for hiding this comment

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

minor nit but lgtm!

@wanlingt wanlingt temporarily deployed to staging-al2 February 21, 2023 10:07 — with GitHub Actions Inactive
@wanlingt wanlingt merged commit 33dac95 into develop Feb 21, 2023
@wanlingt wanlingt deleted the fix/metatags branch February 21, 2023 10:40
@wanlingt wanlingt mentioned this pull request Feb 23, 2023
32 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

meta tags are not showing up correctly for public form pages
3 participants