• SlayTheDragons's avatar
    feat (frontend): Text size accessibility settings (As requested in issue #1482) (#1624) · cbf247a4
    SlayTheDragons 提交于
    <img width="496" height="470" alt="Screenshot 2025-10-24 200100"
    src="https://github.com/user-attachments/assets/e64ee081-dc08-4b54-94a6-9ed41453cfcf"
    />
    
    This PR adds settings for text size, small, medium (default), large and
    extra large.
    
    This should help more people use Dyad more productively.
    
    Closes #1482 
        
    
    
    
    
    
    
    <!-- This is an auto-generated description by cubic. -->
    ---
    ## Summary by cubic
    Adds adjustable workspace zoom levels (90%, 100%, 110%, 125%, 150%) to
    improve readability and accessibility. Changes apply instantly and
    persist per user, addressing issue #1482.
    
    - **New Features**
      - Zoom selector in Settings → General.
      - Persists zoomLevel in user settings and schema.
      - Applies zoom via Electron webFrame for consistent app scaling.
    
    - **Refactors**
      - Removed deprecated workspaceTextSize setting.
      - Removed root font-size from globals.css.
    
    <sup>Written for commit 54bad25f016a83e9f414025a07e80fdbad859366.
    Summary will update automatically on new commits.</sup>
    
    <!-- End of auto-generated description by cubic. -->
    
    
    
    
    
    
    
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > Adds adjustable app zoom levels (90–150%) with a Settings selector,
    persisted in user settings, and applied via Electron webFrame.
    > 
    > - **UI/Settings**:
    > - Add `ZoomSelector` component and surface it in `Settings → General`
    (`src/components/ZoomSelector.tsx`, `src/pages/settings.tsx`).
    > - **Schema/Persistence**:
    > - Introduce `ZoomLevelSchema` and optional `zoomLevel` in
    `UserSettingsSchema` (`src/lib/schemas.ts`).
    > - **Electron Integration**:
    > - Expose `webFrame.setZoomFactor/getZoomFactor` in `window.electron`
    (`src/preload.ts`).
    > - **App Behavior**:
    > - Apply zoom factor on load and when settings change with default
    `100%` (`src/app/layout.tsx`).
    > 
    > <sup>Written by [Cursor
    Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
    54bad25f016a83e9f414025a07e80fdbad859366. This will update automatically
    on new commits. Configure
    [here](https://cursor.com/dashboard?tab=bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    
    ---------
    Co-authored-by: 's avatarDevforschool <138079274+Devforschool@users.noreply.github.com>
    Co-authored-by: 's avatarWill Chen <willchen90@gmail.com>
    cbf247a4
名称
最后提交
最后更新
.cursor/rules 正在载入提交数据...
.devcontainer 正在载入提交数据...
.github 正在载入提交数据...
.husky 正在载入提交数据...
assets 正在载入提交数据...
docs 正在载入提交数据...
drizzle 正在载入提交数据...
e2e-tests 正在载入提交数据...
packages/@dyad-sh 正在载入提交数据...
scaffold 正在载入提交数据...
scripts 正在载入提交数据...
shared 正在载入提交数据...
src 正在载入提交数据...
testing 正在载入提交数据...
tools 正在载入提交数据...
worker 正在载入提交数据...
workers/tsc 正在载入提交数据...
.cursorignore 正在载入提交数据...
.env.example 正在载入提交数据...
.eslintrc.json 正在载入提交数据...
.gitattributes 正在载入提交数据...
.gitignore 正在载入提交数据...
.oxlintrc.json 正在载入提交数据...
.prettierignore 正在载入提交数据...
.prettierrc 正在载入提交数据...
AGENTS.md 正在载入提交数据...
CONTRIBUTING.md 正在载入提交数据...
LICENSE 正在载入提交数据...
README.md 正在载入提交数据...
SECURITY.md 正在载入提交数据...
biome.json 正在载入提交数据...
components.json 正在载入提交数据...
drizzle.config.ts 正在载入提交数据...
forge.config.ts 正在载入提交数据...
forge.env.d.ts 正在载入提交数据...
index.html 正在载入提交数据...
merge.config.ts 正在载入提交数据...
package-lock.json 正在载入提交数据...
package.json 正在载入提交数据...
playwright.config.ts 正在载入提交数据...
tsconfig.app.json 正在载入提交数据...
tsconfig.json 正在载入提交数据...
tsconfig.node.json 正在载入提交数据...
vite.main.config.mts 正在载入提交数据...
vite.preload.config.mts 正在载入提交数据...
vite.renderer.config.mts 正在载入提交数据...
vite.worker.config.mts 正在载入提交数据...
vitest.config.ts 正在载入提交数据...