Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Bootstrap npm starter #45

Merged
merged 44 commits into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
17b6ec9
start with applying the bootstrap npm starter (WIP)
LucPrestin Aug 19, 2021
c75f8fb
Clean package.json, no purgeCSS
chrisma Aug 20, 2021
676a8a8
use node modules instead of manually included scripts
LucPrestin Aug 20, 2021
9b1fb56
Merge remote-tracking branch 'origin/42-major-refactoring' into 42-ma…
LucPrestin Aug 20, 2021
7e6d7e5
adapt view links to new paths
LucPrestin Aug 20, 2021
f2c5584
Use compiled CSS files
chrisma Aug 20, 2021
6e7b57b
Merge branch '42-major-refactoring' of https://github.com/hpi-epic/re…
chrisma Aug 20, 2021
4f35b7d
Add forgotten merge conflict
chrisma Aug 20, 2021
f6254f8
remove starter CSS (now main.css)
chrisma Aug 20, 2021
edbfb61
Fix merge
chrisma Aug 20, 2021
e0ea0b4
gitignore CSS dist files
chrisma Aug 20, 2021
512f064
Add bootstraptest page
chrisma Aug 20, 2021
a1c66a7
return to using a cdn instead of npm
LucPrestin Aug 20, 2021
ea3e4e8
start adapting main page to the bootstrap example dashboard
LucPrestin Aug 20, 2021
cb6abf1
import whole bootstrap instead of single packages and use fontawesome…
LucPrestin Aug 26, 2021
aedf2e6
remove files that should be ignored due to the .gitignore
LucPrestin Aug 26, 2021
fccb0cc
add prettier and eslint as npm scripts and run them
LucPrestin Aug 26, 2021
c52d0f3
move header in own file
LucPrestin Aug 26, 2021
04666e9
let header be appended via script instead of needing to add it via ht…
LucPrestin Aug 27, 2021
d87ea89
make sidebar navigation look like tab-pills
LucPrestin Aug 27, 2021
c302529
add padding to header to not overlap with the main content; add activ…
LucPrestin Sep 1, 2021
54d95d4
adapt settings page to new visuals
LucPrestin Sep 1, 2021
5cdcdf9
adapt team pages to new visuals
LucPrestin Sep 1, 2021
e3d8fea
adapt sprint page to new visuals
LucPrestin Sep 1, 2021
d680b77
make sidebar fixed to left
LucPrestin Sep 1, 2021
9914dbe
load header via page script to avoid concurrency-issue; fix config no…
LucPrestin Sep 2, 2021
9299b6c
fix url parameter cut and thus not processable
LucPrestin Sep 2, 2021
b2c70ff
update readme
LucPrestin Sep 2, 2021
c02455c
Merge branch 'main' into 42-major-refactoring
LucPrestin Sep 2, 2021
08ccc5a
Merge branch 'main' into 42-major-refactoring
LucPrestin Sep 2, 2021
cc5cd69
apply prettier
LucPrestin Sep 2, 2021
c150b55
apply some pr-feedback
LucPrestin Sep 21, 2021
c050af8
fix header not getting attached when the view-script throws an error
LucPrestin Sep 21, 2021
7495288
update some packages, remove unneeded icon-list scss file
LucPrestin Nov 1, 2021
2ceb796
fix sidebar placement and run prettier
LucPrestin Nov 1, 2021
ed3a35a
Merge remote-tracking branch 'origin/main' into 42-major-refactoring
LucPrestin Nov 9, 2021
f01885e
update dependencies and run prettier
LucPrestin Nov 9, 2021
adcf60a
fix minor issues and adapt index.html for deployment
LucPrestin Nov 11, 2021
e5b4906
Update NPM packages
chrisma Jan 7, 2022
6710a82
Merge branch '42-major-refactoring' of https://github.com/hpi-epic/re…
chrisma Jan 7, 2022
8e73e58
Update NPM packages with breaking changes
chrisma Jan 7, 2022
fe9c0fc
Merge branch 'main' into 42-major-refactoring
chrisma Jan 7, 2022
613fdbb
Update GH Actions workfow
chrisma Jan 7, 2022
b0398cd
Some more NPM package updates
chrisma Jan 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# https://github.com/browserslist/browserslist#readme

