feature/comparison-slider #19

Merged
ilia merged 129 commits from feature/comparison-slider into main 2026-02-02 09:23:46 +00:00

129 Commits

Author SHA1 Message Date
Ilia Mashkov
778839d35e feat(Page): switch some sections
All checks were successful
Workflow / build (pull_request) Successful in 1m9s
2026-02-02 12:21:23 +03:00
Ilia Mashkov
92fb314615 feat(TypographyMenu): add comments and delete outdated code 2026-02-02 12:20:57 +03:00
Ilia Mashkov
6f0b69ff45 chore: incorporate renewed appliderFontStore and comparisonStore logic 2026-02-02 12:20:19 +03:00
Ilia Mashkov
2cd38797b9 feat(FontSearch): add IconButton instead of regular Button and delete unused code 2026-02-02 12:20:01 +03:00
Ilia Mashkov
6f231999e0 chore: add export/import and remove unused ones 2026-02-02 12:19:05 +03:00
Ilia Mashkov
31a72d90ea chore: incorporate renewed appliderFontStore and comparisonStore logic 2026-02-02 12:18:20 +03:00
Ilia Mashkov
072690270f chore(SearchBar): delete unused code and slightly tweak appearance 2026-02-02 12:16:51 +03:00
Ilia Mashkov
eaf9d069c5 feat(VirtualList): incoroprate new logic related to window scroll and separation of isVisible flag 2026-02-02 12:16:04 +03:00
Ilia Mashkov
4a94f7bd09 feat(FontListItem): separate isVisible flags into two (partial and fully) 2026-02-02 12:13:58 +03:00
Ilia Mashkov
918e792e41 fix(Layout): temporaly remove ScrollArea to fix virtual list 2026-02-02 12:13:07 +03:00
Ilia Mashkov
c9c8b9abfc feat(Section): add logic that triggers a callback when sections title moves out of the viewport 2026-02-02 12:11:48 +03:00
Ilia Mashkov
a392b575cc chore: migrate from direct <link> with css towards font-face approach 2026-02-02 12:10:38 +03:00
Ilia Mashkov
961475dea0 refactor(appliedFontsStore): migrate from direct <link> with css towards font-face approach 2026-02-02 12:10:12 +03:00
Ilia Mashkov
5496fd2680 chore: delete unused code 2026-02-02 12:09:16 +03:00
Ilia Mashkov
f90f1e39e0 feat(createVirtualizer): refine virtualizer logic, add useWindowScroll flag to use window scroll 2026-02-02 12:04:19 +03:00
Ilia Mashkov
ca161dfbd4 feat(ComparisonSlider): migrate from displayStore to comparisonStore 2026-02-02 12:02:33 +03:00
Ilia Mashkov
ac2d0c32a4 chore: add import/export 2026-02-02 12:00:58 +03:00
Ilia Mashkov
54d22d650d chore: add import/export 2026-02-02 12:00:19 +03:00
Ilia Mashkov
a9c63f2544 feat(Breadcrumb): create new entity that contains logic related to breadcrumb-like navigation 2026-02-02 11:59:57 +03:00
Ilia Mashkov
70f57283a8 feat(comparisonStore): replace displayStore with comparisonStore that has only the logic related to ComparisonSlider 2026-02-02 11:58:50 +03:00
Ilia Mashkov
d43c873dc9 feat(createPersistentStore): add a solution to keep user info between sections using browser storage 2026-02-02 11:57:00 +03:00
Ilia Mashkov
9501dbf281 chore: add import/export 2026-02-01 16:13:13 +03:00
Ilia Mashkov
0ac6acd174 feat(proxyFonts): add fetchFontsById function that fetches batch of fonts 2026-02-01 16:12:37 +03:00
Ilia Mashkov
5bb41c7e4c chore: comment typo 2026-02-01 11:58:22 +03:00
Ilia Mashkov
eed3339b0d feat(FontSearch): refactor component styles 2026-02-01 11:57:56 +03:00
Ilia Mashkov
d94e3cefb2 feat(SearchBar): move away from popover due to unnecessary complication and ux problems 2026-02-01 11:56:39 +03:00
Ilia Mashkov
cfb586f539 feat(SampleList): move font list display into widget layer 2026-02-01 11:55:46 +03:00
Ilia Mashkov
6e975e5f8e feat(VirtualList): add animate logic 2026-02-01 11:54:40 +03:00
Ilia Mashkov
142e4f0a19 feat(Page): display all components without conditions 2026-02-01 11:53:57 +03:00
Ilia Mashkov
59b85eead0 chore: remove unnecessary comments 2026-02-01 11:52:58 +03:00
Ilia Mashkov
010643e398 chore: add import/export 2026-02-01 11:52:32 +03:00
Ilia Mashkov
27f637531b feat(FontListItem): use children instead of the direct representation of the font 2026-02-01 11:52:09 +03:00
Ilia Mashkov
91fa08074b feat(VirtualList): incorporate shadcn scroll area to replace default scoll bar 2026-01-31 11:53:18 +03:00
Ilia Mashkov
c246f70fe9 feat(Labels): change the styles of the component 2026-01-31 11:48:58 +03:00
Ilia Mashkov
b1ce734f19 feat(VirtualList): VirtualList now supports pagination, it loads batches when user scrolls near the end of current batch 2026-01-31 11:48:14 +03:00
Ilia Mashkov
3add50a190 feat(VirtualList): add auto-pagination and correct scrollbar height
- Add 'total' prop to VirtualList for accurate scrollbar height in pagination scenarios
- Add 'onNearBottom' callback to trigger auto-loading when user scrolls near end
- Update FontVirtualList to forward the new props
- Implement auto-pagination in SuggestedFonts component (remove manual Load More button)
- Display loading indicator when fetching next batch
- Show accurate font count (e.g., "Showing 150 of 1920 fonts")

