Skip to content

Conversation

@mrleemurray
Copy link
Contributor

@mrleemurray mrleemurray commented Dec 12, 2025

Reduce the border radius for various inline edit components from 4px to 3px to achieve a more consistent design.

Addresses #272928

Copilot AI review requested due to automatic review settings December 12, 2025 15:09
@mrleemurray mrleemurray self-assigned this Dec 12, 2025
@mrleemurray mrleemurray added this to the December / January 2026 milestone Dec 12, 2025
@mrleemurray mrleemurray requested review from benibenj, hediet and ulugbekna and removed request for Copilot December 12, 2025 15:10
Copilot AI review requested due to automatic review settings December 12, 2025 16:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the border radius values across inline edit components to improve design consistency. The main approach is to introduce a shared constant (INLINE_EDITS_BORDER_RADIUS = 3) exported from theme.ts and a corresponding CSS variable (--inline-edit-border-radius: 3px) to replace hardcoded 4px values throughout the codebase.

Key changes:

  • Introduced a centralized border radius constant (3px) in TypeScript and CSS
  • Replaced hardcoded 4px border radius values with the new constant across 9 view files
  • Updated the stylelint configuration to recognize the new CSS variable

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css Defines CSS variable --inline-edit-border-radius: 3px and replaces hardcoded values in gutter indicator and character insert styles
src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.ts Exports INLINE_EDITS_BORDER_RADIUS = 3 constant for use in TypeScript files
src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.ts Changes border radius from 4 to 6 (inconsistent with other changes); splits padding into top/bottom only
src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.ts Replaces four instances of hardcoded '4px' with template string using INLINE_EDITS_BORDER_RADIUS
src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordInsertView.ts Replaces three instances of hardcoded '4px' with the new constant
src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.ts Assigns local BORDER_RADIUS constant to use INLINE_EDITS_BORDER_RADIUS
src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.ts Replaces four instances of border radius values with the new constant
src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.ts Assigns local BORDER_RADIUS constant to use INLINE_EDITS_BORDER_RADIUS
src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.ts Assigns local BORDER_RADIUS constant to use INLINE_EDITS_BORDER_RADIUS
src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.ts Replaces hardcoded '4px' with template string using INLINE_EDITS_BORDER_RADIUS
src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.ts Replaces two instances of hardcoded '4px' with the new constant
build/lib/stylelint/vscode-known-variables.json Registers --inline-edit-border-radius as a known CSS variable for stylelint validation

import { jumpToNextInlineEditId } from '../../../../controller/commandIds.js';

const BORDER_RADIUS = 4;
const BORDER_RADIUS = 6;
Copy link

Copilot AI Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change increases the border radius from 4 to 6, which is inconsistent with the PR's goal of reducing border radius to 3px for consistency. Consider changing this to use INLINE_EDITS_BORDER_RADIUS (which is 3) instead of hardcoding 6, or if this component intentionally needs a different border radius, add a comment explaining why it differs from the standard.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@benibenj benibenj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I extracted the border radius into a const so it's easier to tweak in the future. Also, I undid the padding change for the long distance preview editor. We can't just change the padding in the widget to be applied only vertically as these paddings are part of the layout computation. If you'd like to make that change you'll need to split previewEditorMargin into a horizontal and vertical constant.

@mrleemurray
Copy link
Contributor Author

@benibenj thanks for explaining - I will take a look at that later, it wasn't high priority & I don't want to break anything!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants