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

Version 1 #31

Merged
merged 59 commits into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
03a19e8
initialze project for development
harlexkhal Mar 8, 2022
6c7c2e7
add header and main gui
mnekx Mar 8, 2022
0ad9abb
update styles
mnekx Mar 8, 2022
8148d5d
update styles
mnekx Mar 8, 2022
47983cd
update index.html
mnekx Mar 8, 2022
92538a7
add footer
mnekx Mar 8, 2022
6f6f3ad
add modal
mnekx Mar 8, 2022
490d218
update styles
mnekx Mar 8, 2022
536e449
update styles
mnekx Mar 8, 2022
f31a62b
fix errors
mnekx Mar 8, 2022
7f44f0e
connect to food api + add item list unit test
harlexkhal Mar 8, 2022
5976ea2
add github classroom for error checks
harlexkhal Mar 8, 2022
bad324e
fix linter errors
mnekx Mar 8, 2022
be3299f
change test description
harlexkhal Mar 8, 2022
13d8205
fix forseen merge conflicts
harlexkhal Mar 8, 2022
669cb80
fix linter errors
mnekx Mar 8, 2022
8eb82ef
fix linters + fix fetch api bugs
harlexkhal Mar 8, 2022
4f16856
Merge branch 'connect-food-api' of https://github.com/harlexkhal/Food…
harlexkhal Mar 8, 2022
d4980af
update .gitignore
mnekx Mar 8, 2022
71dfd35
Merge branch 'connect-food-api' of https://github.com/harlexkhal/Food…
mnekx Mar 8, 2022
035720d
Merge pull request #24 from harlexkhal/f/create-GUI
harlexkhal Mar 8, 2022
ec2e965
Merge branch 'development' into connect-food-api
harlexkhal Mar 8, 2022
44b35b7
Merge pull request #23 from harlexkhal/connect-food-api
harlexkhal Mar 8, 2022
f5c483d
fix frameborder, comments count, modal closer position
mnekx Mar 8, 2022
24a9367
Merge pull request #25 from harlexkhal/bugfix/finalize-ui
harlexkhal Mar 8, 2022
8c01286
connect application engine to ui + modify ui
harlexkhal Mar 9, 2022
52659bf
Merge pull request #26 from harlexkhal/integrate-application-engine
harlexkhal Mar 9, 2022
96e30bd
make member variable name case consistent to camel case
harlexkhal Mar 9, 2022
48883ca
initialize app id for involvment api + removed hard coded counter fro…
harlexkhal Mar 9, 2022
b340418
add index link to item count + initialize involvement api
harlexkhal Mar 9, 2022
ce49c36
connect like interaction and involvement to ui
harlexkhal Mar 9, 2022
7e71306
fix eslint errors
harlexkhal Mar 9, 2022
67a1af2
update index.css
mnekx Mar 9, 2022
882a5d4
create mobile.css
mnekx Mar 9, 2022
d065372
fix linter errors
mnekx Mar 9, 2022
676fd4a
update README.md
mnekx Mar 9, 2022
ced7e67
add MIT license
mnekx Mar 9, 2022
df95ba7
add screenshot
mnekx Mar 9, 2022
124bbf2
update README.md
mnekx Mar 9, 2022
6331d78
integrate comment involvement with ui
harlexkhal Mar 9, 2022
0c40e73
write unit test for comment feature
harlexkhal Mar 9, 2022
f6b18a4
modified copyright information
harlexkhal Mar 9, 2022
113bd74
fix comment involvement bug
harlexkhal Mar 10, 2022
4bd152b
modify comment involvment poll delay
harlexkhal Mar 10, 2022
be8139b
change variable naming in interaction.js as requested by partner
harlexkhal Mar 10, 2022
f5da40f
Merge pull request #27 from harlexkhal/connect-involvment-api
mnekx Mar 10, 2022
7f84d92
Merge branch 'development' into f/add-responsiveness
mnekx Mar 10, 2022
6fb93bb
update screenshot.png
mnekx Mar 10, 2022
f90fbc9
update README.md
mnekx Mar 10, 2022
3279f7d
update licence to include name of partner
mnekx Mar 10, 2022
72e2493
update README.md
mnekx Mar 10, 2022
00cfca1
Update README.md
mnekx Mar 10, 2022
46006fd
Update README.md
mnekx Mar 10, 2022
f8dcfa3
Merge pull request #29 from harlexkhal/f/add-responsiveness
harlexkhal Mar 10, 2022
6b8805c
update README.md
mnekx Mar 10, 2022
c60ce2e
Merge pull request #30 from harlexkhal/bugfix/fix-readme
harlexkhal Mar 10, 2022
9db9efb
update README.md
mnekx Mar 10, 2022
181ec5b
Merge pull request #32 from harlexkhal/bugfix/fix-readme
harlexkhal Mar 10, 2022
b655dfd
final update to readme
harlexkhal Mar 10, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"env": {
"test": {
"plugins": ["@babel/plugin-transform-modules-commonjs"]
}
}
}
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/*
__Testbase__/*
webpack.config.js
25 changes: 25 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"env": {
"browser": true,
"es6": true,
"jest": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"extends": ["airbnb-base"],
"rules": {
"no-shadow": "off",
"no-param-reassign": "off",
"eol-last": "off",
"import/extensions": [ 1, {
"js": "always", "json": "always"
}]
},
"ignorePatterns": [
"dist/",
"build/"
]
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* linguist-vendored
*.js linguist-vendored=false
62 changes: 62 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Linters

on: pull_request

env:
FORCE_COLOR: 1

jobs:
lighthouse:
name: Lighthouse
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Setup Lighthouse
run: npm install -g @lhci/cli@0.7.x
- name: Lighthouse Report
run: lhci autorun --upload.target=temporary-public-storage --collect.staticDistDir=.
webhint:
name: Webhint
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Setup Webhint
run: |
npm install --save-dev hint@6.x
[ -f .hintrc ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.hintrc
- name: Webhint Report
run: npx hint .
stylelint:
name: Stylelint
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Setup Stylelint
run: |
npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x
[ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.stylelintrc.json
- name: Stylelint Report
run: npx stylelint "**/*.{css,scss}"
eslint:
name: ESLint
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Setup ESLint
run: |
npm install --save-dev eslint@7.x eslint-config-airbnb-base@14.x eslint-plugin-import@2.x babel-eslint@10.x
[ -f .eslintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.eslintrc.json
- name: ESLint Report
run: npx eslint .
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
.vscode
18 changes: 18 additions & 0 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"connector": {
"name": "local",
"options": {
"pattern": ["**", "!.git/**", "!node_modules/**"]
}
},
"extends": ["development"],
"formatters": ["stylish"],
"hints": [
"button-type",
"disown-opener",
"html-checker",
"meta-charset-utf-8",
"meta-viewport",
"no-inline-styles:error"
]
}
10 changes: 10 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": ["stylelint-config-standard"],
"plugins": ["stylelint-scss", "stylelint-csstree-validator"],
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true,
"csstree/validator": true
},
"ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css", "**/*.js", "**/*.jsx"]
}
11 changes: 11 additions & 0 deletions MIT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Copyright 2021, [Alexander Oguzie-Ibeh, Mnemba Chambuya]

