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

Reading list app ready #192

Closed
wants to merge 55 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
f2c7609
initial commit: angular project created
diego-gonzales Jul 15, 2023
075ac72
eslint linter added
diego-gonzales Jul 15, 2023
e907be4
code formatter prettier configured
diego-gonzales Jul 15, 2023
89a505e
'ignore' files for eslint and prettier added
diego-gonzales Jul 15, 2023
20f7e2d
tailwind and daisyui configured
diego-gonzales Jul 16, 2023
cfe5c24
main book layout ready
diego-gonzales Jul 16, 2023
9ad1297
book-list and book-item ready
diego-gonzales Jul 16, 2023
7c29c2c
book-item layout improved
diego-gonzales Jul 16, 2023
75d2778
grid improved in book-list
diego-gonzales Jul 17, 2023
3f7d5a6
new improvements in book-item
diego-gonzales Jul 17, 2023
afcc441
reading list working
diego-gonzales Jul 18, 2023
74369ea
book and reading list working
diego-gonzales Jul 18, 2023
917c224
showing quantity of books correctly
diego-gonzales Jul 18, 2023
a029f1e
improvements in responsive design
diego-gonzales Jul 18, 2023
3307ecd
options for genre select added
diego-gonzales Jul 18, 2023
cd4a15c
progress in book detail page
diego-gonzales Jul 18, 2023
36e855e
book detail page finished
diego-gonzales Jul 18, 2023
b840b68
show conditionally searchbox working
diego-gonzales Jul 19, 2023
b3aca7b
'by page' and 'by genre' filters working
diego-gonzales Jul 19, 2023
a0da2c6
book searching working
diego-gonzales Jul 19, 2023
4f0c7c2
showing quantity of books by genre
diego-gonzales Jul 19, 2023
97597ab
data saving in localstorage added
diego-gonzales Jul 19, 2023
dd6abe2
validation for empty book list added
diego-gonzales Jul 20, 2023
c9579b7
sync between tabs working
diego-gonzales Jul 20, 2023
392909b
navbar component created
diego-gonzales Jul 20, 2023
4e307fd
improvements in code
diego-gonzales Jul 20, 2023
594fd9d
jest configured
diego-gonzales Jul 20, 2023
099d61b
unit test for book list added
diego-gonzales Jul 21, 2023
9414dc5
readme updated
diego-gonzales Jul 21, 2023
7f384e5
comment removed
diego-gonzales Jul 25, 2023
3c4075e
trying view transition api
diego-gonzales Jul 25, 2023
5170782
optimizing images
diego-gonzales Jul 26, 2023
95e9bb7
change path image in book detail
diego-gonzales Jul 26, 2023
1b66c9f
view transition duration changed
diego-gonzales Jul 26, 2023
478421e
netlify config file added
diego-gonzales Jul 26, 2023
4d9a0f4
config files and readme updated
diego-gonzales Jul 26, 2023
3353ea5
Merge branch 'midudev:main' into main
diego-gonzales Aug 31, 2023
96aa711
initial commit - qwik project created
diego-gonzales Aug 31, 2023
03715fa
tailwind css added
diego-gonzales Sep 1, 2023
9cbb6f7
components and structure created
diego-gonzales Sep 1, 2023
ef98f57
all pages working
diego-gonzales Sep 1, 2023
d8b1bbb
result list working
diego-gonzales Sep 4, 2023
b1c8f29
app for mobile finished
diego-gonzales Sep 4, 2023
0f2c4b1
new font added
diego-gonzales Sep 5, 2023
165d393
responsive for desktop improved
diego-gonzales Sep 5, 2023
283dfab
added labels for categories
diego-gonzales Sep 5, 2023
ca1fb14
host variable changed
diego-gonzales Sep 5, 2023
9cb3360
vitest added
diego-gonzales Sep 5, 2023
f04d718
document head metatags improved
diego-gonzales Sep 5, 2023
eddbf22
dialog for image preview added
diego-gonzales Sep 5, 2023
b966911
favicon changed
diego-gonzales Sep 6, 2023
0720ac9
some animations added
diego-gonzales Sep 6, 2023
244c3d6
testing searchbox component
diego-gonzales Sep 7, 2023
8a6eb1a
window type as any
diego-gonzales Sep 7, 2023
8933e3c
vercel deploy ready
diego-gonzales Sep 7, 2023
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
16 changes: 16 additions & 0 deletions pruebas/01-reading-list/diego-gonzales/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions pruebas/01-reading-list/diego-gonzales/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
30 changes: 30 additions & 0 deletions pruebas/01-reading-list/diego-gonzales/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ['standard-with-typescript', 'eslint-config-prettier'],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
},
rules: {
'@typescript-eslint/no-confusing-void-expression': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/prefer-readonly': 'off',
'@typescript-eslint/lines-between-class-members': 'off',
'@typescript-eslint/no-floating-promises': 'off',
},
};
42 changes: 42 additions & 0 deletions pruebas/01-reading-list/diego-gonzales/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# Compiled output
/dist
/tmp
/out-tsc
/bazel-out

