Skip to content

Commit a09c4dd

Browse files
authored
Merge pull request #44 from oslabs-beta/dev
Github Actions CI/CD added to repo for PRs onto dev and master
2 parents c57c1f9 + e9e658b commit a09c4dd

File tree

7 files changed

+275
-22
lines changed

7 files changed

+275
-22
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
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/workflows/dev.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: dev branch sapling extension CI
2+
3+
# Run this workflow on PR into dev branch
4+
on:
5+
pull_request:
6+
branches: [ dev ]
7+
8+
jobs:
9+
build:
10+
# Run tests on ubuntu linux
11+
runs-on: ubuntu-latest
12+
13+
# Run Mocha test suite for sapling extension
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Sapling Mocha Tests
17+
run: |
18+
cd sapling
19+
npm install
20+
npm run test-mocha

.github/workflows/master.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Master branch sapling extension CI/CD
2+
3+
# Run this workflow on PR into dev branch
4+
on:
5+
pull_request:
6+
branches: [ master ]
7+
8+
jobs:
9+
build:
10+
# Run tests on ubuntu linux
11+
runs-on: ubuntu-latest
12+
13+
# Run full test suite for sapling extension
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Sapling Mocha Tests
17+
run: |
18+
cd sapling
19+
npm install
20+
xvfb-run -a npm test

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

sapling/README.md

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,29 @@ With Sapling, you don't have to guess at the parent component of your current fi
7373

7474

