Skip to content

Commit 8a45de4

Browse files
Merge pull request #64 from DiamondLightSource/update-docs
Update docs
2 parents 449f3e2 + 5829ce3 commit 8a45de4

File tree

1 file changed

+85
-1
lines changed

1 file changed

+85
-1
lines changed

README.md

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,86 @@
22
An npm library for Control Systems web applications
33

44
## Installation
5+
6+
:warning: cs-web-lib is **NOT** compatible with projects using create-react-app. Vite should be used instead.
7+
58
Install via npm:
69
`npm install @diamondlightsource/cs-web-lib`
7-
10+
11+
We use React 18. cs-web-lib requires several environment variables to be set in order to connect to PVWS and fetch PV value updates.
12+
13+
- `VITE_PVWS_SOCKET` - point to the server hosting the PVWS application.
14+
- `VITE_PVWS_SSL` - set this to false if running a local PVWS instance e.g. localhost:8080 without SSL, otherwise true
15+
16+
These should be provided in a .env file at the root of your project.
17+
18+
Inside your application, create a screen by passing a .opi, .bob or .json file to the EmbeddedDisplay widget.
19+
20+
## Legacy Installation
21+
22+
PVWS was introduced in version 0.4.0. Versions prior to this used [Coniql](https://github.com/DiamondLightSource/coniql), and the .env variables used were `VITE_CONIQL_SOCKET` and `VITE_CONIQL_SSL`.
23+
24+
React 17 was supported until version < 0.5.0.
25+
26+
## Features
27+
28+
cs-web-lib does not contain the full suite of features and widgets provided by Phoebus. The tables below describes which features are currently included, are planned to be added, and which will not be added.
29+
30+
#### Widgets
31+
32+
| Category | Widget | Included | Reason |
33+
| :---------------- | :---------------: | :------: | :-----------------: |
34+
| Graphics | Arc | &#9989; | |
35+
| | Ellipse | &#9989; | |
36+
| | Label | &#9989; | |
37+
| | Picture | &#9989; | |
38+
| | Polygon | &#9989; | |
39+
| | Polyline | &#9989; | |
40+
| | Rectangle | &#9989; | |
41+
| Monitors | Byte Monitor | &#9989; | |
42+
| | LED | &#9989; | |
43+
| | Multi State LED | &#10060; | Add later |
44+
| | Meter | &#10060; | Add later (date unknown, low priority) |
45+
| | Progress Bar | &#9989; | |
46+
| | Symbol | &#9989; | |
47+
| | Table | &#9989; | |
48+
| | Tank | &#10060; | Add later (date unknown, low priority) |
49+
| | Text Symbol | &#10060; | Add later |
50+
| | Text Update | &#9989; | |
51+
| | Thermometer | &#10060; | Add later (date unknown, low priority) |
52+
| Controls | Action Button | &#9989; | |
53+
| | Boolean Button | &#9989; | |
54+
| | Check Box | &#9989; | |
55+
| | Choice Button | &#9989; | |
56+
| | Combo Box | &#9989; | |
57+
| | File Selector | &#10060; | Add later |
58+
| | Radio Button | &#9989; | |
59+
| | Scaled Slider | &#9989; | |
60+
| | Scrollbar | &#10060; | Add later |
61+
| | Slide Button | &#10060; | Add later (date unknown, low priority) |
62+
| | Spinner | &#10060; | Add later (date unknown, low priority) |
63+
| | Text Entry | &#9989; | |
64+
| | Thumbwheel | &#10060; | Add later (date unknown, low priority) |
65+
| Plots | Data Browser | &#10060; | Add later (date unknown, low priority) |
66+
| | Image | &#10060; | Unknown |
67+
| | Stripchart | &#10060; | Unknown |
68+
| | XY Plot | &#9989; | |
69+
| Structure | Array | &#10060; | Add later |
70+
| | Embedded Display | &#9989; | |
71+
| | Group | &#9989; | |
72+
| | Navigation Tabs | &#9989; | |
73+
| | Tabs | &#9989; | |
74+
| | Template/Instance | &#10060; | Unknown |
75+
76+
#### Features
77+
78+
| Widget | Included | Reason |
79+
| :---------: | :------: | :---------------------: |
80+
| Actions | &#9989; | Some actions may not be supported. Please open an issue for any issues noticed. |
81+
| Formulas | &#10060; | `sim://` PVs are supported, but not `eq://`. This will be added in future. |
82+
| Rules | &#9989; | Partial support. x, y and Font rules are currently not supported. This will be added in future. Please open an issue for any issues noticed.|
83+
| Scripts | &#10060; | The use of scripting is recommended against in general by CS Studio Developers. Formulae should be able to handle most use cases. |
84+
885
## Development
986
To develop on the library code first clone this repo, install the npm package dependencies and then make changes:
1087

@@ -17,6 +94,13 @@ Before pushing any changes check that the update code conforms to the formatter
1794
npm run all-checks
1895
npm run tests
1996

97+
If making changes to the build process, check that the package is built correctly with:
98+
99+
npm run rollup
100+
npm pack
101+
102+
You can then install the generated tar.gz file into another project and check that all functionality expected is there.
103+
20104
### Publishing to NPM (PREFERRED METHOD)
21105
A GitHub workflow has been setup to automatically publish a new package version to the NPM registry on the push of a new tag. This should be used as the preferred method of release a new package.
22106
1. Update/increase the package version in package.json (see https://docs.npmjs.com/cli/v8/commands/npm-version for further details on this npm command):

0 commit comments

Comments
 (0)