Skip to content

Contentful updates june 19 #2635

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

Merged
merged 10 commits into from
Jun 18, 2019
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';
import Renderer from 'react-test-renderer/shallow';
import { MemberCardInner } from 'components/Contentful/MemberCard/MemberCard';

test('Matches shallow shapshot', () => {
const renderer = new Renderer();
const MOCK_PROPS = {
memberCard: {
country: 'es',
},
trackIcon: {
file: {
url: 'https://www.topcoder.com',
},
},
theme: {},
};
renderer.render(<MemberCardInner {...MOCK_PROPS} />);
expect(renderer.getRenderOutput()).toMatchSnapshot();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Matches shallow shapshot 1`] = `
<a>
<div>
<div
style={
Object {
"backgroundColor": "#63c630",
}
}
>
<img
alt="track icon"
src="https://www.topcoder.com"
/>
</div>
<div>
<div />
<div>
<span
className="flag-icon flag-icon-es undefined"
/>
<span>
SPAIN
</span>
</div>
</div>
</div>
</a>
`;
17 changes: 10 additions & 7 deletions config/webpack/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@ module.exports = {
* are not bundled. */
/utils[\\/]router[\\/]require/,
],
rules: [{
test: /\.svg$/,
loader: 'file-loader',
options: {
outputPath: '/images/',
publicPath: `${publicPath}/images`,
rules: [
{
test: /\.svg$/,
loader: 'file-loader',
options: {
outputPath: '/images/',
publicPath: `${publicPath}/images`,
},
exclude: /node_modules/,
},
}],
],
},
plugins: [
new CopyWebpackPlugin([{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ other types too.
component works only with YouTube videos, and the URL should be similar to
`https://www.youtube.com/embed/mD12LIqdxqk` ().

- #### NewsletterArchive
*Example:* `<NewsletterArchive name="Design Newsletter" />`

A list of archive links sorted by descending `sent_date` from a MailChimp's campaign folder. Sould be working under any MarkdownParser component.

The properties are:
- `name` - the unique name of the camplaing foler. It has to be only one name entity. If those duplicate first found will be picked up and rest ignored.

## Links

- #### Link
Expand Down
1 change: 1 addition & 0 deletions docs/contentful/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Instructions are also provided below for developments that want to modify/create
- [Navigation Menu](./NavigationMenu.md)
- [Route](./Route.md)
- [Viewport](./viewport.md)
- [Member Card](./memberCard.md)
- [Preview Content](./preview-content.md)
- [Custom inline components in Markdown fields](./custom-inline-components-in-markdown-fields.md)
- [Miscellaneous CSS Solutions](./miscellaneous-CSS-solutions.md)
Expand Down
8 changes: 8 additions & 0 deletions docs/contentful/memberCard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Member Card
A card looking component that represents member/speaker/person card.

## Fields
![](./pics/memberCard.png)

## Live Demo
https://community-app.topcoder.com/examples/contentful/viewport/4SKonli2adCNFxBvgaeayI
Binary file added docs/contentful/pics/memberCard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading