Skip to content
This repository was archived by the owner on Jun 28, 2022. It is now read-only.

Create book shelf #107

Open
wants to merge 43 commits into
base: workspaces
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
013af0b
Update search method description
thalescomp Dec 5, 2017
158225c
Update search method
thalescomp Dec 5, 2017
4a0e224
Merge pull request #43 from udacity/thalescomp-patch-1
thalescomp Dec 5, 2017
1dae1a9
Merge pull request #44 from udacity/thalescomp-patch-2
thalescomp Dec 5, 2017
45c8f3d
Update versions
thalescomp Apr 24, 2018
456b9c8
Changed the value of the move option.
veronikabenkeser Jun 6, 2018
58025ae
Removed yarn.lock from the gitignore file.
veronikabenkeser Nov 13, 2018
0d622b9
Updated dependencies and button styles
veronikabenkeser Nov 16, 2018
fcf9ff5
Add BookShelf component to display readers bookshelf.
soumyaveer Sep 11, 2019
bf45adc
Add Section Component to display in which section the book belongs to
soumyaveer Sep 11, 2019
ff1c701
Add BookList Component to display list of books in each section
soumyaveer Sep 11, 2019
99422b9
Add BookList Component to display list of books
soumyaveer Sep 11, 2019
deab464
Fix indentation from BookList
soumyaveer Sep 11, 2019
8e4053e
Add BookListItem Component to display the book details
soumyaveer Sep 11, 2019
c03d6e7
import components
soumyaveer Sep 11, 2019
4eae9af
Add Search Component
soumyaveer Sep 11, 2019
1b661d0
Add SearchBar Components
soumyaveer Sep 11, 2019
3598484
Add SearchResults Component
soumyaveer Sep 11, 2019
42f4df4
Refactor App component to move the code to Bookshelf component
soumyaveer Sep 14, 2019
abeb331
Refactor BookShelf Component to extract code to Section component
soumyaveer Sep 14, 2019
f62428e
Refactor BookShelf, Section and BookList Components to reduce repetet…
soumyaveer Sep 14, 2019
93cb8e0
Add SectionSelector to extract the repeated select element to a seper…
soumyaveer Sep 14, 2019
9355369
Refactor BookList, BookListItem, BookShelf and Section Components to …
soumyaveer Sep 14, 2019
4a4f73c
Renaming Selector Component and clean up Search, SearchBar and Search…
soumyaveer Sep 14, 2019
e59134e
Allow user to update the section of the book
soumyaveer Sep 14, 2019
568b831
Allow user to update the section for the book
soumyaveer Sep 16, 2019
3fb19ca
Add React Router to allow navigation from Bookshelf and Search
soumyaveer Sep 28, 2019
cfd203b
Add call to BooksAPI
soumyaveer Oct 6, 2019
39e5a4f
wip
soumyaveer Oct 12, 2019
0b00e6f
Allows users to search books
soumyaveer Oct 12, 2019
b69ef99
Fix search bar results to handle undefined value
soumyaveer Oct 12, 2019
fbce2fd
Fix errors that were recieved from BooksAPI during book search
soumyaveer Oct 13, 2019
d392110
Fix main page
soumyaveer Oct 14, 2019
22333f6
Fix books main page. Show books shelf as defualt in selector
soumyaveer Oct 27, 2019
ec0a0b6
Refactor main page to allow user to move books from one shelf to another
soumyaveer Oct 28, 2019
f0890b2
Fix search open and close links
soumyaveer Oct 29, 2019
bce4cac
Fix bug to move the book from one shelf to another
soumyaveer Oct 29, 2019
081e281
Fix Search Section to display the correct shelf a book belongs to.
soumyaveer Nov 2, 2019
32ff87a
Code cleanup for Search components and fix bugs
soumyaveer Nov 2, 2019
876131d
Allow user to see no search results when the the text in SearchBar is…
soumyaveer Nov 2, 2019
3a22d8a
Update Readme file
soumyaveer Nov 2, 2019
86c39e5
Update code to clear search page when user removes text from search bar.
soumyaveer Nov 3, 2019
bb45af3
Code cleanup
soumyaveer Nov 3, 2019
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
node_modules
yarn.lock
.DS_Store
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# MyReads Project