###### Please delete this line and the next one

###### APP TYPE can be a webpage/website, a web app, a software and so on

Permission is hereby granted, free of charge, to any person obtaining a copy of this [APP TYPE] and associated documentation files, to deal in the [APP TYPE] without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the [APP TYPE], and to permit persons to whom the [APP TYPE] is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the [APP TYPE].

THE [APP TYPE] IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE [APP TYPE] OR THE USE OR OTHER DEALINGS IN THE [APP TYPE].
68 changes: 67 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,67 @@
# JavaScript-Capstone
# JavaScript-Capstone

![see](./src/assets/images/screenshot.png?raw=true 'Title')

> The app lists different foods from different areas in the world with opinions from people worldwide.

## Built With

- JavaScript, HTML, CSS

## Live Demo

[Live Demo Link](https://harlexkhal.github.io/Foodipy/)

## Getting Started

**This is an example of how you may give instructions on setting up your project locally.**

### Setup

1. git clone https://github.com/harlexkhal/Foodipy.git
2. cd Foodipy
3. npm install
4. npm start to serve into local 8080 port

### Install

1. git clone https://github.com/harlexkhal/Foodipy.git
2. cd Foodipy
3. npm install
4. npm start to serve into local 8080 port

### Run tests

npm run test

### Deployment

https://harlexkhal.github.io/Foodipy/

## Authors

👤 **Mnemba Chambuya**

- GitHub: [@mnekx](https://github.com/mnekx)
- Twitter: [@MnembaChambuya](https://twitter.com/MnembaChambuya)
- LinkedIn: [mnemba-chambuya](https://linkedin.com/in/mnemba-chambuya)

👤 **Alexander Oguzie-Ibeh**

- GitHub: [@harlexkhal](https://github.com/harlexkhal)
- Twitter: [@harlexkhal](https://twitter.com/harlexkhal)
- LinkedIn: [alexander-oguzie-ibeh-776814164](https://www.linkedin.com/in/alexander-oguzie-ibeh-776814164/)

## 🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the [issues page](../../issues/).

## Show your support

Give a ⭐️ if you like this project!

## 📝 License

This project is [MIT](./MIT.md) licensed.
101 changes: 101 additions & 0 deletions __Testbase__/unit.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
import Window from '../custom_modules/application/window';

describe('Food Items', () => {
test('Count Items', () => {
document.body.innerHTML =
'<div>' +
' <ul class="meal-content"></ul>' +
'<span class="item-count"></span>' +
'</div>';

const itemList = [
{
strMeal: "Beef and Mustard Pie",
strMealThumb: "https://www.themealdb.com/images/media/meals/sytuqu1511553755.jpg",
idMeal: "52874"
},
{
strMeal: "Beef and Oyster pie",
strMealThumb: "https://www.themealdb.com/images/media/meals/wrssvt1511556563.jpg",
idMeal: "52878"
},
{
strMeal: "Beef Banh Mi Bowls with Sriracha Mayo, Carrot & Pickled Cucumber",
strMealThumb: "https://www.themealdb.com/images/media/meals/z0ageb1583189517.jpg",
idMeal: "52997"
},
{
strMeal: "Beef Bourguignon",
strMealThumb: "https://www.themealdb.com/images/media/meals/vtqxtu1511784197.jpg",
idMeal: "52904"
},
{
strMeal: "Beef Bourguignon",
strMealThumb: "https://www.themealdb.com/images/media/meals/vtqxtu1511784197.jpg",
idMeal: "52904"
}
];

const ItemLikesCounter = [
{
"likes": 8,
"item_id": "52878"
},
{
"likes": 12,
"item_id": "52874"
},
{
"likes": 1,
"item_id": "52904"
},
{
"likes": 3,
"item_id": "52904"
},
{
"likes": 2,
"item_id": "52997"
}
]
const app = new Window();
app.displayItems(itemList, ItemLikesCounter);

const list = document.querySelectorAll('.meal-content li');
expect(list).toHaveLength(5);
});
});

describe('Comments', () => {
test('Count Comments', () => {
document.body.innerHTML =
'<div>' +
' <ul class="user-comments"></ul>' +
'<span class="comment-count-info"></span>' +
'</div>';

const comments = [
{
"username": "Alexander Ibeh",
"comment": "very yummy",
"creation_date": "2022-03-09"
},
{
"username": "Richard",
"creation_date": "2022-03-09",
"comment": "This tastes really good"
},
{
"comment": "This tastes really good",
"username": "Richard",
"creation_date": "2022-03-09"
}
];

const app = new Window();
app.displayItemComments(comments);

const list = document.querySelectorAll('.user-comments li');
expect(list).toHaveLength(3);
});
});