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 challenge solution #308

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
327ca07
Initial commit
CarlosUlisesOchoa Jul 23, 2023
75a8262
ADD basic package and config
CarlosUlisesOchoa Jul 24, 2023
b2438fd
ADD favicon
CarlosUlisesOchoa Jul 24, 2023
32dbec2
REMOVED unnecessary files
CarlosUlisesOchoa Jul 24, 2023
eab0dbd
vite config modified
CarlosUlisesOchoa Jul 24, 2023
aba3391
mockup added
CarlosUlisesOchoa Jul 24, 2023
e86ed31
REMOVED unnecessary code in default files
CarlosUlisesOchoa Jul 24, 2023
4270b75
MOVING books.json
CarlosUlisesOchoa Jul 24, 2023
c089d58
ADD tailwind and its config
CarlosUlisesOchoa Jul 24, 2023
5390794
styles moved
CarlosUlisesOchoa Jul 25, 2023
6108c91
ADD uuid js package
CarlosUlisesOchoa Jul 25, 2023
2462a59
website title modified
CarlosUlisesOchoa Jul 25, 2023
7a3a371
eslint and prettier config modified
CarlosUlisesOchoa Jul 25, 2023
2306b59
tailwind config updated
CarlosUlisesOchoa Jul 25, 2023
1c31ad6
commit before implement global state
CarlosUlisesOchoa Jul 25, 2023
bcd3f7b
Adding zustand
CarlosUlisesOchoa Jul 26, 2023
d5f2b5b
its working but slow
CarlosUlisesOchoa Jul 26, 2023
3cb3483
code refactor
CarlosUlisesOchoa Aug 3, 2023
802b2b5
refactor code #2
CarlosUlisesOchoa Aug 4, 2023
2304272
performance improved
CarlosUlisesOchoa Aug 4, 2023
6e8c94f
modified book thumbnail size
CarlosUlisesOchoa Aug 4, 2023
b3c6fd9
filter by page number implemented
CarlosUlisesOchoa Aug 5, 2023
7346170
added custom books mockup
CarlosUlisesOchoa Aug 14, 2023
0ae3fe3
modified command
CarlosUlisesOchoa Aug 14, 2023
cd12fd8
code refactored
CarlosUlisesOchoa Aug 14, 2023
857f00c
new style for books
CarlosUlisesOchoa Aug 15, 2023
94e7388
commented temporal console messages
CarlosUlisesOchoa Aug 15, 2023
a1c471f
translated some messages from english to spanish
CarlosUlisesOchoa Aug 15, 2023
b6da6e1
changed default language from english to spanish
CarlosUlisesOchoa Aug 15, 2023
dbfe5a5
increased min size per item
CarlosUlisesOchoa Aug 15, 2023
8301466
new style to Book component
CarlosUlisesOchoa Aug 16, 2023
312650c
new style for book card details
CarlosUlisesOchoa Aug 16, 2023
96b3685
tailwind config updated
CarlosUlisesOchoa Aug 16, 2023
031952f
postcss-import added
CarlosUlisesOchoa Aug 16, 2023
ba76df1
removed unused components
CarlosUlisesOchoa Aug 16, 2023
1032031
UI update (WIP)
CarlosUlisesOchoa Aug 16, 2023
ca285e9
Main title changed
CarlosUlisesOchoa Sep 1, 2023
f70127d
RemoveIcon added
CarlosUlisesOchoa Sep 1, 2023
03df488
App refactored
CarlosUlisesOchoa Sep 1, 2023
db9f2c0
Refactor code
CarlosUlisesOchoa Sep 4, 2023
cfe5d52
Merge branch 'midudev:main' into main
CarlosUlisesOchoa Sep 5, 2023
c377f86
styles refactored
CarlosUlisesOchoa Sep 5, 2023
bfd341c
eslint config updated
CarlosUlisesOchoa Sep 13, 2023
e7a152c
First steps to add tests
CarlosUlisesOchoa Sep 13, 2023
020c02a
Merge branch 'main' of https://github.com/CarlosUlisesOchoa/code-chal…
CarlosUlisesOchoa Sep 13, 2023
3dcd4fc
borrando directorio de la prueba 2
CarlosUlisesOchoa Sep 13, 2023
27aa192
Update README.md
CarlosUlisesOchoa Sep 13, 2023
2d79420
Update README.md
CarlosUlisesOchoa Sep 13, 2023
e7a3c96
Update README.md
CarlosUlisesOchoa Sep 13, 2023
f173ec4
Update README.md
CarlosUlisesOchoa Sep 20, 2023
872244d
test sample files deleted
CarlosUlisesOchoa Sep 20, 2023
625218f
path updated
CarlosUlisesOchoa Sep 22, 2023
70ef608
more pkgs for testing
CarlosUlisesOchoa Sep 22, 2023
2504c72
2 tests added
CarlosUlisesOchoa Sep 22, 2023
95c93f0
Merge branch 'add-test'
CarlosUlisesOchoa Sep 22, 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
65 changes: 65 additions & 0 deletions pruebas/01-reading-list/CarlosUlisesOchoa/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
module.exports = {
root: true,
env: {
'jest/globals': true,
browser: true,
es2020: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
'./node_modules/standard/eslintrc.json',
],
ignorePatterns: [
'dist',
'.eslintrc.cjs',
'node_modules',
'**/*.svg',
'**/*.css',
'**/*.json',
],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: {
react: {
version: '18.2',
},
'import/resolver': {
alias: {
map: [['@/', 'src/']],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
plugins: ['react-refresh', 'jest'],
rules: {
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'react/prop-types': 'off',
'import/no-duplicates': 'off',
quotes: 'off',
'block-spacing': 'off',
'no-lone-blocks': 'off',
'import/first': 'off',
'object-curly-spacing': 'off',
'jsx-quotes': 'off',
'react/jsx-closing-bracket-location': 'off',
'react-hooks/exhaustive-deps': 'off',
'space-before-function-paren': 'off',
'no-unused-vars': 'warn',
'no-undef': 'error',
'no-multiple-empty-lines': 'off',
'eol-last': 'off',
'multiline-ternary': 'off',
'comma-dangle': [
'error',
{
arrays: 'only-multiline',
objects: 'only-multiline',
imports: 'only-multiline',
exports: 'only-multiline',
functions: 'ignore',
},
],
},
}
24 changes: 24 additions & 0 deletions pruebas/01-reading-list/CarlosUlisesOchoa/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
10 changes: 10 additions & 0 deletions pruebas/01-reading-list/CarlosUlisesOchoa/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"semi": false,
"printWidth": 90,
"singleQuote": true,
"jsxSingleQuote": true,
"trailingComma": "es5",
"jsxBracketSameLine": true,
"bracketSpacing": true,
"tabWidth": 2
}
101 changes: 101 additions & 0 deletions pruebas/01-reading-list/CarlosUlisesOchoa/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<h1 align="center">📚 Mi catálogo de libros</h1>

<br/>

<div align="center">
Consulta los detalles de este coding challenge <a href="https://github.com/midudev/pruebas-tecnicas/blob/main/pruebas/01-reading-list/README.md" target="_blank">haciendo clic aquí</a>
<br/><br/>
Alojado en <a href="https://vercel.com/" target="_blank">Vercel</a>.
</div>

<div align="center">
<h3>
<a href="https://reading-list-code-challenge.vercel.app/">
Demo
</a>
<span> | </span>
<a href="https://github.com/CarlosUlisesOchoa/code-challenge-reading-list">
Código fuente
</a>
</h3>
</div>

<br />

Desarrollado con una variedad de tecnologías modernas para proporcionar la mejor experiencia de lectura. ✨

## Tabla de Contenidos

- [Tecnologías utilizadas](#tecnologías-utilizadas)
- [Características implementadas](#características-implementadas)
- [Características por implementar](#características-por-implementar)
- [Requisitos](#requisitos)
- [Cómo empezar](#cómo-empezar)
- [Contacto](#contacto)

## Tecnologías Utilizadas

- [React](https://reactjs.org/)
- [Tailwind](https://tailwindcss.com/)
- [Prettier](https://prettier.io/)
- [Standard](https://standardjs.com/)
- [ESLint](https://eslint.org/)
- [Vite](https://vitejs.dev/)

### Capturas de pantalla

Tema oscuro:
![image](https://github.com/CarlosUlisesOchoa/code-challenge-reading-list/assets/26280134/5c0e1e4b-7eef-46bc-927f-20932290d52b)

Tema claro:
![image](https://github.com/CarlosUlisesOchoa/code-challenge-reading-list/assets/26280134/e844fec4-18e3-4c32-9c6e-157d22340429)


### Características implementadas

- [x] Visualización de libros disponibles
- [x] Agregar libro a lista de lectura
- [x] Eliminar libro a lista de lectura
- [x] Filtro por género de Libros
- [x] Filtro por número de Páginas
- [x] Búsqueda por texto en título
- [x] Persistencia de datos en el navegador
- [x] Diseño adaptativo (Responsive design)
- [x] Añadir tests

### Características por implementar

- [ ] Sincronización de estado global
- [ ] Ordenación de la lista de lectura por prioridad
- [ ] Sincronización entre pestañas

## Requisitos

- [Node.js](https://nodejs.org/en/download/)
- [npm](https://www.npmjs.com/) o [pnpm](https://pnpm.io/)

## Cómo Empezar

Ejecuta los siguientes comandos en tu línea de comandos:

```bash
# Clona este repositorio
$ git clone https://github.com/CarlosUlisesOchoa/code-challenge-reading-list

# Ve al directorio del proyecto
$ cd reading-list\pruebas\01-reading-list\CarlosUlisesOchoa

# Instala las dependencias
$ pnpm install

# Ejecutar en modo desarrollo
$ pnpm run dev

# Listo ahora podrás ver el proyecto accediendo a http://localhost:5173/
```

## Contacto

- Website [carlos8a.com](https://carlos8a.com)
- GitHub [@CarlosUlisesOchoa](https://github.com/carlosulisesochoa)
- X [@Carlos8aDev](https://twitter.com/carlos8adev)
16 changes: 16 additions & 0 deletions pruebas/01-reading-list/CarlosUlisesOchoa/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="es">

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Librería 8a - CarlosUlisesOchoa</title>
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>

</html>
53 changes: 53 additions & 0 deletions pruebas/01-reading-list/CarlosUlisesOchoa/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"name": "reading-list",
"author": {
"name": "Carlos Ochoa",
"email": "carlos8a.dev@gmail.com",
"url": "https://carlos8a.com"
},
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite --host",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"test": "vitest",
"preview": "vite preview"
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@babel/core": ">=7.0.0-0 <8.0.0",
"@babel/plugin-syntax-flow": "^7.14.5",
"@babel/plugin-transform-react-jsx": "^7.14.9",
"@babel/preset-env": "^7.22.20",
"@babel/preset-react": "^7.22.15",
"@testing-library/react": "^14.0.0",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@vitejs/plugin-react-swc": "^3.3.2",
"autoprefixer": "^10.4.14",
"babel-plugin-module-resolver": "^5.0.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-jest": "^27.2.3",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"jsdom": "^22.1.0",
"postcss": "^8.4.27",
"postcss-import": "^15.1.0",
"prettier": "^3.0.0",
"prop-types": "15.8.1",
"standard": "^17.1.0",
"tailwindcss": "^3.3.3",
"typescript": ">=2.8.0",
"vite": "^4.4.5",
"vite-plugin-eslint": "^1.8.1",
"vitest": "^0.34.3"
}
}
Loading