Skip to content

Commit c2e721f

Browse files
trevorlangabbottry
andauthored
EDSC-4327: Updates node, sass, bootstrap, and improves demo page. (#127)
* EDSC-4327: Updates node, sass, bootstrap, and improves demo page. * EDSC-4327: Adding newlines * EDSC-4327: Removing commented code * EDSC-4327: Fixing issue with importing jsx files in cypress * EDSC-4327: Add pull request template * EDSC-4327: Running npm install * EDSC-4327: Tweaking fallbacks * EDSC-4327: Removing buffer * EDSC-4327: Fixing issue with @use and separating css to its own file * EDSC-4327: Fixing cypress env * EDSC-4327: Update README.md Co-authored-by: Ryan Abbott <ryan@element84.com> --------- Co-authored-by: Ryan Abbott <ryan@element84.com>
1 parent 1091550 commit c2e721f

Some content is hidden

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

44 files changed

+6879
-16482
lines changed

.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
}
1919
],
2020

21+
// Use AirBnb settings as a base
2122
"extends": [
2223
"@edsc"
2324
],
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Before contributing to this project, please review [Contribution.md](https://github.com/nasa/edsc-echoforms/blob/master/CONTRIBUTING.md).
11+
12+
### Description
13+
A clear and concise description of what the bug is.
14+
15+
**Reproduction Steps**
16+
Steps to reproduce the behavior:
17+
1. Go to '...'
18+
2. Click on '....'
19+
3. Scroll down to '....'
20+
4. See error
21+
22+
**Expected behavior**
23+
A clear and concise description of what you expected to happen.
24+
25+
**Screenshots**
26+
If applicable, add screenshots to help explain your problem.
27+
28+
**System Information (please complete the following information):**
29+
- OS: [e.g. iOS]
30+
- Browser [e.g. chrome, safari]
31+
- Version [e.g. 22]
32+
33+
### Additional context
34+
Add any other context about the problem here.
35+
36+
### Acceptance Criteria
37+
Steps to produce expected behavior.

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Custom issue template
3+
about: Template for general tasks and improvements
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Please review [Contribution.md](https://github.com/nasa/edsc-echoforms/blob/master/CONTRIBUTING.md) before contributing to this project.
11+
12+
### Description
13+
Describe the purpose of the issue
14+
15+
### Files
16+
Attach any relevant images or files
17+
18+
### Acceptance Criteria
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Overview
2+
3+
### What is the feature?
4+
5+
Please summarize the feature or fix.
6+
7+
### What is the Solution?
8+
9+
Summarize what you changed.
10+
11+
### What areas of the application does this impact?
12+
13+
List impacted areas.
14+
15+
# Testing
16+
17+
### Reproduction steps
18+
19+
1. Step 1
20+
2. Step 2...
21+
22+
### Attachments
23+
24+
Please include relevant screenshots or files that would be helpful in reviewing and verifying this change.
25+
26+
# Checklist
27+
28+
- [ ] I have added automated tests that prove my fix is effective or that my feature works
29+
- [ ] New and existing unit tests pass locally with my changes
30+
- [ ] I have performed a self-review of my own code
31+
- [ ] I have commented my code, particularly in hard-to-understand areas
32+
- [ ] I have made corresponding changes to the documentation
33+
- [ ] My changes generate no new warnings
34+
- [ ] I have bumped the version field in package.json and ran npm install

.github/workflows/ci.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
node-version: ['lts/hydrogen']
13+
node-version: ['lts/jod']
1414
steps:
1515
- name: Checkout code
1616
uses: actions/checkout@v4
@@ -40,7 +40,7 @@ jobs:
4040
runs-on: ubuntu-latest
4141
strategy:
4242
matrix:
43-
node-version: ['lts/hydrogen']
43+
node-version: ['lts/iron', 'lts/jod']
4444
steps:
4545
- name: Checkout code
4646
uses: actions/checkout@v4
@@ -69,9 +69,15 @@ jobs:
6969
uses: codecov/codecov-action@v4
7070
env:
7171
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
72+
tests-passed:
73+
needs: [tests]
74+
runs-on: ubuntu-latest
75+
steps:
76+
- name: All Tests Have Passed
77+
run: 'echo true'
7278
deploy:
7379
if: success() && github.ref == 'refs/heads/main' # only run on main success
74-
needs: [tests] # only run after jest and cypress jobs complete
80+
needs: [tests-passed] # only run after all test jobs complete
7581
runs-on: ubuntu-latest
7682
steps:
7783
- name: Checkout code
@@ -91,7 +97,7 @@ jobs:
9197
git push ecc $GITHUB_SHA:refs/heads/main
9298
deploy-gh-pages:
9399
if: success() && github.ref == 'refs/heads/main' # only run on main success
94-
needs: [tests] # only run after jest and cypress jobs complete
100+
needs: [tests-passed] # only run after all test jobs complete
95101
runs-on: ubuntu-latest
96102
steps:
97103
- name: Checkout code

.npmignore

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1+
.codecov.yml
12
.eslintignore
23
.eslintrc
4+
.github
5+
.github/workflows/ci.yml
36
.nvmrc
47
.nyc_output
8+
.snyk
59
.travis
610
.travis.yml
711
babel.config.js
812
bin
913
coverage
1014
cypress
15+
cypress.config.js
1116
cypress.json
17+
cypress.webpack.config.js
18+
edsc-*
1219
example
1320
source.tgz
1421
src
1522
tmp
1623
webpack.config.js
17-
.codecov.yml
18-
.github/workflows/ci.yml
19-
.snyk

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lts/hydrogen
1+
lts/jod

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,23 @@ For the jQuery version of this plugin see [this branch](https://github.com/nasa/
1818

1919
## Installation
2020

21-
npm install @edsc/echoforms
21+
```console
22+
npm install @edsc/echoforms
23+
```
2224

2325
## Usage
2426

25-
After installing you can use the component in your code.
27+
### Import the required css
28+
29+
The `styles.css` file must be loaded separately from the `node_modules/@edsc-echoforms/dist` directory.
30+
31+
```javascript
32+
import '@edsc/echoforms/dist/styles.css'
33+
```
34+
35+
### Use the EDSCEchoform component
36+
37+
The `EDSCEchoforms` React component is imported from the `@edsc/echoforms` module. When using the component, the `form`, `onFormModelUpdated`, and `onFormIsValidUpdated` props are required. See the Props section below for more information.
2638

2739
```javascript
2840
import EDSCEchoform from '@edsc/echoforms'
@@ -53,15 +65,21 @@ onFormIsValidUpdated | Function | true | | Callback function that returns a Bool
5365

5466
To compile:
5567

56-
npm install
68+
```console
69+
npm install
70+
```
5771

5872
To start the example project for local testing:
5973

60-
npm start
74+
```console
75+
npm start
76+
```
6177

6278
To run the tests:
6379

64-
npm test
80+
```console
81+
npm test
82+
```
6583

6684
## Contributing
6785

babel.config.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,22 @@ module.exports = {
33
[
44
'@babel/preset-env', {
55
targets: {
6-
node: '8.10',
7-
esmodules: true,
8-
ie: '10'
6+
node: '22',
7+
esmodules: true
98
}
109
}
1110
],
1211
'@babel/preset-react'
1312
],
13+
env: {
14+
test: {
15+
plugins: ['istanbul']
16+
}
17+
},
1418
sourceType: 'unambiguous',
1519
plugins: [
1620
'@babel/plugin-proposal-object-rest-spread',
1721
'@babel/plugin-proposal-class-properties',
1822
'@babel/plugin-transform-runtime'
19-
],
20-
env: {
21-
test: {
22-
plugins: ['istanbul']
23-
}
24-
}
23+
]
2524
}

0 commit comments

Comments
 (0)