Key changes:
- VirtualList now uses total count for height calculation instead of items.length
- Auto-fetches next page when user scrolls within 5 items of the end
- Only fetches if hasMore is true and not already fetching
- Backward compatible: total defaults to items.length when not provided
2026-01-30 19:22:21 +03:00
Ilia Mashkov
ef48d9815c feat(Page): add Section wrappers to page widgets 2026-01-30 17:46:21 +03:00
Ilia Mashkov
818dfdb55e feat(Layout): increase bottom gap for TypographyMenu 2026-01-30 17:45:08 +03:00
Ilia Mashkov
42e1271647 feat(ContentEditable): add comments 2026-01-30 17:44:18 +03:00
Ilia Mashkov
8ef9226dd2 feat(IconButton): slightlyu change the style 2026-01-30 17:43:46 +03:00
Ilia Mashkov
f0c0a9de45 feat(ComparisonSlider): move in/out animation to Section component 2026-01-30 17:43:19 +03:00
Ilia Mashkov
730eba138d feat(FontSampler): refactor styles of FontSampler component 2026-01-30 17:42:06 +03:00
Ilia Mashkov
18f265974e chore: add import/export 2026-01-30 17:40:26 +03:00
Ilia Mashkov
705723b009 feat(Section): create a section wrapper for a page 2026-01-30 17:40:11 +03:00
Ilia Mashkov
75ea5ab382 chore: change dprint formatting 2026-01-30 01:09:39 +03:00
Ilia Mashkov
f07b699926 feat(FontDisplay): add animation on displayed fonts list order change 2026-01-30 00:56:58 +03:00
Ilia Mashkov
b031e560af feat(FontSampler): add delete button to remove font from the list of selected fonts, improve styling 2026-01-30 00:56:21 +03:00
Ilia Mashkov
fbaf596fef fix(createCharacterComparison): improve characters measurment for better magnifying presicion 2026-01-30 00:54:40 +03:00
Ilia Mashkov
1a2c44fb97 chore: add import/export 2026-01-30 00:53:06 +03:00
Ilia Mashkov
04602f0372 feat(ComboControl): use IconButton component 2026-01-30 00:52:42 +03:00
Ilia Mashkov
433fd2f7e6 feat(IconButton): create IconButton component to reuse styles for small buttons 2026-01-30 00:52:17 +03:00
Ilia Mashkov
87c4e04458 feat(controlManager): add getter for letter spacing value 2026-01-30 00:48:29 +03:00
Ilia Mashkov
fb843c87af chore: add import/export for letter spacing constant 2026-01-30 00:48:07 +03:00
Ilia Mashkov
b2af3683bc chore: change default font size 2026-01-30 00:47:44 +03:00
Ilia Mashkov
90f11d8d16 chore(Labels): formatting 2026-01-30 00:47:07 +03:00
Ilia Mashkov
a3f9bc12a0 feat(CharacterSlot): slightly increase magnifying effect 2026-01-30 00:46:43 +03:00
Ilia Mashkov
6634f6df1e feature(SliderLine): complete rework of the slider line, now it look like a magnifying glass 2026-01-30 00:45:45 +03:00
Ilia Mashkov
3f7ce63736 feat(FontListItem): slightly change badge styling 2026-01-30 00:44:01 +03:00
Ilia Mashkov
c665a579be chore: update gitignore 2026-01-30 00:43:16 +03:00
Ilia Mashkov
ac7f094d13 chore: delete unused code 2026-01-30 00:42:58 +03:00
Ilia Mashkov
c06aad1a8a fix: Correct dynamic import paths in fallback function
- Use  path aliases instead of relative paths
- Fixes module resolution errors when importing from other files
- Ensures fallback to Fontshare API works correctly
2026-01-29 15:23:59 +03:00
Ilia Mashkov
471e186e70 fix: Fix undefined query data and add fallback to Fontshare API
- Add gcTime parameter to TanStack Query config
- Add response validation in fetchFn with detailed logging
- Add fallback to Fontshare API when proxy fails
- Add USE_PROXY_API flag for easy switching
- Fix FontVirtualList generic type constraint
- Simplify font registration logic
- Add comprehensive console logging for debugging

