refactor(GetFonts): rename filters/filterManager to available/appliedFilterStore
The 'filters' + 'filterManager' pair didn't reveal the schema-vs-selection split. Rename to reflect the actual roles: - FiltersStore / filtersStore → AvailableFilterStore / availableFilterStore - createFilterManager / FilterManager → createAppliedFilterStore / AppliedFilterStore - filterManager singleton → appliedFilterStore - mapManagerToParams → mapAppliedFiltersToParams Directories and file basenames follow the new singleton names. Public barrel signature updated; all consumers (Search, FontSearch, Filters, FilterControls) point at the new identifiers.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<!--
|
||||
Component: Search
|
||||
Typeface search input for the comparison view.
|
||||
Writes through filterManager; the global bridge in $features/GetFonts
|
||||
Writes through appliedFilterStore; the global bridge in $features/GetFonts
|
||||
propagates the value into fontStore.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { filterManager } from '$features/GetFonts';
|
||||
import { appliedFilterStore } from '$features/GetFonts';
|
||||
import { SearchBar } from '$shared/ui';
|
||||
</script>
|
||||
|
||||
@@ -15,7 +15,7 @@ import { SearchBar } from '$shared/ui';
|
||||
class="w-full"
|
||||
placeholder="Typeface Search"
|
||||
aria-label="Search typefaces"
|
||||
bind:value={filterManager.queryValue}
|
||||
bind:value={appliedFilterStore.queryValue}
|
||||
fullWidth
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { filterManager } from '$features/GetFonts';
|
||||
import { appliedFilterStore } from '$features/GetFonts';
|
||||
import {
|
||||
render,
|
||||
screen,
|
||||
@@ -7,7 +7,7 @@ import Search from './Search.svelte';
|
||||
|
||||
describe('Search', () => {
|
||||
beforeEach(() => {
|
||||
filterManager.queryValue = '';
|
||||
appliedFilterStore.queryValue = '';
|
||||
});
|
||||
|
||||
describe('Rendering', () => {
|
||||
@@ -23,8 +23,8 @@ describe('Search', () => {
|
||||
});
|
||||
|
||||
describe('Value binding', () => {
|
||||
it('reflects filterManager.queryValue as initial value', () => {
|
||||
filterManager.queryValue = 'Inter';
|
||||
it('reflects appliedFilterStore.queryValue as initial value', () => {
|
||||
appliedFilterStore.queryValue = 'Inter';
|
||||
render(Search);
|
||||
expect(screen.getByRole('textbox')).toHaveValue('Inter');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user