Skip to content

Commit

Permalink
Merge branch 'dev' (#295)
Browse files Browse the repository at this point in the history
* Added support for TypeScript when 'jss build'ing

* Type-hint field value.

* Update dataModels.ts

* Move type hint to Field.

* Type-lock return value when defaultValue provided.

* Fix to copy host style attribute to its children dynamic components

* changed spacing

* updates for ssr

* Add loader for lazy loaded components

* Add some documentation

* Placeholder loading component

* Use ng-template instead of ng-content

* Fix typo

* Export SitecoreContextReactContext

See #224

* WIP: simple http listener that accepts JSS view engine args, performs SSR, and returns result to caller.

* Moved JSS rendering host to separate package.

* SUGCON demo prep

* Removed unnecessary console.log statements from htmlTemplateFactory.js

* Changed `start:http-renderer` script name to `start:rendering-host`

* Demo content for content block component.

* Changed `sc_renderengineurl` querystring key to the CORRECT `sc_httprenderengineurl`. doh, smh.

* Incorporating `defaultAppInvocationInfoResolver` into the renderingHostServer startup script.

* removed static `jss` subdomain for ngrok tunnel

* Fixing tests

* #61 Nested component definitions via Item Link returns only IDs

* Upgrade dependencies with critical and high security issues (#252)

Upgrade dependencies

* Upgrade cypress

* downgrade dependency version

* Feature/356383 (#256)

Upgrade sitecore-jss-react package dependencies

* remove InferProps (#259)

remove InferProps

* Feature/356379 (#265)

* update react sample dependencies

* update dependencies and fix ts errors (#266)

Upgrade Vue package dependencies

* #267 Error in description of one of methods of Manifest interface

* Upgrade Vue sample (#269)

Upgrade Vue sample

* Feature/356380: Update Angular

* Upgrade jss-angular and jss-angular-schematics and jss-sample-app

* Feature/356378 (#272) Upgrade CLI Packages

Upgrade CLI Packages

* Use Object.entries instead of Object.keys (#274)

Use Object.entries instead of Object.keys

* mediaApi.updateImageUrl loses revision querystring (#275)

mediaApi.updateImageUrl loses revision querystring

* DevTools loading hidden files and crashing (#276)

* Feature/356373 (#273) Node Proxy: CURL URL -IL returns 500 OK

Node Proxy: CURL URL -IL returns 500 OK

* change logo (#279)

change logo

* upgrade react-native sample (#282)

upgrade react-native sample

* [React-Native] Extend Image component to render svg images (#283)

* add react-native-svg to sample app

* update react-native package-lock

* add react-native-svg to sitecore-jss-react-native

* #348713Explicitly state that field names are not affected by the serialization configuration on Layout Service (#284)

* #348713 Explicitly state that field names are not affected by the serialization configuration on Layout Service

* #348713 Update

* Extended a CD server setup instructions (#286)

* React native sample app (#291)

React native sample app
  • Loading branch information
sc-dawidrutkowski authored Dec 3, 2019
1 parent 3872771 commit 23ea6ab
Show file tree
Hide file tree
Showing 264 changed files with 180,209 additions and 123,819 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ lerna-debug.log
.nyc_output
coverage/
/badges
packages/*/*.tgz
packages/*/*.tgz
/samples/react/profiling
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.fontSize": 13
}
Original file line number Diff line number Diff line change
Expand Up @@ -271,4 +271,14 @@ class MyRendering {
@Input() something: Function;
@Output() onSomething = new EventEmitter<string>();
}
```
```
## Lazy loading placeholder
When lazy-loading a sitecore component, the placeholder will appear empty by default. A temporary body during loading of the component can be added to the placeholder by adding a body. When the component finished loading, the temporary body is replaced with the actual content. A simplified example is:
``` html
<sc-placeholder [rendering]="rendering">
<img *scPlaceholderLoading src="loading.gif">
</sc-placeholder>
```
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ Advanced usage is also possible, using templates to customize the markup emitted
<sc-placeholder [renderings]="renderings"></sc-placeholder>
</div>
</ng-template>
<ng-template scPlaceholderLoading>
<img src="loading.gif">
</ng-template>
</div>
```

Expand Down Expand Up @@ -175,4 +178,4 @@ Here is a list of all supported structural directives, and how they are used (wh
|------|-------------|
| default / `scFile` | The component or route field you wish to render. Should be Sitecore type `File`. |

> The `File` field does not support inline editing via the Experience Editor in Sitecore, but can be edited via the default field editor on components.
> The `File` field does not support inline editing via the Experience Editor in Sitecore, but can be edited via the default field editor on components.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ If you are installing the JSS server components to a scaled Sitecore installatio
1. Extract the server components Sitecore package with an unzip tool such as 7-zip.
1. Extract the inner `package.zip` the same way. Ignore any unzip warnings about `sc_*.txt` files.
1. In the resulting items, deploy all of the items in the `files` folder to your CD server's webroot: `App_Config`, `bin`, `sitecore`, and `Views`.
1. add this key in `<handlers>` section in Web.config on a CD server:
```xml
<add verb="*" path="sitecorejss_media.ashx" type="Sitecore.JavaScriptServices.Media.MediaRequestHandler, Sitecore.JavaScriptServices.Media" name="Sitecore.JavaScriptServices.Media.MediaRequestHandler" />
```
1. Congratulations, your CD server is ready to host JSS apps.

## What's next?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ The Layout Service JSON rendering process is highly configurable, and allows you
</serialization>
</config>
```
> In terms of modifying serialization configuration, keep in mind that you can change the whole JSON beside field names. Field names can be changed in Sitecore, if you need to e.g.: have them camel-cased, you need do it in Sitecore. So basically serialization configuration is responsible for changing JSON on which user don't have influence.
### Using a custom Layout Service configuration with JSS

Expand Down
8 changes: 4 additions & 4 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@
"@sitecore-jss/sitecore-jss-react": "^9.0.5",
"antd": "^3.7.2",
"babel-polyfill": "^6.26.0",
"bootstrap": "4.1.3",
"bootstrap": "^4.3.1",
"compression": "^1.7.3",
"express": "^4.16.3",
"express-sslify": "^1.2.0",
"font-awesome": "^4.7.0",
"forcedomain": "^1.0.0",
"forcedomain": "^2.0.0",
"gray-matter": "^4.0.1",
"marked": "^0.4.0",
"marked": "^0.7.0",
"prop-types": "^15.6.0",
"react": "^16.4.0",
"react-dom": "^16.4.0",
Expand Down Expand Up @@ -106,7 +106,7 @@
"uglifyjs-webpack-plugin": "^1.1.6",
"url-loader": "^0.6.2",
"webpack": "^3.10.0",
"webpack-bundle-analyzer": "^2.9.2",
"webpack-bundle-analyzer": "^3.4.1",
"webpack-dev-server": "2.4.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if(Cypress.env("SSR")) {
it('Performs SSR on home page', () => {
cy.request({ url: '/' })
.then(response => {
expect(response.body).to.contain('<h2 class="display-4">Welcome to Sitecore JSS</h2>');
expect(response.body).to.contain('Welcome to Sitecore JSS</title>');
});
});

Expand Down
Loading

0 comments on commit 23ea6ab

Please sign in to comment.