Commit Graph

147 Commits (22e291c932eb18968379fc8131aeb8444beabfa4)

Author SHA1 Message Date
Jason Zhu 3539b6febe Separate selected Region/Type/Sort/SearchInput out of Pokedex, so it become easier for testing in storybook 2023-05-08 00:24:16 +10:00
Jason Zhu 6acabeb91a Added InfoDialog feature (partially done) 2023-05-07 23:28:14 +10:00
Jason Zhu ff92db699d Prettier GenderRate.css 2023-05-07 23:10:50 +10:00
Jason Zhu f5e0a75c64 Modified index.css file for better global rendering 2023-05-07 23:10:23 +10:00
Jason Zhu 749a745b4a Created GenderRate component for InfoDialog 2023-05-07 23:09:15 +10:00
Jason Zhu 2ae23cdbfa Refactored PokemonCard a little bit 2023-05-07 22:39:08 +10:00
Jason Zhu 1f0ab75d6e Implemented index.ts for PokemonTypes 2023-05-07 22:32:06 +10:00
Jason Zhu 93fe0cb24a Fixed url import of image in index.css 2023-05-07 22:31:12 +10:00
Jason Zhu 40a64e9033 Implemented GenderRate component for InfoDialog feature 2023-05-07 22:30:20 +10:00
Jason Zhu a21427b91f Remove unnecessary Filter component in Pokedex 2023-05-07 21:34:12 +10:00
Jason Zhu be9d767bfd Moved Filter component into a separate feature 2023-05-07 21:30:49 +10:00
Jason Zhu 6295a6a792 Prettier PokemonCard.css 2023-05-07 19:55:50 +10:00
Jason Zhu dbb7ab99d2 Fixed storybook hierarchy for PokemonCard 2023-05-07 19:54:45 +10:00
Jason Zhu 92d3428c84 Move PokemonCard component into component directory 2023-05-07 19:50:50 +10:00
Jason Zhu ce3d3ce0d7 Fixed width problem of rendering in storybook 2023-05-07 16:10:48 +10:00
Jason Zhu 5068a6f728 Move poke__type css class into PokemonCard component 2023-05-07 15:50:47 +10:00
Jason Zhu b56eae4e40 Addd searchInput selector & remove redundant css 2023-04-19 00:14:45 +10:00
Jason Zhu b2839de8a7 Add filter css (part2: prettier) 2023-04-19 00:03:43 +10:00
Jason Zhu 133884e717 Add filter css 2023-04-19 00:03:02 +10:00
Jason Zhu bb5f6d73c4 Add css for types in PokemonCard back to fix render issue in storybook 2023-04-18 22:46:45 +10:00
Jason Zhu ec0af2f3ac Remove unnecessary images asset and modified PokemonCard for using PokemonTypes component 2023-04-18 21:16:43 +10:00
Jason Zhu 71bc089745 Implemented PokemonTypes common component (part2) 2023-04-18 21:10:57 +10:00
Jason Zhu faf44410bd Implemented PokemonTypes common component 2023-04-18 21:09:53 +10:00
Jason Zhu 3281629dcf Implemented search in the filter bar 2023-04-17 22:52:54 +10:00
Jason Zhu 10442f9dc8 Implemented pokedex list style 2023-04-17 22:34:18 +10:00
Jason Zhu 2857b1d131 Added react-lazy-load-image-component for lazy loading image in PokemonCard 2023-04-17 22:16:25 +10:00
Jason Zhu 3926267d77 Fixed setIsLoadingPokemons calling in fetchPokemonsInRegion 2023-04-17 19:13:28 +10:00
Jason Zhu c10c2f2608 Removed redundant cache clear code 2023-04-17 18:58:34 +10:00
Jason Zhu 00a8e7cba1 Transforms full Pokemon to pokemonCard in PokedexSlice to reduce store size 2023-04-17 18:43:29 +10:00
Jason Zhu 609b5621f1 Change number in PokemonCardProps to id 2023-04-17 00:26:13 +10:00
Jason Zhu 9338a70918 Renamed Pokemon component to PokemonCard 2023-04-17 00:14:29 +10:00
Jason Zhu 2d4426d84d Remove setPokemonList action, and replaced calling pokedexApi using regular fetch 2023-04-17 00:10:26 +10:00
Jason Zhu 91ead7f64f Modify pokedex.test.ts, clear up redundant code 2023-04-12 23:54:12 +10:00
Jason Zhu 8696392dce Implemented sortPokemonsByIdOrName and related unit tests 2023-04-12 23:44:13 +10:00
Jason Zhu 88fb450c5a Fixed pokedexApi.test.ts 2023-04-12 23:24:29 +10:00
Jason Zhu 92f7111943 Fixed filterPokemonByType problem by creating separate function and write unit tests 2023-04-12 23:23:52 +10:00
Jason Zhu fd21848a85 Implemented setTypeOptions and setSelectedType at correct place 2023-04-12 21:57:02 +10:00
Jason Zhu e2bbe1d959 Implemented filteredPokemonList feature 2023-04-11 19:50:59 +10:00
Jason Zhu 968c6c5d95 Added setTypeOptions in useEffect() 2023-04-11 18:46:48 +10:00
Jason Zhu 1801e43192 Recreate useGetRegionOptions and useGetSortOptions again for getting region and sort options in Filter.tsx 2023-04-11 18:33:34 +10:00
Jason Zhu 73fa644a55 initialize Filter by setSelectedRegion and fetchPokemonsInTheRegion 2023-04-11 18:12:38 +10:00
Jason Zhu 790c7828b1 Remove startAppListening import in pokedexSlice.ts 2023-04-11 17:33:28 +10:00
Jason Zhu 183ce62f30 Changed pokedex state variable name; And remove unnecessary listener middleware 2023-04-11 17:31:48 +10:00
Jason Zhu 81fcac97c6 Implement fetchPokemonsInTheRegion to get all pokemons from the region 2023-04-10 15:52:57 +10:00
Jason Zhu a09463a2b4 Implemented side effect of selectedRegion using app listener 2023-04-07 17:01:18 +10:00
Jason Zhu 83ae2f34d7 Change Redux code style by move all slice initialization process into pokedexSlice, Component are majorly for presentation 2023-04-06 23:57:05 +10:00
Jason Zhu fa4fb04efb Remove non-necessary addAppListener (dynamic plugin) 2023-04-05 21:37:57 +10:00
Jason Zhu 40358e3900 Created utils functions within Pokedex 2023-04-05 21:37:03 +10:00
Jason Zhu fed47e34b0 Fix importing from reduxjs/toolkit 2023-04-05 21:36:01 +10:00
Jason Zhu 63e3ce5fb6 Add setRegionPokemonIdsList in Filter 2023-04-05 21:34:53 +10:00
Jason Zhu 19c189c37d Setup typescripted listenerMiddleware 2023-04-04 23:12:22 +10:00
Jason Zhu f30edc9700 Move types with pokedexSlice into types/slice.ts 2023-04-02 23:51:23 +10:00
Jason Zhu 40049ef7b5 Remove unnecessary setRegionPokemonList endpoint 2023-04-02 23:50:22 +10:00
Jason Zhu 89b5b976e1 Removed getRegionPokemonList endpoint and related tests 2023-04-02 21:07:53 +10:00
Jason Zhu f4fd616b34 Steop using setRegionPokemonList, as now we link Region with Pokemon ID 2023-04-02 18:13:44 +10:00
Jason Zhu 5fee30437b Add TODO for removing unnecessary endpoints 2023-04-02 16:01:36 +10:00
Jason Zhu a831e76275 Add correct yarn test:watchAll command in package.json, and remove unnecessary App.test.tsx 2023-04-02 15:49:35 +10:00
Jason Zhu be0903bd93 Trying to use getRegionPokemonList endpoint for Loading screen 2023-03-31 21:58:03 +11:00
Jason Zhu 54bd031092 Implement getRegionPokemonList with queryFn and related test cases (fix) 2023-03-28 22:46:53 +11:00
Jason Zhu f4da542ecd Implement getRegionPokemonList with queryFn and related test cases 2023-03-28 22:44:00 +11:00
Jason Zhu 5c87c25620 Modify Filter so it send selectedRegion and selectedType to pokedexSlice 2023-03-27 23:49:12 +11:00
Jason Zhu 0b2de88f4a Show loading image when GetRegionListQuery and GetTypeListQuery is loading 2023-03-27 23:29:10 +11:00
Jason Zhu 9eb1f1f971 Consolidate types/interfaces for api 2023-03-27 23:18:34 +11:00
Jason Zhu 5d6c09642c Implemented pokeApiAllPagesCustomBaseQuery and jest tests 2023-03-27 22:52:15 +11:00
Jason Zhu 6849b97726 Implemented test for getTypeList, getRegionList endpoints 2023-03-26 22:26:15 +11:00
Jason Zhu 6aa1baa5fd Remove unncessary beforeAfter in jest, store was re-created for every test 2023-03-26 20:09:58 +11:00
Jason Zhu 00556e35d9 Installed msw for mocking server, add JEST tests for simple pokedexApi endpoints; Change lint-staged.config.js for json files 2023-03-26 18:39:04 +11:00
Jason Zhu 9ed782813d Fixed all .css files 2023-03-26 18:20:17 +11:00
Jason Zhu db682dc2a2 Move Loading screen into Pokedex.tsx 2023-03-26 15:56:51 +11:00
Jason Zhu 33b1f4f79c Configure Pokemon CSS correctly 2023-03-23 21:45:20 +11:00
Jason Zhu 3c91954e29 Implemented background image color of Pokemon Card 2023-03-23 21:21:46 +11:00
Jason Zhu 751704a8c2 Implemented jest test for Pokemon Card component (part 2): export formatNumber 2023-03-23 21:04:15 +11:00
Jason Zhu 9e48382026 Implemented jest test for Pokemon Card component 2023-03-23 21:03:36 +11:00
Jason Zhu 27df3a780a Implemented type color for Pokemon Card component 2023-03-23 20:49:31 +11:00
Jason Zhu 23b29ffccc Implement colorTypeGradients utility function 2023-03-23 20:34:09 +11:00
Jason Zhu 4c0f7f4d1c Implemented PokeTypeAsset in Pokemon Card component 2023-03-23 20:32:28 +11:00
Jason Zhu 0d6c393cbb Moved charizard.json into src/features/Pokedex/Pokemon/assets directory 2023-03-23 00:12:50 +11:00
Jason Zhu cf9e5d490d Moved poke types into src/features/Pokedex/Pokemon/assets directory 2023-03-23 00:12:29 +11:00
Jason Zhu 0b5a98d859 Implement first iteration of Pokemon.stories.tsx 2023-03-22 21:50:35 +11:00
Jason Zhu aee577aeef Installed storybook in the project 2023-03-22 21:16:47 +11:00
Jason Zhu a29c471a0b Implemented index.ts for small components 2023-03-22 20:32:04 +11:00
Jason Zhu af89068929 Implemented setSelectedType and setSelectedSort reducer in pokedexSlice, and getRegionList and getTypeList endpoints 2023-03-19 22:42:09 +11:00
Jason Zhu 452794f4e6 Created pokedexSlice and pokedexApi to perform getPokemonList 2023-03-19 16:53:07 +11:00
Jason Zhu e901a58105 Moved Filters.tsx into Pokedex feature folder 2023-03-19 15:53:49 +11:00
Jason Zhu 3139f53236 Added Pokedex component 2023-03-19 15:38:29 +11:00
Jason Zhu 4a8ad0256b Fixed abosolute path in App.tsx 2023-03-19 15:24:59 +11:00
Jason Zhu a867ce0001 Use Create-React-App absolute path feature 2023-03-19 15:17:58 +11:00
Jason Zhu bbaec4a027 Move Header.tsx into components directory 2023-03-19 13:16:17 +11:00
Jason Zhu 65f0b56a20 Fixed location of pokemon card location 2023-03-19 12:48:37 +11:00
Jason Zhu 610b501d9a Fixed import of charizard image for example 2023-03-18 23:52:12 +11:00
Jason Zhu 5ccfe5a986 Configured eslint and prettier to work on package.json 2023-03-18 22:52:01 +11:00
Jason Zhu 36929bcbcc Added all image assets 2023-03-18 22:29:13 +11:00
Jason Zhu 634b15d0a9 Added fonts for the Pokemon card 2023-03-05 21:59:29 +11:00
Jason Zhu 8edd8b1040 Added a sample static Pokemon card 2023-03-05 21:03:15 +11:00
Jason Zhu 3ccf4bdd61 Add background image, title, and filter bar 2023-03-03 18:51:39 +11:00
Jason Zhu b60cb3fd75 Edited App component with poke_logo 2023-03-03 17:43:16 +11:00
Jason Zhu ab886b1fb4 Initialize project using Create React App 2023-03-03 16:24:15 +11:00