Fixes: Query data cannot be undefined error
2026-01-29 15:20:51 +03:00
Ilia Mashkov
dc72b9e048 chore(fonts): Complete Proxy API Integration (All 7 Phases)
Summary of all phases implemented:

Phase 1 - Proxy API Client (Days 1-2)
✓ Created src/entities/Font/api/proxy/proxyFonts.ts
✓ Implemented fetchProxyFonts with pagination support
✓ Implemented fetchProxyFontById convenience function
✓ Added TypeScript interfaces: ProxyFontsParams, ProxyFontsResponse

Phase 2 - Unified Font Store (Days 3-4)
✓ Implemented UnifiedFontStore extending BaseFontStore
✓ Added pagination support with derived metadata
✓ Added provider-specific shortcuts (setProvider, setCategory, etc.)
✓ Added pagination methods (nextPage, prevPage, goToPage)
✓ Added category getter shortcuts (sansSerifFonts, serifFonts, etc.)

Phase 3 - Filter Mapper (Day 5)
✓ Updated mapManagerToParams to return Partial<ProxyFontsParams>
✓ Map providers array to single provider value
✓ Map categories array to single category value
✓ Map subsets array to single subset value

Phase 4 - UI Components (Days 6-7)
✓ Replaced fontshareStore with unifiedFontStore in FontSearch.svelte
✓ Replaced fontshareStore with unifiedFontStore in SuggestedFonts.svelte
✓ Updated entity exports to include unifiedFontStore
✓ Updated model exports to include unified store exports

Phase 5 - Integration Testing (Days 8-9)
✓ Verified type checking with no new errors
✓ Verified linting with no new issues
✓ All code compiles correctly

Phase 6 - Cleanup and Removal (Days 10-11)
✓ Deleted googleFontsStore.svelte.ts
✓ Deleted fontshareStore.svelte.ts
✓ Deleted fetchGoogleFonts.svelte.ts
✓ Deleted fetchFontshareFonts.svelte.ts
✓ Deleted services/index.ts
✓ Removed deprecated exports from Font entity
✓ Removed deprecated exports from model index

Phase 7 - Final Verification (Day 12)
✓ Type checking passes (7 pre-existing errors in shadcn)
✓ Linting passes (3 pre-existing warnings)
✓ No remaining references to old stores
✓ All code compiles correctly

