Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Applyfont-variation-settings to the suggestion widget (fix #199954)#200000

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

chengluyu
Copy link
Contributor

Hello, this is a very small change, which only modifies one line, to solve the issue raised in#199954.

The background of this PR is that, in my previous#153968, I added a new setting to support variable fonts. However, I recently found that the related setting has not been applied to the code completion list (orsuggestion widget, according to the source code). I have located the bug and raised this PR.

pa-0 reacted with thumbs up emojiNirmal4G reacted with rocket emojipa-0 reacted with eyes emoji
@eleanorjboyd
Copy link
Member

Congrats! You are the 200,000 issue on the VS Code repo! 🎉

chengluyu, bpasero, asedii, Tyriar, connor4312, andreamah, iliyian, and Nirmal4G reacted with laugh emoji

@chengluyuchengluyu changed the titleApplyfont-variation-settings to the suggestion widgetApplyfont-variation-settings to the suggestion widget (fixes #199954)Dec 5, 2023
@chengluyuchengluyu changed the titleApplyfont-variation-settings to the suggestion widget (fixes #199954)Applyfont-variation-settings to the suggestion widget (fix #199954)Dec 5, 2023
@Nirmal4G
Copy link

I'm hitting this. It's such a simple fix. Any reason, this is not merged yet?

pa-0 reacted with thumbs up emoji

Copy link

@SahilcrossmlSahilcrossml left a comment

Choose a reason for hiding this comment

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

🎯 Overall Assessment

  • Recommendation: APPROVE
  • Summary: This PR introduces a minor change to applyfont-variation-settings to the suggestion widget, addressing issue#199954. The change enhances the rendering of the suggestion widget by utilizing variable font settings, which were previously not applied.

📋 Code Changes Analysis

📁 src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.ts

Changes: 2 additions, 0 deletions

Old vs New Code Comparison:

// Old CodeconstfontFeatureSettings=fontInfo.fontFeatureSettings;// New CodeconstfontVariationSettings=fontInfo.fontVariationSettings;
// Old Codemain.style.fontFeatureSettings=fontFeatureSettings;// New Codemain.style.fontVariationSettings=fontVariationSettings;

Specific Issues Found:

  • Line 131: The addition ofconst fontVariationSettings = fontInfo.fontVariationSettings; is appropriate and correctly retrieves the variable font settings.
  • Line 145: The linemain.style.fontVariationSettings = fontVariationSettings; correctly applies the variable font settings to the suggestion widget.

Suggested Fixes: No fixes are necessary as the changes are correct and align with the intended functionality.

🔍 Detailed Findings

Critical Issues (if any)

  • None identified.

Moderate Issues (if any)

  • None identified.

Minor Suggestions (if any)

  • Consider adding a comment above the new lines to explain the purpose offontVariationSettings for future maintainers. For example:
// Retrieve and apply variable font settings for better typography supportconstfontVariationSettings=fontInfo.fontVariationSettings;main.style.fontVariationSettings=fontVariationSettings;

✅ Positive Aspects

  • The change is straightforward and effectively addresses the issue raised in#199954.
  • The code is clean and follows existing conventions.
  • The addition of variable font settings enhances the visual quality of the suggestion widget.

🚀 Recommendations

  • Ensure that the changes are tested across different variable fonts to confirm that the settings are applied correctly and that there are no regressions in the appearance of the suggestion widget.
  • Consider documenting the new setting in the project’s documentation to inform users about the support for variable fonts in the suggestion widget.

@jriekenjrieken added this to theJune 2025 milestoneJun 6, 2025
Copy link
Member

@jriekenjrieken left a comment

Choose a reason for hiding this comment

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

lgtm, tho I also wonder if suggest should just useICodeEditor#applyFontInfo so that all font tweaks are applied by default

Nirmal4G reacted with hooray emoji
@jriekenjrieken merged commitb3bc713 intomicrosoft:mainJun 6, 2025
7 checks passed
@siwenwang0803
Copy link

🤖 Secure-PR-Guard AI Code Review

Analysis completed at: 2025-06-28 20:38:55 UTC
PR:#200000

🟡 Risk Assessment:MEDIUM

  • Total Issues Found: 2
  • Security Issues: 0

🟢 Low Priority Issues

  • Line 135 (length): Line exceeds 120 characters with the addition of 'const fontVariationSettings = fontInfo.fontVariationSettings;'.
  • Line 149 (style): Missing semicolon at the end of the statement 'main.style.fontVariationSettings = fontVariationSettings'.

🔗Powered by Secure-PR-Guard | 🛡️OWASP LLM Top 10 Compliant

This is an automated review. Please verify critical security findings manually.

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

@SahilcrossmlSahilcrossmlSahilcrossml left review comments

@jriekenjriekenjrieken approved these changes

@lszomorulszomorulszomoru approved these changes

@Nirmal4GNirmal4GNirmal4G approved these changes

Assignees

@jriekenjrieken

Labels
None yet
Projects
None yet
Milestone
June 2025
Development

Successfully merging this pull request may close these issues.

7 participants
@chengluyu@eleanorjboyd@Nirmal4G@siwenwang0803@jrieken@lszomoru@Sahilcrossml

[8]ページ先頭

©2009-2025 Movatter.jp