Skip to content

Commit 8c112b9

Browse files
Merge pull request #330 from rdkcentral/dev
v5.0.0
2 parents 82b8948 + 0ed3348 commit 8c112b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+6374
-3979
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## v5.0.0
4+
5+
*22 aug 2022*
6+
7+
- Moved Metrological and Platform specific plugins to [metrological-sdk](https://github.com/Metrological/metrological-sdk) (Metadata, Metrics, Pin, Profile, Purchase, TV, VideoPlayer)
8+
- Added base 64 image support for Image plugin
9+
- Fixed bug in Image plugin as Img cover stretches image
10+
- Fixed named route property not being accessed properly
11+
- Added/Updated Router available methods
12+
- Added Accessibility plugin with support for ColorShifting (color blindness filter)
13+
14+
315
## v4.8.3
416

517
*19 apr 2022*

docs/_sidebar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
- [Getting started](/getting-started.md)
22

33
- Plugins
4+
- [Accessibility](/plugins/accessibility.md)
45
- [Utils](/plugins/utils.md)
56
- [Storage](/plugins/storage.md)
67
- [Settings](/plugins/settings.md)
78
- [Log](/plugins/log.md)
89
- [Metadata](/plugins/metadata.md)
910
- [Metrics](/plugins/metrics.md)
10-
- [Metadata](/plugins/metadata.md)
1111
- [Profile](/plugins/profile.md)
1212
- [Purchase](/plugins/purchase.md)
1313
- [Language](/plugins/language.md)

docs/changelog.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## v5.0.0
4+
5+
*22 aug 2022*
6+
7+
- Moved Metrological and Platform specific plugins to [metrological-sdk](https://github.com/Metrological/metrological-sdk) (Metadata, Metrics, Pin, Profile, Purchase, TV, VideoPlayer)
8+
- Added base 64 image support for Image plugin
9+
- Fixed bug in Image plugin as Img cover stretches image
10+
- Fixed named route property not being accessed properly
11+
- Added/Updated Router available methods
12+
- Added Accessibility plugin with support for ColorShifting (color blindness filter)
13+
14+
315
## v4.8.3
416

517
*19 apr 2022*

docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Next you can run the `lng build` and `lng serve` commands to build the blueprint
3030

3131
During development you might prefer using the `lng dev` command, which builds and launches your App, and then keeps watching for changes to automatically rebuild.
3232

33-
Whenever you want to review this documentation, you can run `lng docs` in the root of a project. This will open up the documention for the Lightning-SDK version used in that project.
33+
Whenever you want to review this documentation, you can run `lng docs` in the root of a project. This will open up the documentation for the Lightning-SDK version used in that project.
3434

3535
## Fonts
3636

docs/index.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,33 @@ The Reference Documentation for Lightning SDK contains detailed descriptions of
66

77
The available Lightning SDK plugins are, in alphabetical order:
88

9+
<!---TOC_start--->
10+
* [Colors](plugins/colors.md)
911
* [FPS Counter](plugins/fpscounter.md)
1012
* [Image](plugins/image.md)
1113
* [Language](plugins/language.md)
1214
* [Lightning](plugins/lightning.md)
1315
* [Log](plugins/log.md)
16+
* [Metadata](plugins/metadata.md)
1417
* [Metrics](plugins/metrics.md)
1518
* [Pin](plugins/pin.md)
1619
* [Profile](plugins/profile.md)
1720
* [Purchase](plugins/purchase.md)
1821
* [Registry](plugins/registry.md)
1922
* [Router](plugins/router/index.md)
23+
* [Configuration](plugins/router/configuration.md)
24+
* [Navigation](plugins/router/navigation.md)
25+
* [Data Providing](plugins/router/dataproviding.md)
26+
* [Router Events](plugins/router/events.md)
27+
* [Page Transitions](plugins/router/pagetransitions.md)
28+
* [Widgets](plugins/router/widgets.md)
29+
* [Settings](plugins/router/settings.md)
30+
* [Deeplinking](plugins/router/deeplinking.md)
31+
* [History](plugins/router/history.md)
2032
* [Settings](plugins/settings.md)
2133
* [Storage](plugins/storage.md)
2234
* [TV](plugins/tv.md)
2335
* [Utils](plugins/utils.md)
2436
* [VersionLabel](plugins/versionlabel.md)
2537
* [VideoPlayer](plugins/videoplayer.md)
38+
<!---TOC_end--->

docs/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lightningjs/sdk",
3-
"version": "4.8.3",
3+
"version": "5.0.0",
44
"license": "Apache-2.0",
55
"scripts": {
66
"postinstall": "node ./scripts/postinstall.js",
@@ -23,6 +23,7 @@
2323
"dependencies": {
2424
"@babel/polyfill": "^7.11.5",
2525
"@lightningjs/core": "*",
26+
"@metrological/sdk": "github:metrological/metrological-sdk",
2627
"@michieljs/execute-as-promise": "^1.0.0",
2728
"deepmerge": "^4.2.2",
2829
"localCookie": "github:WebPlatformForEmbedded/localCookie",

docs/plugins/accessibility.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Accessibility
2+
3+
The Accessibility plugin provides functionality to easily make your App more accessible.
4+
5+
Currently it provides functionality to apply a **Colorshifting filter** to your App, helping people with different types of color blindness to properly use your App.
6+
7+
## Usage
8+
9+
The Accessibility plugin is automatically included in the root of your App. In most cases there is no need to specifically import the Accessibility plugin into your App code.
10+
11+
## Colorshift filter
12+
13+
When you want to apply a colorshift filter over your _entire App_, you can do so by calling the
14+
`colorshift` method attached to the root `application`.
15+
16+
A reference to the root application is made available in every Lightning component (via `this.application`), allowing you to invoke this function from anywhere in your App.
17+
18+
### colorshift
19+
20+
Applies a color filter and optional _brightness_, _contrast_ and _gamma_ configuration.
21+
22+
```js
23+
const type = 'deuteranopia'
24+
const config = {
25+
brightness: 18,
26+
contrast: 69,
27+
gamma: 42
28+
}
29+
this.application.colorshift(type, config)
30+
```
31+
32+
#### type
33+
34+
Valid values for Colorshift types are:
35+
36+
- `deuteranopia` (red-green, green weak)
37+
- `protanopia` (red-green, red weak)
38+
- `tritanopia` (blue-yellow)
39+
- `monochromacy` (grayscale)
40+
- `normal` (normal vision)
41+
42+
When passing `false` the entire colorshift filter is disabled.
43+
44+
#### config
45+
46+
`config` is an object where the _brightness_, _contrast_ and _gamma_ of each color filter can be tweaked. The values are expected to be between `0` and `100`, and default to `50`.
47+
48+
It's not required to pass in the entire object. Keys that are omitted are automatically assumed to have the default value (of `50`).
49+
50+
The `normal` type color filter should be used for cases where you only want to adjust the brightness, contrast or gamma values, without applying any specific color blindness filter.
51+
52+
53+
### Advanced use
54+
55+
The typical use of the colorshift filter is to apply it over the entire app (using `this.application.colorshift()`). But there may also be cases where you want to apply it only to a single element (for demo purposes or during in-app configuration of the color settings, for example).
56+
57+
In this case you should import the `Accessibility` plugin into your component.
58+
59+
```js
60+
import { Accessibility } from '@lightningjs/sdk'
61+
```
62+
63+
Next you can use the `colorshift` method similarly to the standard use. With the exception that the first argument refers to the Lightning element you want to apply the colorshift filter to.
64+
65+
```js
66+
const type = 'protanopia'
67+
const config = {
68+
brightness: 54,
69+
}
70+
const element = this.tag('Logo')
71+
Accessibility.colorshift(element, type, config)
72+
```
73+
74+
Important to remember is that the element you apply the colorshift filter to shouldn't already have a _shader_ applied to it, nor can it have `rtt` set to `true`. In these cases you could create a wrapper and apply the colorshift filter to the wrapper instead.
75+
76+
<!--
77+
Todo
78+
79+
### Colorshift configuration UX
80+
81+
To make it as easy as possible to make your App colorblindness friendly, we have made available a standard importable [UI component](...) to set and configure the colorshift settings for your App.
82+
83+
Feel free to use this UI component directly inside your App. Or use it as inspiration to build your own configuration screen.
84+
85+
-->

docs/plugins/colors/index.md

Lines changed: 0 additions & 131 deletions
This file was deleted.

0 commit comments

Comments
 (0)