Codex/fix small textfield height - #648
Closed
171h wants to merge 34 commits into
Closed
Conversation
Co-authored-by: 171h <40647432+171h@users.noreply.github.com>
Co-authored-by: 171h <40647432+171h@users.noreply.github.com>
Co-authored-by: 171h <40647432+171h@users.noreply.github.com>
Co-authored-by: 171h <40647432+171h@users.noreply.github.com>
Co-authored-by: 171h <40647432+171h@users.noreply.github.com>
Co-authored-by: 171h <40647432+171h@users.noreply.github.com>
Co-authored-by: 171h <40647432+171h@users.noreply.github.com>
Co-authored-by: 171h <40647432+171h@users.noreply.github.com>
…emos Co-authored-by: 171h <40647432+171h@users.noreply.github.com>
Co-authored-by: 171h <40647432+171h@users.noreply.github.com>
Co-authored-by: 171h <40647432+171h@users.noreply.github.com>
…elector Co-authored-by: 171h <40647432+171h@users.noreply.github.com>
Agent-Logs-Url: https://github.com/171h/vscode-elements/sessions/1a4fb700-5664-4059-b3aa-2fbf372cef97 Co-authored-by: 171h <40647432+171h@users.noreply.github.com>
This reverts commit 3ef5d3b.
This reverts commit 222038a.
### Motivation - Icon-only and icon-containing buttons did not visually change when the `size` attribute was toggled because the generated `vscode-icon` instances kept the default `16px` size. - Existing minimum dimensions for empty/icon-only buttons prevented small/large variants from rendering the expected heights, causing inconsistent appearance across `small`/`medium`/`large` sizes. ### Description - Pass a computed icon size into child icons so leading and trailing icons follow the button `size` (12 / 16 / 20px) by setting `.size` on `vscode-icon` in `vscode-button.render()` (file `src/vscode-button/vscode-button.ts`). - Add CSS minimum-dimension rules for empty and `icon-only` buttons per size to allow `small` and `large` icon buttons to reach their intended heights (`:host([size='small']:empty)` and `:host([size='large']:empty)` in `src/vscode-button/vscode-button.styles.ts`). - Add a unit test that exercises the three icon-button variants (leading icon, trailing icon, `icon-only`) and verifies button heights and `vscode-icon.size` after toggling `small`/`medium`/`large` (file `src/vscode-button/vscode-button.test.ts`). ### Testing - Ran the full test suite with `npm test` and all tests passed (423 passed, 25 skipped). - Ran the targeted button tests with `npm test -- --files dist/vscode-button/vscode-button.test.js` and the button test file passed (21 passed, 1 skipped). - Type-checking with `npx tsc --noEmit --incremental false` and formatting/lint checks with `npm run prettier` and `npm run lint` completed successfully (the lint run reports one pre-existing warning in an unrelated test file).
- use 14px icons in small buttons to match checkbox/radio and icon presets - keep small icon-only buttons square at 16x16px - use 11px font size for small textarea - fix size switcher buttons for radios inside the shadow root demo - reject invalid vscode-icon size values (NaN, non-numeric strings)
- remove small-size wrapper margins on checkbox/radio - shrink select combobox input and button at small size - add size property to vscode-label and shrink it at small size - document label and group container sizing
### Motivation
- 将发布包名从 `@vscode-elements/elements` 更改为 `nusys-ui`,以反映新的命名/品牌决策并确保文档与打包元数据一致。
### Description
- 在 `package.json` 中将 `name` 字段从 `@vscode-elements/elements` 更新为 `nusys-ui`。
- 同步更新 `package-lock.json` 根元数据中的 `name` 条目以匹配新的包名。
- 在 `README.md` 中将 `npm link @vscode-elements/elements` 等使用示例替换为 `nusys-ui`,并调整示例联动命令。
- 更新 `src/vscode-tree/vscode-tree.ts` 中的示例导入注释,将 `@vscode-elements/elements/...` 改为 `nusys-ui/...`。
- 已将更改提交到仓库(提交信息:`chore: rename package to nusys-ui`,提交哈希 `dc6b9fb`)。
### Testing
- `node -e "const p=require('./package.json'); const l=require('./package-lock.json'); if(p.name !== 'nusys-ui' || l.name !== p.name || l.packages[''].name !== p.name) process.exit(1); console.log(p.name)"` — 成功且输出 `nusys-ui`。
- `rg -n '@vscode-elements/elements' --glob '!node_modules' .` — 成功,未发现旧包名引用。
- `npm ci --ignore-scripts` — 成功安装依赖(注意输出中包含依赖性审计警告),命令完成。
- `npm run lint` — 成功完成,只有与本次修改无关的 ESLint 警告存在。
- `npm run prettier` — 成功,所有文件通过 Prettier 检查。
- `npm pack --dry-run` — 成功生成包预览并列出了 `nusys-ui-2.5.1.tgz` 的内容。
- `git diff --check` — 成功(未发现问题)。
Add component and icon size options to demos
Rename package to nusys-ui
Run npm releases from tag-triggered GitHub Actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.