-
Notifications
You must be signed in to change notification settings - Fork 753
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
Phone catalog app #216
base: master
Are you sure you want to change the base?
Phone catalog app #216
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, re-request review when the task will be done. Do not close your PR. If you have any questions it's better to ask them in the chat 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For sure, very good job 👍
Let's add a few minor improvements
BTW: do not forget re-deploy app after any changes (I still can't see the favicon)
src/helpers/productFilter.ts
Outdated
import { Product } from '../types/Product'; | ||
|
||
export const productFilter = (products: Product[], query: string) => { | ||
const preparedQuery = query.toLowerCase().trim(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure we have to trim here - it's a search query, not input that will be part of some entity you create, etc. For example query Hi
will still match the word Himars
which might a bit unexpectedly
src/helpers/productFilter.ts
Outdated
export const productFilter = (products: Product[], query: string) => { | ||
const preparedQuery = query.toLowerCase().trim(); | ||
|
||
const productsIncludeQuery = products.filter(product => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const productsIncludeQuery = products.filter(product => { | |
return products.filter(product => { |
in such cases you may immediately return - FYI
src/contexts/CartContextProvider.tsx
Outdated
]); | ||
}; | ||
|
||
const quantityCart = (productId: string, action: Action) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's rename it - sounds like a variable that stores amount (quantity) of products in the cart
src/pages/PhonePage/PhonePage.tsx
Outdated
|
||
import './PhonePage.scss'; | ||
|
||
export const PhonePage = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PhonesPage - it renders the list of Phones not one item
The same below - ProductsPage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check this case, + add some trastion for hover effect
https://github.com/mate-academy/react_phone-catalog/assets/61904995/9596c369-0541-4e4b-b3eb-8c68e847b667
Bottom border invisible on hover
https://github.com/mate-academy/react_phone-catalog/assets/61904995/88f523cd-bfcd-4264-a61f-68b41f487e9c
add cursor: pointer
to all elements user can click
i dont know how but in deploy transform doesn`t smooth 20230917133319.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/styles/utils/_mixins.scss
Outdated
@@ -0,0 +1,43 @@ | |||
@mixin hover($property, $toValue) { | |||
transition: #{$property}, $effect-duration; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
transition: #{$property}, $effect-duration; | |
transition: #{$property}, $effect-duration ease; |
something went wrong with transition.
try to set ease function.
devtools in demo-link
and after change transition property
also can be problem with css imports. try to import without ./
in glonal-imports.
I`ll do a responsive all pages after another problems have been solved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost done.
Found a few moments for improvement
-
center content horizontally for tablet/mobile view. check all pages and different widths
-
home page approximately 708px width. no visible right border
-
phone details page. make spaces between images as in design.
I haven't noticed some jumping on details page - but if you have questions about it, please ask in fe_chat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
20231010114016.mp4problem with sort per page |
https://valeraviachalo.github.io/react_phone-catalog/