7575
### Built With
76-
77-
* <img style="height: 1em;" src="media/react-brands.png"> [React](https://reactjs.org/)
78-
* <img style="height: 1em;" src="media/vscode.png"> [VSCode Extension API](https://code.visualstudio.com/api)
79-
* <img style="height: 1em;" src="media/mochajs-icon.png"> [Mocha](https://mochajs.org/)
80-
* <img style="height: 1em;" src="media/chai_icon.png"> [Chai](https://www.chaijs.com/)
81-
* <img style="height: 1em;" src="media/babel-logo-minimal.png"> [Babel Parser](https://babeljs.io/docs/en/babel-parser)
82-
* <img style="height: 1em;" src="media/webpack.png"> [Webpack](https://webpack.js.org/)
83-
* <img style="height: 1em;" src="media/github-actions.png"> [GitHub Actions](https://github.com/features/actions)
76+
<ul>
77+
<li>
78+
<img height="14" src="media/react-brands.png"><a href="https://reactjs.org/"> React</a>
79+
</li>
80+
<li>
81+
<img height="14" src="media/vscode.png"><a href="https://code.visualstudio.com/api"> VSCode Extension API</a>
82+
</li>
83+
<li>
84+
<img height="14" src="media/mochajs-icon.png"><a href="https://mochajs.org/"> Mocha</a>
85+
</li>
86+
<li>
87+
<img height="14" src="media/chai_icon.png"><a href="https://www.chaijs.com/"> Chai</a>
88+
</li>
89+
<li>
90+
<img height="14" src="media/babel-logo-minimal.png"><a href="https://babeljs.io/docs/en/babel-parser"> Babel Parser</a>
91+
</li>
92+
<li>
93+
<img height="14" src="media/webpack.png"><a href="https://webpack.js.org/"> Webpack</a>
94+
</li>
95+
<li>
96+
<img height="14" src="media/github-actions.png"><a href="https://github.com/features/actions"> GitHub Actions</a>
97+
</li>
98+
</ul>
8499

85100
## Installation
86101

@@ -105,11 +120,23 @@ Installing from VS Code Extension Marketplace (or downloading package from GitHu
105120
After installing, click the Sapling tree icon in your extension sidebar (image of icon here). From there, you can either click "Choose a file" to select your root component, or build your tree directly from a file open in your editor with the "Build Tree" button on the right hand side of your status bar. Click the + and - buttons to expand and collapse subsets of your tree, and hover over the information icon (image of icon here) to get a list of props available to that component. You can also press the view file icon (image of icon here) to open the file where the component is defined in your editor window. Below is a quick-reference legend for icon and text format meanings. If you prefer not to view React Router or other third-party components imported to your app, you can disable either of these in the VS Code Extension Settings.
106121

107122
Icon Legend in Sapling Tree View:
108-
* <img style="height: 1em;" src="media/circle-info-solid.png"> available props (hover)
109-
* <img style="height: 1em;" src="media/circle-arrow-right-solid.png" > open file (click)
110-
* <img style="height: 1em;" src="media/store-solid.png" > Redux store connection
111-
* <span style='color:red;'>Navbar</span> error in file (matches the error color of your theme)
112-
* <b>Navbar</b>: currently open file
123+
<ul>
124+
<li>
125+
<img height="14" src="media/circle-info-solid.png"> available props (hover)
126+
</li>
127+
<li>
128+
<img height="14" src="media/circle-arrow-right-solid.png" > open file (click)
129+
</li>
130+
<li>
131+
<img height="14" src="media/store-solid.png" > Redux store connection
132+
</li>
133+
<li>
134+
<span color="red">Navbar</span> error in file (matches the error color of your theme)
135+
</li>
136+
<li>
137+
<b>Navbar</b>: currently open file
138+
</li>
139+
</ul>
113140

114141
Sapling can currently display React apps made with JSX/TSX and ES6 import syntax.
115142

@@ -123,7 +150,7 @@ Sapling will detect React components invoked using JSX tag syntax and React-Rout
123150
<Navbar></Navbar>
124151

125152
// Route and Navbar will be detected as child components of the current file
126-
<Route component={Navbar} />
153+
<Route component={Navbar} />
127154

128155
// Route and App will be detected as child components of the current file
129156
<Route children={App} />
@@ -133,7 +160,7 @@ Sapling will detect the names of inline props for JSX components it identifies:
133160

134161
```JSX
135162
// props 'userId' and 'userName' will be listed for Navbar in Sapling
136-
<Navbar userId={...} userName={...} />
163+
<Navbar userId={...} userName={...} />
137164
```
138165

139166
Sapling can identify components connected to the Redux store, when 'connect' is imported from 'react-redux', and the component is the export default of the file:
@@ -142,14 +169,14 @@ Sapling can identify components connected to the Redux store, when 'connect' is
142169
// App.jsx
143170
import React from 'react';
144171
import { connect } from 'react-redux';
145-
172+
146173
const mapStateToProps = ...
147174
const mapDispatchToProps = ...
148-
175+
149176
const App = (props) => {
150177
return <h1>This is the App</h1>
151178
}
152-
179+
153180
// Sapling will detect App as connected to the Redux store
154181
export default connect(mapStateToProps, mapDispatchToProps)(App);
155182
```
@@ -200,14 +227,14 @@ Distributed under the MIT License. See [`LICENSE`](https://github.com/oslabs-bet
200227

201228
## Contact
202229

203-
<img style="height: 1em; width: 1em;" src="media/twitter-logo.png"> Twitter: [@TeamSapling](https://twitter.com/teamsapling) | Email: [email protected]
230+
<img height="14" src="media/twitter-logo.png"> Twitter: [@TeamSapling](https://twitter.com/teamsapling) | Email: [email protected]
204231

205-
<img style="height: 1em; width: 1em;" src="media/github-icon.png"> GitHub: [https://github.com/oslabs-beta/sapling/](https://github.com/oslabs-beta/sapling/)
232+
<img height="14" src="media/github-icon.png"> GitHub: [https://github.com/oslabs-beta/sapling/](https://github.com/oslabs-beta/sapling/)
206233

207234
## Acknowledgements
208235
* Parsing Strategy inspired by [React Component Hierarchy](https://www.npmjs.com/package/react-component-hierarchy)
209236
* Interactive tree view styling adapted from [Pure CSS Tree Menu](https://codepen.io/bisserof/pen/fdtBm)
210237
* Icons from [Font Awesome](https://fontawesome.com)
211238
* Tooltips with [Tippy](https://www.npmjs.com/package/@tippy.js/react)
212-
* [Best README Template](https://github.com/othneildrew/Best-README-Template)
239+
* [Best README Template](https://github.com/othneildrew/Best-README-Template)
213240
* Sapling Logo from [Freepik](https://www.freepik.com/vectors/tree)

sapling/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Sapling",
44
"description": "React Component Hierarchy Visualizer",
55
"repository": "https://github.com/oslabs-beta/sapling",
6-
"icon": "./media/sapling-logo-128px.png",
6+
"icon": "media/sapling-logo-128px.png",
77
"publisher": "team-sapling",
88
"version": "1.0.0",
99
"engines": {

0 commit comments

Comments
 (0)