Skip to content

Commit 6002468

Browse files
feat: Add UI
Adds a UI to the Starter App Includes test, doc, and CICD infrastructure to support Closes: #25 Signed-off-by: Andrew Borley [email protected] Signed-off-by: Matthew Chirgwin [email protected] Signed-off-by: Nic Townsend [email protected] Signed-off-by: Jordan Tucker [email protected]
1 parent 8bca8fc commit 6002468

File tree

196 files changed

+33409
-45
lines changed

Some content is hidden

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

196 files changed

+33409
-45
lines changed

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
---
5+
6+
# Bug
7+
8+
## Issue Summary
9+
10+
* Describe what you were doing when you observed the problem?
11+
* Did this used to work? If so what changed?
12+
* Was the error recoverable? Did you perform any maintenance or workaround?
13+
- *screenshot here*
14+
15+
## Environment
16+
17+
* OS: ?
18+
* Browser (version): ?
19+
20+
## How To Reproduce This Issue
21+
22+
1. First, ...
23+
2. Click ...
24+
3. Enter ...
25+
26+
## Expected Behaviour
27+
28+
* Should have ...
29+
30+
## Relevant Logs

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Feature request
3+
about: Request a new feature or enhancement
4+
---
5+
6+
# Feature / Enhancement
7+
8+
## Description
9+
As a user...
10+
11+
•Describe end to end flow / end goal*
12+
13+
- *screenshot here*
14+
15+
## Test Cases
16+
17+
- Given ... then ... should ...
18+
- Given ... then ... should ...
19+
- ...
20+
21+
## Implementation Details
22+
23+
- Written as ... in ...
24+
- Tested using ...
25+
- Affects repository ___.
26+
27+
## Acceptance Criteria
28+
29+
- Code reviewed by ___.
30+
- Automated tests exist.
31+
- Manually tested in ___.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## Status
2+
**READY/IN DEVELOPMENT/HOLD**
3+
4+
## Commit Message
5+
6+
### Commit Message Title
7+
* When opening this PR, the raiser should set the title of this PR to the first line of their desired commit message, e.g:
8+
```
9+
feat|fix|docs|style|refactor|perf|test|chore: changed function X
10+
```
11+
* The reviewer should ensure that the first commit message field is of this form when performing the `squash and merge` from this page.
12+
13+
### Commit Message Description
14+
```
15+
# When opening this PR, the raiser should replace this text with the remaining
16+
# lines of their desired commit message, e.g:
17+
18+
Further details of the code going into the commit
19+
20+
Contributes to: #XYZ
21+
Closes: #XYZ
22+
23+
Signed-off-by: Your Name <[email protected]>
24+
```
25+
* The reviewer should copy the above text into the extended description field when performing the `squash and merge` from this page.
26+
27+
## Checklist
28+
- [ ] Automated tests exist
29+
- [ ] Documentation exists [link]()
30+
- [ ] Local unit tests performed
31+
- [ ] Sufficient logging/trace
32+
- [ ] Desired commit message set as PR title and commit description set above

.github/actions/bundle/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM node:slim
2+
3+
COPY index.js .
4+
COPY package.json .
5+
COPY package-lock.json .
6+
7+
RUN npm install
8+
9+
ENTRYPOINT ["node", "/index.js"];

.github/actions/bundle/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: "Bundle size"
2+
description: "Check the size of the bundle"
3+
outputs:
4+
bundle_size:
5+
description: "Bundle size of webpack build"
6+
runs:
7+
using: "docker"
8+
image: "Dockerfile"

.github/actions/bundle/index.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
const core = require("@actions/core");
2+
const fs = require("fs");
3+
4+
const builtFiles = [{
5+
fileName: 'main.bundle.js',
6+
humanReadableName: 'Kafka Starter App custom UI code bundle size:'
7+
}, {
8+
fileName: 'libs.bundle.js',
9+
humanReadableName: 'Dependancy UI code bundle size:'
10+
}, {
11+
fileName: 'styles.bundle.css',
12+
humanReadableName: 'Kafka Starter App css bundle size:'
13+
}];
14+
15+
async function calculateBundle() {
16+
try {
17+
18+
const builtBundlesFeedback = builtFiles.reduce((previousBundleText, {fileName, humanReadableName}) => {
19+
const fileSize =
20+
Math.round(
21+
(fs.statSync(`./src/main/resources/webroot/${fileName}`)["size"] /
22+
1024.0) *
23+
100
24+
) / 100;
25+
return `${previousBundleText} ${humanReadableName} ${fileSize}KB\n`;
26+
}, '');
27+
28+
29+
core.setOutput("bundle_size", builtBundlesFeedback);
30+
} catch (error) {
31+
core.setFailed(error.message);
32+
}
33+
}
34+
35+
calculateBundle();

0 commit comments

Comments
 (0)