Architecture Changes:
- Single unified font store replacing separate Google/Fontshare stores
- Proxy API handles provider aggregation and normalization
- Simplified parameter mapping to single values
- TanStack Query caching maintained
- Backward compatibility preserved for API functions

Benefits:
- Reduced code duplication
- Single source of truth for font data
- Easier to maintain and extend
- Provider-agnostic UI components
2026-01-29 14:48:00 +03:00
Ilia Mashkov
07a37af71a feat(fonts): implement Phase 6 - Cleanup and Removal
- Deleted src/entities/Font/model/store/googleFontsStore.svelte.ts
- Deleted src/entities/Font/model/store/fontshareStore.svelte.ts
- Deleted src/entities/Font/model/services/fetchGoogleFonts.svelte.ts
- Deleted src/entities/Font/model/services/fetchFontshareFonts.svelte.ts
- Deleted src/entities/Font/model/services/index.ts
- Updated Font entity exports to remove deprecated stores
- Updated model index exports to remove deprecated services
- Updated store index to only export unified store

Phase 6/7: Proxy API Integration for GlyphDiff
2026-01-29 14:47:03 +03:00
Ilia Mashkov
d6607e5705 feat(fonts): implement Phase 4 - Update UI Components
- Replaced fontshareStore with unifiedFontStore in FontSearch.svelte
- Replaced fontshareStore with unifiedFontStore in SuggestedFonts.svelte
- Updated Font entity exports to include unifiedFontStore
- Updated model exports to include unified store exports
- Kept fontshareStore exports as deprecated for backward compatibility

Phase 4/7: Proxy API Integration for GlyphDiff
2026-01-29 14:43:07 +03:00
Ilia Mashkov
10801a641a feat(fonts): implement Phase 3 - Update Filter Mapper
- Changed return type to Partial<ProxyFontsParams>
- Map providers array to single provider value (or undefined)
- Map categories array to single category value (or undefined)
- Map subsets array to single subset value (or undefined)
- Added type assertions for proper TypeScript compatibility

Phase 3/7: Proxy API Integration for GlyphDiff
2026-01-29 14:40:31 +03:00
Ilia Mashkov
98eab35615 fix(fonts): remove unused FontCategory import from unifiedFontStore 2026-01-29 14:38:33 +03:00
Ilia Mashkov
7fbeef68e2 feat(fonts): implement Phase 2 - Unified Font Store
- Implemented UnifiedFontStore extending BaseFontStore
- Added pagination support with derived metadata
- Added provider-specific shortcuts (setProvider, setCategory, etc.)
- Added pagination methods (nextPage, prevPage, goToPage)
- Added category getter shortcuts (sansSerifFonts, serifFonts, etc.)
- Updated store exports to include unified store
- Fixed typo in googleFontsStore.svelte.ts (createGoogleFontsStore)

Phase 2/7: Proxy API Integration for GlyphDiff
2026-01-29 14:38:07 +03:00
Ilia Mashkov
7078cb6f8c feat(fonts): implement Phase 1 - Create Proxy API Client
- Created src/entities/Font/api/proxy/proxyFonts.ts
- Implemented fetchProxyFonts function with full pagination support
- Implemented fetchProxyFontById convenience function
- Added TypeScript interfaces: ProxyFontsParams, ProxyFontsResponse
- Added comprehensive JSDoc documentation
- Updated src/entities/Font/api/index.ts to export proxy API