## Description
A small react application to simulate a users bookshelf and add or remove books.

## Installation
Steps to get this app working on local.
1. Clone the repo using `git clone <click on green clone or download button on github and paste the contents>`
2. Install prohect dependencies using `npm install`
3. Run server locally using `npm start`
4. Navigate to `http://localhost:3000` and see the app running.

----
This is the starter template for the final assessment project for Udacity's React Fundamentals course. The goal of this template is to save you time by providing a static example of the CSS and HTML markup that may be used, but without any of the React code that is needed to complete the project. If you choose to start with this template, your job will be to add interactivity to the app by refactoring the static code in this template.

Of course, you are free to start this project from scratch if you wish! Just be sure to use [Create React App](https://github.com/facebookincubator/create-react-app) to bootstrap the project.
Expand Down Expand Up @@ -71,12 +82,11 @@ update(book, shelf)
Method Signature:

```js
search(query, maxResults)
search(query)
```

* query: `<String>`
* maxResults: `<Integer>` Due to the nature of the backend server, search results are capped at 20, even if this is set higher.
* Returns a Promise which resolves to a JSON object containing a collection of book objects.
* Returns a Promise which resolves to a JSON object containing a collection of a maximum of 20 book objects.
* These books do not know which shelf they are on. They are raw results only. You'll need to make sure that books have the correct state while on the search page.

## Important
Expand Down
14,835 changes: 14,835 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

28 changes: 20 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
{
"name": "myreads-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"prop-types": "^15.5.8",
"react": "^15.5.4",
"react-dom": "^15.5.4"
},
"devDependencies": {
"react-scripts": "0.9.5"
"prop-types": "^15.6.2",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"react-router-dom": "^5.1.2",
"react-scripts": "2.1.1",
"react-select": "^3.0.8"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"test": "react-scripts test",
"eject": "react-scripts eject"
}
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
28 changes: 26 additions & 2 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
html, body, .root {
height: 100%;
}

body {
line-height: 1.5;
}

body, .app {
background: white;
}
Expand All @@ -15,6 +17,7 @@ body, .app {
background: #2e7c31;
text-align: center;
}

.list-books-title h1 {
font-weight: 400;
margin: 0;
Expand All @@ -39,6 +42,7 @@ body, .app {
.bookshelf-title {
border-bottom: 1px solid #dedede;
}

.bookshelf-books {
text-align: center;
}
Expand All @@ -48,6 +52,7 @@ body, .app {
right: 25px;
bottom: 25px;
}

.open-search a {
display: block;
width: 50px;
Expand All @@ -60,8 +65,14 @@ body, .app {
background-size: 28px;
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
font-size: 0;
outline: 0;
}

.open-search a:hover {
background-color: rgb(0, 102, 0);
}


/* search page */

.search-books-bar {
Expand All @@ -73,10 +84,12 @@ body, .app {
display: flex;
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 0 6px rgba(0,0,0,0.23);
}

.search-books-input-wrapper {
flex: 1;
background: #e9e;
}

.search-books-bar input {
width: 100%;
padding: 15px 10px;
Expand All @@ -91,12 +104,18 @@ body, .app {
left: 15px;
width: 50px;
height: 53px;
background: white;
background-image: url('./icons/arrow-back.svg');
background-position: center;
background-repeat: no-repeat;
background-size: 28px;
font-size: 0;
border: none;
outline: none;
}

button:active {
border: red;
outline: none;
}

.search-books-results {
Expand All @@ -109,11 +128,11 @@ body, .app {
list-style-type: none;
padding: 0;
margin: 0;

display: flex;
justify-content: center;
flex-wrap: wrap;
}

.books-grid li {
padding: 10px 15px;
text-align: left;
Expand All @@ -122,13 +141,16 @@ body, .app {
.book {
width: 140px;
}

.book-title,
.book-authors {
font-size: 0.8em;
}

.book-title {
margin-top: 10px;
}

.book-authors {
color: #999;
}
Expand All @@ -154,6 +176,7 @@ body, .app {
background-size: 20px;
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}

.book-shelf-changer select {
width: 100%;
height: 100%;
Expand All @@ -167,6 +190,7 @@ body, .app {
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
background: #eee;
}

.book-cover-title {
padding: 20px 10px 0;
text-align: center;
Expand Down
Loading