-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Description
- Adapt & abstract the tool store and actions
- create new
Config
interface with nested preset structure and all needed types - deprecate
ElementConfigType
imports in favor of the newConfig
type - use
PresetId
('a', 'b', 'c') as fixed keys for each preset - valtio store to have
configuration
to use new nested structure (button, widget, banner with presets) - save configuration tool action must send one preset on request
- fetch configuration tool action must work one preset on response
- separate stores for each tool,
- Notes:
- the retrieved tool configuration will be stored using localStorage, each tool in a different key, leaving the valtio store only for UI state updates.
- Remix Backend Updates
- update the save configuration function to handle one preset per tool at a time (based on tool type and preset ID).
- update Zod schemas for validation to match the new schema.
- update sanitization for the new properties.
- update the get configuration method to return a single preset at a time.
Notes:- GET: must return the default configuration if no saved presets exist for a given wallet address.
- PUT: must receive and save one preset into the bucket based on tool type and preset ID.
- Backwards compatibility
- save all presets in the new format.
- continue supporting the deprecated configuration type until all frontend components are updated.
- convert new preset schemas into the deprecated format when fetching, so components relying on the old type continue to work.
- Frontend component
- update all frontend components to consume the new configuration format.
- Create font size mapping utilities
- define semantic font size types
BannerFontSize
,WidgetFontSize
- create color and background type definitions
TextColor
,Background
, - update the fontSize UI component to replace
a
andA
buttons with min value and max value - create semantic-to-pixel mapping functions i.e. for banner and widget font sizes; with default sizes
- implement reverse mappings for UI components
- unit testing for all mapping functions
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
In Progress