Phase 1/7: Proxy API Integration for GlyphDiff
2026-01-29 14:33:12 +03:00
Ilia Mashkov
0b0489fa26 chore(ExpandableWrapper): add ts-ignore to stories 2026-01-26 13:08:56 +03:00
Ilia Mashkov
2022213921 feat(displayedFontsStore): fix store to work with fontA and fontB to compare 2026-01-26 12:56:35 +03:00
Ilia Mashkov
6725a3b391 feat(Layout): increase container width 2026-01-26 12:55:52 +03:00
Ilia Mashkov
2eddb656a9 chore(FontComparer): delete unused code 2026-01-26 12:55:27 +03:00
Ilia Mashkov
5973d241aa feat(Page): render ComparisonSlider directly 2026-01-26 12:54:40 +03:00
Ilia Mashkov
75a9c16070 feat(ComparisonWrapper): remove props and add checks for fonts absence 2026-01-26 12:54:01 +03:00
Ilia Mashkov
31e4c64193 chore(ComparisonSlider): add comments 2026-01-26 12:52:40 +03:00
Ilia Mashkov
48e25fffa7 feat(ExpandableWrapper): fix keyboard support, tweak styles and animation 2026-01-26 12:52:23 +03:00
Ilia Mashkov
407c741349 feat(ComparisonSlider): add blur background to controls 2026-01-26 12:49:15 +03:00
Ilia Mashkov
13e114fafe feat(TypographyMenu): add appearance/disappearance animation 2026-01-26 12:47:10 +03:00
Ilia Mashkov
1484ea024e chore(ComparisonSlider): add comments and remove unused code 2026-01-26 12:46:12 +03:00
Ilia Mashkov
67db6e22a7 feat(ComparisonSlider): rewrite slider labels to include selects for compared fonts 2026-01-26 12:45:30 +03:00
Ilia Mashkov
192ce2d34a feat(select): add shadcn select component 2026-01-26 12:43:25 +03:00
Ilia Mashkov
2b820230bc feat(createCharacterComparison): add generic for font type and checks for the absence of the fonts 2026-01-26 12:34:27 +03:00
Ilia Mashkov
9b8ebed1c3 fix(breakIntoLines): add word break for long words 2026-01-25 11:42:05 +03:00
Ilia Mashkov
3d11f7317d feat(ExpandableWrapper): add stories 2026-01-25 08:23:11 +03:00
Ilia Mashkov
c07800cc96 chore: add export 2026-01-25 00:00:13 +03:00
Ilia Mashkov
b49bf0d397 feat(ScrollArea): add shadcn scroll area to layout 2026-01-24 23:58:10 +03:00
Ilia Mashkov
ed4ee8bb44 chore(ControlsWrapper): use new reusable wrapper 2026-01-24 23:57:16 +03:00
Ilia Mashkov
8a2059ac4a feat(ExtendableWrapper): create reusable extendable wrapper with animations 2026-01-24 23:56:26 +03:00
Ilia Mashkov
7ffc5d6a34 feat(Page): move search to page 2026-01-24 15:39:38 +03:00
Ilia Mashkov
08cccc5ede chore: add export 2026-01-24 15:39:10 +03:00
Ilia Mashkov
71266f8b22 chore(TypographyMenu): remove search from typography menu 2026-01-24 15:38:50 +03:00
Ilia Mashkov
d5221ad449 feat(SearchBar): improve styling 2026-01-24 15:38:01 +03:00
Ilia Mashkov
873b697e8c feat(ComboControl): Add tooltips and enhance intraction effects 2026-01-24 15:37:06 +03:00
Ilia Mashkov
3dce409034 feat(SetupFontMenu): add props 2026-01-24 15:36:13 +03:00
Ilia Mashkov
cf08f7adfa chore(FontSearch): move to widgets layer 2026-01-24 15:35:26 +03:00
Ilia Mashkov
4b01b1592d feat(ControlsWrapper): close ControlsWrapper on escape click 2026-01-24 15:34:17 +03:00
Ilia Mashkov
ecb4bea642 feat(FlterControls): enhance control with ux effects 2026-01-24 15:33:12 +03:00
Ilia Mashkov
e89c6369cb feat(Layout): add tooltip provider 2026-01-24 15:32:01 +03:00
Ilia Mashkov
18a311c6b1 chore: delete filters sidebar 2026-01-24 15:30:02 +03:00
Ilia Mashkov
732f77f504 feat(CheckboxFilter): use new transition function springySlideFade 2026-01-24 15:25:56 +03:00
Ilia Mashkov
b7992ca138 feat(app): add common animaition for ux elements that can interact with 2026-01-24 15:22:57 +03:00
Ilia Mashkov
32b1367877 feat(springySliderFade): add custom transition function for slide+fade 2026-01-24 15:16:04 +03:00
Ilia Mashkov
59b0d9c620 feat(FontListItem): refactor component to enhance UX with animations and move away from checkboxes to avoid scroll problems 2026-01-22 15:41:55 +03:00
Ilia Mashkov
be13a5c8a0 feat(VirtualList): add proximity and isVisible props 2026-01-22 15:40:37 +03:00
Ilia Mashkov
80efa49ad0 feat(SuggestedFonts): add proximity and isVisible props 2026-01-22 15:40:17 +03:00
Ilia Mashkov
7e9675be80 feat(createVirtualizer): add isVisible and proximity properties to VirtualItem, add filckering prevention check 2026-01-22 15:39:29 +03:00
Ilia Mashkov
ac979c816c feat(FontComparer): add apperance animation for ComparisonSlider 2026-01-22 15:37:49 +03:00
Ilia Mashkov
272c2c2d22 chore: delete unused code 2026-01-22 15:37:03 +03:00
Ilia Mashkov
a9e2898945 feat(typographyControl): add letter spacing control 2026-01-22 15:36:30 +03:00
Ilia Mashkov
1712134f64 feat(SearchBar): enhance searchbar styling 2026-01-22 15:35:18 +03:00
Ilia Mashkov
52111ee941 fix(ControlsWrapper): slight tweak in styles 2026-01-22 15:34:14 +03:00
Ilia Mashkov
e4970e43ba chore: switch to use of svelte native prefersReducedMotion media 2026-01-22 15:33:38 +03:00
Ilia Mashkov
b41c48da67 feat(app): change main font 2026-01-22 15:31:59 +03:00
Ilia Mashkov
1d0ca31262 chore: input path change 2026-01-21 21:57:04 +03:00
Ilia Mashkov
a5380333eb feat(createCharacterComparison): add support for font size change 2026-01-21 21:56:34 +03:00
Ilia Mashkov
46de3c6e87 chore(createTypographyControl): make some props optional 2026-01-21 21:54:48 +03:00
Ilia Mashkov
91300bdc25 feat(ComparisonSlider): Massively improve the slider and move it to the widgets layer 2026-01-21 21:52:55 +03:00
Ilia Mashkov
2ee66316f7 chore(controlManager): rewrite controlManager to classes 2026-01-21 21:51:22 +03:00
Ilia Mashkov
c6d20aae3d feat(ComboControlV2): crete ComboControlV2 - without increase/decrease buttons. Refresh styling of the original one 2026-01-21 21:50:30 +03:00
Ilia Mashkov
a0f184665d feat(ComparisonSlider): Improve Comparison slider's readability, incapsulate some code into separate components and snippets 2026-01-20 14:23:58 +03:00
Ilia Mashkov
d4d2d68d9a feat(appliedFontsStore): incorporate implemented font weight logic 2026-01-20 14:21:07 +03:00
Ilia Mashkov
55a560b785 feat(appliedFontsStore): implement the logic to update font link when font weight changes 2026-01-20 14:17:41 +03:00
Ilia Mashkov
c2542026a4 feat(FontComparer): create FontComparer component that loads fonts and displays ComparisonSlider 2026-01-20 09:40:42 +03:00
Ilia Mashkov
3f8fd357d8 feat(displayedFontStore): add logic for font pairs calculation 2026-01-20 09:39:30 +03:00
Ilia Mashkov
1bd2a4f2f8 fix(fontshareStore): add normalization to reduce amount of requests 2026-01-20 09:36:39 +03:00
Ilia Mashkov
746a377038 feat(FontVirtualList): add font pairs support 2026-01-20 09:35:44 +03:00
Ilia Mashkov
1b76284237 feat(PairSelector): implement PairSelector component that allows to choose the pair of fonts to compare 2026-01-20 09:33:57 +03:00
Ilia Mashkov
b5ad3249ae feat(ComparisonSlider): create reusable comparison slider that compare two fonts for the same text. Line breaking is supported 2026-01-20 09:32:12 +03:00