# Node
/node_modules
npm-debug.log
yarn-error.log

# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings

# System files
.DS_Store
Thumbs.db
1 change: 1 addition & 0 deletions pruebas/01-reading-list/diego-gonzales/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
4 changes: 4 additions & 0 deletions pruebas/01-reading-list/diego-gonzales/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"trailingComma": "es5",
"singleQuote": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
"recommendations": ["angular.ng-template"]
}
20 changes: 20 additions & 0 deletions pruebas/01-reading-list/diego-gonzales/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: test",
"url": "http://localhost:9876/debug.html"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
42 changes: 42 additions & 0 deletions pruebas/01-reading-list/diego-gonzales/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "start",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
},
{
"type": "npm",
"script": "test",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
}
]
}
41 changes: 41 additions & 0 deletions pruebas/01-reading-list/diego-gonzales/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Technical test: Reading list

This project is a simple reading list app. This project:

- was created with Angular 16
- uses the last features of Angular, like standalone components and signals.
- uses TailwindCSS for styling, and DaisyUI for components
- uses Jest for unit testing

Features:

- Add a book to the reading list
- Remove a book from the reading list
- Filter the book list by genre
- Filter the book list by max number of pages
- Search for a book by title
- Show the total number of available books in the book list
- Show the total number of books in the reading list
- There is persistence of data (local storage) when refreshing the page
- There is synchronization between tabs (local storage) when adding/removing books from the reading list
- Show a book detail page when clicking on a book in the book list

## Installation

Run `pnpm install` to install the dependencies. If you don't have `pnpm` installed, you can use `npm` or `yarn` instead.

## Development server

Run `pnpm run start` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.

## Running unit tests

You can un `pnpm run test` and `pnpm run test:watch` to execute the unit tests [Jest](https://jestjs.io/).

## Build

Run `pnpm run build` to build the project. The build artifacts will be stored in the `dist/` directory.

## Link to deployed version

https://my-reading-list-app.netlify.app/
1 change: 1 addition & 0 deletions pruebas/01-reading-list/diego-gonzales/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* /index.html 200
102 changes: 102 additions & 0 deletions pruebas/01-reading-list/diego-gonzales/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"cli": {
"packageManager": "pnpm"
},
"newProjectRoot": "projects",
"projects": {
"diego-gonzales": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"standalone": true
},
"@schematics/angular:directive": {
"standalone": true
},
"@schematics/angular:pipe": {
"standalone": true
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/diego-gonzales",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "diego-gonzales:build:production"
},
"development": {
"browserTarget": "diego-gonzales:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "diego-gonzales:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:jest",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
]
}
}
}
}
}
}
1 change: 1 addition & 0 deletions pruebas/01-reading-list/diego-gonzales/config.jest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import 'jest-preset-angular/setup-jest';
7 changes: 7 additions & 0 deletions pruebas/01-reading-list/diego-gonzales/netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[build]
publish = "dist/diego-gonzales"

[[redirects]]
from = "/*"
to = "/index.html"
status = 200
56 changes: 56 additions & 0 deletions pruebas/01-reading-list/diego-gonzales/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"name": "diego-gonzales",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "jest",
"test:watch": "jest --watch"
},
"private": true,
"dependencies": {
"@angular/animations": "16.0.0",
"@angular/common": "16.0.0",
"@angular/compiler": "16.0.0",
"@angular/core": "16.0.0",
"@angular/forms": "16.0.0",
"@angular/platform-browser": "16.0.0",
"@angular/platform-browser-dynamic": "16.0.0",
"@angular/router": "16.0.0",
"rxjs": "~7.8.0",
"tslib": "2.3.0",
"zone.js": "~0.13.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "16.0.0",
"@angular/cli": "~16.0.0",
"@angular/compiler-cli": "16.0.0",
"@types/jest": "29.5.3",
"@typescript-eslint/eslint-plugin": "5.50.0",
"autoprefixer": "10.4.14",
"daisyui": "3.2.1",
"eslint": "8.0.1",
"eslint-config-prettier": "8.8.0",
"eslint-config-standard-with-typescript": "36.1.0",
"eslint-plugin-import": "2.25.2",
"eslint-plugin-n": "15.0.0 || 16.0.0 ",
"eslint-plugin-promise": "6.0.0",
"jest": "29.6.1",
"jest-preset-angular": "13.1.1",
"postcss": "8.4.26",
"prettier": "3.0.0",
"tailwindcss": "3.3.3",
"typescript": "~5.0.2"
},
"jest": {
"preset": "jest-preset-angular",
"setupFilesAfterEnv": [
"<rootDir>/config.jest.ts"
],
"moduleNameMapper": {
"~/(.*)": "<rootDir>/src/app/$1"
}
}
}
Loading