>= 1%
last 1 major version
not dead
Chrome >= 45
Firefox >= 38
Edge >= 12
Explorer >= 10
iOS >= 9
Safari >= 9
Android >= 4.4
Opera >= 30
66 changes: 37 additions & 29 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"airbnb-base",
"prettier"
],
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["only-warn"],
"ignorePatterns": ["/node_modules", "/external"],
"rules": {
"no-console": ["error", { "allow": ["warn", "error"] }],
"camelcase": "off",
"import/extensions": "off",
"object-shorthand": "off",
"no-underscore-dangle": [2, {
"allowAfterThis": true,
"allowAfterSuper": true
}],
"no-plusplus": [2, {
"allowForLoopAfterthoughts": true
}]
}
}
{
"env": {
"browser": true,
"es2021": true
},
"extends": ["airbnb-base", "prettier"],
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["only-warn"],
"ignorePatterns": ["/node_modules", "/assets/css/dist"],
"rules": {
"no-console": [
"error",
{
"allow": ["warn", "error"]
}
],
"camelcase": "off",
"import/extensions": "off",
"object-shorthand": "off",
"no-underscore-dangle": [
2,
{
"allowAfterThis": true,
"allowAfterSuper": true
}
],
"no-plusplus": [
2,
{
"allowForLoopAfterthoughts": true
}
]
}
}
72 changes: 39 additions & 33 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG] Bug-Title"
labels: Bug
assignees: ''

---

### Describe the bug
A clear and concise description of what the bug is.

### Screenshots
If applicable, add screenshots to help explain your problem.

### To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

### Expected behavior
A clear and concise description of what you expected to happen.

### Desktop (please complete the following information):
- **OS:** [e.g. iOS]
- **Browser:** [e.g. chrome, safari]
- **JS IDE:** [e.g. VS Code, Atom]
- (**Version:** [e.g. 22])

### Additional context
Add any other context about the problem here.
---
name: Bug report
about: Create a report to help us improve
title: '[BUG] Bug-Title'
labels: Bug
assignees: ''
---

### Describe the bug

A clear and concise description of what the bug is.

### Screenshots

If applicable, add screenshots to help explain your problem.

### To Reproduce

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

### Expected behavior

A clear and concise description of what you expected to happen.

### Desktop (please complete the following information):

- **OS:** [e.g. iOS]
- **Browser:** [e.g. chrome, safari]
- **JS IDE:** [e.g. VS Code, Atom]
- (**Version:** [e.g. 22])

### Additional context

Add any other context about the problem here.
45 changes: 22 additions & 23 deletions .github/ISSUE_TEMPLATE/user-story.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
---
name: User Story
about: A normal user story as feature request.
title: ''
labels: ''
assignees: ''

---

As a ‹role›, I'd like to ‹feature short description› [ , in order to ‹value it adds›. ]

---

### :thought_balloon:   Hints & Thoughts

### :question:   Additional Questions to Answer / Consider

---

## :white_check_mark:   Conditions of satisfaction

- [ ] Should ‹testable condition that should be satisfied›
- [ ] Should ‹testable condition that should be satisfied›
---
name: User Story
about: A normal user story as feature request.
title: ''
labels: ''
assignees: ''
---

As a ‹role›, I'd like to ‹feature short description› [ , in order to ‹value it adds›. ]

---

### :thought_balloon:   Hints & Thoughts

### :question:   Additional Questions to Answer / Consider

---

## :white_check_mark:   Conditions of satisfaction

- [ ] Should ‹testable condition that should be satisfied›
- [ ] Should ‹testable condition that should be satisfied›
45 changes: 24 additions & 21 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
!Please link the completed Issue to this Pull Request!

## Changes
**What does this PR change? What was the problem? What is the solution?**

*describe problem here*
- *enter change here*

## Screenshots
*If the frontend has been changed, please add a screenshot of before and after the changes have been made*


## Checklist before merge

**Developer's responsibilities**
* [ ] **Assign** one or two developers
* [ ] **Change code** if reviewer(s) has/have requested it
* [ ] **Pull request build** has passed
* [ ] **tested locally** (in at least chrome & firefox if frontend)
* [ ] updated the **documentation**
* [ ] added **tests** where necessary
!Please link the completed Issue to this Pull Request!

## Changes

**What does this PR change? What was the problem? What is the solution?**

_describe problem here_

- _enter change here_

## Screenshots

_If the frontend has been changed, please add a screenshot of before and after the changes have been made_

## Checklist before merge

**Developer's responsibilities**

- [ ] **Assign** one or two developers
- [ ] **Change code** if reviewer(s) has/have requested it
- [ ] **Pull request build** has passed
- [ ] **tested locally** (in at least chrome & firefox if frontend)
- [ ] updated the **documentation**
- [ ] added **tests** where necessary
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.idea/
node_modules
assets/css/dist/*
!assets/css/dist/.gitkeep
22 changes: 11 additions & 11 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"tabWidth": 4,
"bracketSpacing": true,
"endOfLine": "crlf",
"jsxSingleQuote": true,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"useTabs": false
}
{
"tabWidth": 4,
"bracketSpacing": true,
"endOfLine": "crlf",
"jsxSingleQuote": true,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"useTabs": false
}
4 changes: 4 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/*.min.css
**/dist/
node_modules
.idea/
5 changes: 5 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"stylelint-config-twbs-bootstrap/scss"
]
}
64 changes: 37 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
# RepositoryGuide

