Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Added HTML renderer for description and short description #140

Merged
merged 8 commits into from
Sep 18, 2018

Conversation

rogyar
Copy link
Contributor

@rogyar rogyar commented Aug 2, 2018

Description

This PR improves output for description and shord_description of a product. Previously we just had a raw output. Now, if you use some directive (upon inserting a block into the description or so), its contents are rendered.

Fixed Issues (if relevant)

  1. GraphQL API returns rendered content for product #134: GraphQL API returns rendered content for product

Manual testing scenarios

  1. Magento installation from 2.3-develop branch (optionally: with sample data installed)
  2. Add a static block to a product description or short description. Example (for sample data)
A plain text description is here ...
...
{{block id="sale-block"}}
  1. Get the product's description and the short description using a GraphQL request.
  2. You should see rendered values in the place where the block is inserted

Copy link
Contributor

@paliarush paliarush left a comment

Choose a reason for hiding this comment

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

@rogyar thanks for contribution!

QUERY;
$response = $this->graphQlQuery($query);

self::assertContains($assertionCmsBlockText, $response['products']['items'][0]['description']);
Copy link
Contributor

Choose a reason for hiding this comment

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

Optionally, but would be nice to make sure no {{ or }} left in the description.

return null;
};
return $this->valueFactory->create($result);
throw new GraphQlInputException(__('"model" value should be specified'));
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

#189
Has been created

@magento-engcom-team magento-engcom-team merged commit 3f92af0 into 2.3-develop Sep 18, 2018
magento-engcom-team added a commit that referenced this pull request Nov 8, 2018
 - Merge Pull Request magento-engcom/import-export-improvements#140 from maxalmonte14/import-export-improvements:improvement/supress_undefined_property_error
 - Merged commits:
   1. 9a7fa4c
   2. d0c4c64
   3. fab32c6
@naydav naydav deleted the rendered-attributes-product branch April 12, 2019 19:36
naydav pushed a commit that referenced this pull request Jun 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants