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

Rich text featured snippets #838

Merged
merged 8 commits into from
Jun 18, 2021
Merged

Rich text featured snippets #838

merged 8 commits into from
Jun 18, 2021

Conversation

cea2aj
Copy link
Member

@cea2aj cea2aj commented Jun 17, 2021

Support rich text featured snippets

Note: This PR leverages the current develop version of the search ui. Before actual release, this should be updated to point to v1.9.

This PR

  • Adds a fieldName: 'snippet' parameter to analytics events on the direct answer card
  • Tweaks the RTF styling to match the updated mocks
  • Updates the direct answer card styling in general

This PR also bumps the default font size of regular direct answers so that it matches this new font size of featured snippet direct answers. This was approved by product.

J=SLAP-1384
TEST=manual

Add data to the knowledge graph and test various featured snippet queries. Also test on the yext help site which has rtf featured snippets enabled.

@coveralls
Copy link

coveralls commented Jun 17, 2021

Coverage Status

Coverage increased (+0.2%) to 5.713% when pulling e00a0f4 on dev/rtf-featured-snippets into 9f92500 on develop.

Copy link
Contributor

@yen-tt yen-tt left a comment

Choose a reason for hiding this comment

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

Should we add a snapshot in photographer ( in _captureDirectAnswers) with a query for rich text snippet? Also, are we including a max/fixed height for the card for when it's too long?

@cea2aj
Copy link
Member Author

cea2aj commented Jun 18, 2021

Should we add a snapshot in photographer ( in _captureDirectAnswers) with a query for rich text snippet? Also, are we including a max/fixed height for the card for when it's too long?

Yes, we should! I can do that as soon as I get the version of the SDK with the necessary core version working

@cea2aj
Copy link
Member Author

cea2aj commented Jun 18, 2021

Should we add a snapshot in photographer ( in _captureDirectAnswers) with a query for rich text snippet? Also, are we including a max/fixed height for the card for when it's too long?

Regarding max/fixed height, currently no, we are going to display the whole answer by default. If someone would like, we will provide instructions for setting a max height with a scroll bar. In the future we may develop a more advanced way of limiting the height.

Copy link
Contributor

@oshi97 oshi97 left a comment

Choose a reason for hiding this comment

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

besides nits lgtm!

hbshelpers/sdkAssetUrl.js Outdated Show resolved Hide resolved
test-site/config/global_config.json Outdated Show resolved Hide resolved
global_config.json Outdated Show resolved Hide resolved
directanswercards/documentsearch-standard/component.js Outdated Show resolved Hide resolved
directanswercards/documentsearch-standard/component.js Outdated Show resolved Hide resolved
Copy link
Contributor

@oshi97 oshi97 left a comment

Choose a reason for hiding this comment

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

lgtm!

@cea2aj cea2aj merged commit 357ad3b into develop Jun 18, 2021
@cea2aj cea2aj deleted the dev/rtf-featured-snippets branch June 18, 2021 20:40
@cea2aj cea2aj mentioned this pull request Jun 23, 2021
cea2aj added a commit that referenced this pull request Jun 23, 2021
## Version 1.22.0
### Changes
- Code coverage reports are now generated automatically for the Theme. (#759)
- A number of dependencies were updated in accordance with Dependabot's suggestions. (#780)
- The build time in `Development` mode was reduced significantly. (#782, #829) Build times in 
`Production` mode were also decreased. (#783, #825)
- Two new cards supporting videos were added: `product-prominentvideo` and `multilang-product-prominentvideo`. These cards
work with either YouTube or Vimeo content. (#794)
- The process for formatting hours was made more efficient, resulting in faster renders for cards with hours. (#784)
- Any SDK branch can now be specified in the `global_config.sdkVersion` attribute. (#791)
- Unused CSS was removed from the Theme. (#793, #798)
- To reduce flashing related to the SDK Component lifecycle, placeholder skeletons were added for the `SearchBar` and
`Navigation` components. (#797)
- Additional acceptance tests were added for the `VerticalFullPageMap` and Percy snapshots are now generated for all
cards. (#830, #820)
- Multi-language tests were added for the Theme. (#826)
- The `documentsearch-standard` card now supports rich text featured snippets. (#838)
- A new concept, `RuntimeConfig` was added. This allows configuration, computed at run-time, to be injected into the
Theme and SDK. This new concept enables JWT integrations as well. (#843)
### Bug Fixes
- A number of changes were made to make the Theme's visual regression tests more reliable. (#764, #765, #766, #778)
- Corrected how the CTA URLs for the `menuitem-standard` and `multilang-menuitem-standard` cards are computed. (#787)
- The Google Streetview person icon is now visible when using the `VerticalFullPageMap` layout. (#801)
- The size of the cluster and result pins are now configurable. (#807)
- A double encoding error for `verticalUrl` was fixed. (#836)
- The `Opens At` open status message is now properly translated in all languages. (#834)
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.

4 participants