An application that helps with analyzing your team's GitHub repository

## Installation

1. Clone the repository: ```[email protected]:hpi-epic/repositoryguide.git``` and go into the repository folder
2. Make sure you've installed node. If not download and install it from [here](https://nodejs.org/en/download/)
3. Run `npm install` in the root of the repository
4. generate a personal access token for GitHub using [these instructions](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)
5. Host the project on a local server, opening `index.html` directly won't work. The WebStorm IDE offers a local development server, or run one using `python3 -m http.server`.
6. Download the config to have an empty version of a `config.json file`. Replace ```"github_access_token": ""``` with ```"github_access_token": "<your token>"```
7. Load the edited config into the application.
8. The preparations are now done. Enjoy your metrics. :-)

## Codestyle
To follow the codestyle used in this repository you need Prettier and Eslint. After having setup the project you need to setup these tools. For Webstorm follow the following tutorials:
- ESLint
- Follow the following steps from [this tutorial](https://www.jetbrains.com/help/webstorm/eslint.html)
- [Before you start](https://www.jetbrains.com/help/webstorm/eslint.html#ws_js_linters_eslint_before_you_start) 1&2
- [Configure ESLint automatically](https://www.jetbrains.com/help/webstorm/eslint.html#ws_js_eslint_automatic_configuration)
- [Recommended to run ESLint on save](https://www.jetbrains.com/help/webstorm/eslint.html#ws_eslint_configure_run_eslint_on_save)
- Prettier
- Follow the following steps from [this tutorial](https://www.jetbrains.com/help/webstorm/prettier.html)
- [Before you start](https://www.jetbrains.com/help/webstorm/prettier.html#prettier_before_you_start) 1,2 and 3
- [Configure PRettier 2,3, & 4](https://www.jetbrains.com/help/webstorm/prettier.html#ws_prettier_install)
- [Recommended to run Prettier on save](https://www.jetbrains.com/help/webstorm/prettier.html#ws_prettier_run_automatically_in_current_project)
# RepositoryGuide

An application that helps with analyzing your team's GitHub repository

## Installation

1. Make sure you've installed node. If not download and install it from [here](https://nodejs.org/en/download/)
2. Clone the repository: `[email protected]:hpi-epic/repositoryguide.git` and go into the repository folder
3. Run `npm install` in the root of the repository
4. Run `npm start` to compile the scss and start a server
5. Open the home page in a browser (default address is `localhost:3000/views/home`)

## Configuration

1. Generate a personal access token for GitHub
using [these instructions](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)
2. On the settings page, download the config to have an empty version of a `config.json file`. Replace `"github_access_token": ""`
with `"github_access_token": "<your token>"`
3. Load the edited config into the application.

## Codestyle

To define a codestyle, we used Prettier and Eslint. Use `npm run prettier-<check|autofix>` or `npm run eslint-<check|autofix>` to apply these rules.

Alternatively, you can set these up for your IDE. For Webstorm follow the following tutorials:

- ESLint
- Follow the following steps from [this tutorial](https://www.jetbrains.com/help/webstorm/eslint.html)
- [Before you start](https://www.jetbrains.com/help/webstorm/eslint.html#ws_js_linters_eslint_before_you_start)
1&2
- [Configure ESLint automatically](https://www.jetbrains.com/help/webstorm/eslint.html#ws_js_eslint_automatic_configuration)
- [Recommended to run ESLint on save](https://www.jetbrains.com/help/webstorm/eslint.html#ws_eslint_configure_run_eslint_on_save)
- Prettier
- Follow the following steps from [this tutorial](https://www.jetbrains.com/help/webstorm/prettier.html)
- [Before you start](https://www.jetbrains.com/help/webstorm/prettier.html#prettier_before_you_start) 1,2 and 3
- [Configure Prettier 2,3, & 4](https://www.jetbrains.com/help/webstorm/prettier.html#ws_prettier_install)
- [Recommended to run Prettier on save](https://www.jetbrains.com/help/webstorm/prettier.html#ws_prettier_run_automatically_in_current_project)
19 changes: 19 additions & 0 deletions assets/components/components.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
async function create_header() {
const response = await fetch('/assets/components/navigation-header.html')
return response.text()
}

const placeholder_mapping = {
'data-header': create_header
}

async function replace_placeholders() {
for (const placeholder_name of Object.keys(placeholder_mapping)) {
const elements = [...document.querySelectorAll(`[${placeholder_name}]`)]
for (const element of elements) {
element.innerHTML = await placeholder_mapping[placeholder_name]()
}
}
}

replace_placeholders()
Loading