React Phone Catalog#992
Open
sonik-boom71 wants to merge 11 commits into
Open
Conversation
- Vite + React 18 + TypeScript + SCSS modules - React Router v6 (HashRouter) with pages: Home, Phones, Tablets, Accessories, ProductDetails, Cart, Favorites, Contacts, Rights, 404 - Context-based state: Products, Cart, Favorites, Theme, Language - Cart and favorites persisted to localStorage - Sticky header with search (debounced via URL params), language switch (EN/RU/UA) and dark/light theme toggle - Hero pictures slider with auto-rotate (5s), real overlay CTA on the baked-in banner button, creative composed slides 2 and 3 - Products slider, sortable/paginated catalog, product details with color/capacity selection that switches itemId, You may also like - Dark mode keeps product image plate light so dark devices stay visible - i18n via small custom dictionary, translation keys typed - Data loaded from local public/api/*.json (mirrored from mate-academy repo), product images served via jsdelivr CDN - gh-pages deploy script
brespect
suggested changes
May 11, 2026
brespect
left a comment
There was a problem hiding this comment.
Good progress check next:
- If you switch the theme background should switch to black too:
- If you select something in this section page should scrolls to the top:
- If you give user the ability to change language ,you must check that each section meets these requirements:
- Check "Order Now" looks broken on translation:
- Back button should ref me back to the previous layer, not to the previous phone or tablet:
- Add the favicon to the browser tab.
- Add favicon (SVG) and theme-color meta in index.html - ScrollToTop component resets scroll on every route change - ProductsPage smoothly scrolls to top on sort/perPage/page/query change - Back button on product details now goes to the category page instead of browser history, so navigating between color/capacity variants does not trap the user in a loop - ORDER NOW overlay is now a transparent click target on top of the baked-in pill in banner.jpg — translation text never overflows and the artwork stays intact in every locale - Dark mode background is set on html / body / #root / .app and transitions smoothly, no white flash on theme toggle - Translate remaining hardcoded aria-labels (home, slider arrows, slide dots, cart quantity controls, loader) into EN / RU / UA
- Drop jsdelivr CDN dependency for product images. After the upstream
scaffold was merged in, public/img/ contains all assets locally, so
buildImageUrl now points at `${BASE_URL}img/...`. Eliminates the
broken-image rendering some users saw when the CDN was slow/blocked
and makes the catalog work offline.
- Add an i18n dictionary that translates the 44 known section titles
inside the API description (Camera / Retina display / ProMotion etc.)
for RU and UA. Paragraph body is API-sourced and stays in English;
a small italic note explains this in non-English locales.
Author
|
@brespect yep |
brespect
suggested changes
May 13, 2026
- Revert About description titles to the original English content from the API. Drop the custom descriptionTitles dictionary and the aboutNote disclaimer - reviewer asked to keep the upstream copy as is. - Hide the items / models count on empty screens (ProductsPage and FavoritesPage) so users no longer see a misleading "0 models" line next to an empty state.
daccc43 to
14a9079
Compare
- Bring back the descriptionTitles dictionary that maps the 44 known section headings from the API to RU and UA. - ProductDetailsPage uses it to translate h3 titles whenever locale is not English; unknown headings fall back to the original. - Italic aboutNote (under the section h2) explains that paragraph body stays in the original language because the source data is English-only.
Author
|
@brespect yep |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Demo
🔗 Live: https://sonik-boom71.github.io/react_phone-catalog/
🎨 Design (Figma): https://www.figma.com/file/T5ttF21UnT6RTq3WqEbHdQ/Phone-catalog-(V2)-Original
Stack
Component/Component.module.scss+ barrelindex.ts)Pages
//phones/tablets/accessories/product/:productIditemId), tech specs, About, You may also like/cart/favorites/contacts/rights*Features
<Link>overlay precisely covering the baked-in ORDER NOW pill on the banner image (translation-safe — covers underlying text)4 / 8 / 16 / allitems per pagesort,perPage,page,query)itemIdand navigatesBonus tasks
data-theme="dark"on<html>, persisted to localStorage. Initial value picked fromprefers-color-scheme. Product image area stays light in dark theme so dark / black devices keep contrast.navigator.languageon first visit.Data
products.json,phones.json,tablets.json,accessories.jsonare bundled intopublic/api/(mirrored frommate-academy/react_phone-catalog) — no external API dependency for the index data.Project structure
Local development