Skip to content

Conversation

wingerx
Copy link
Contributor

@wingerx wingerx commented Sep 12, 2025

Summary

This PR fixes the ChipToggleButton display issue in GraphView component where Chinese text was being truncated by increasing the line height.

Changes

  • Updated ChipToggleButton component in frontend/src/components/resourceMap/GraphView.tsx to increase lineHeight from '1' to '2'
  • This ensures Chinese characters and other non-Latin scripts display completely without truncation

Steps to Test

  1. Navigate to the Resource Map view in Headlamp
  2. Switch the interface language to Chinese (中文)
  3. Check the ChipToggleButton components displaying "命名空间" (Namespace), "实例" (Instance), "节点" (Node), "状态:错误或警告" (Status: Error or Warning), and "全部展开" (Expand All)
  4. Verify that all Chinese text is fully visible without being cut off

Screenshots (if applicable)

Before: Chinese text was truncated in ChipToggleButton
image
image

After: Chinese text displays completely with proper spacing
image
image

Notes for the Reviewer

  • This is a minimal fix that only adjusts the line height to accommodate longer text in different languages
  • The change affects all ChipToggleButton instances in the GraphView component
  • Tested with Chinese translations but should benefit all languages with taller character heights

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 12, 2025
@wingerx wingerx changed the title fix the ChipToggleButton doesn't display Chinese text completely frontend: fix the ChipToggleButton doesn't display Chinese text completely Sep 12, 2025
Copy link
Contributor

@skoeva skoeva left a comment

Choose a reason for hiding this comment

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

nice catch! be sure to update the snapshots in the frontend using make frontend-test

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 15, 2025
Copy link
Contributor

@skoeva skoeva left a comment

Choose a reason for hiding this comment

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

nice! could you squash the commits? looks good otherwise

@wingerx wingerx marked this pull request as draft September 18, 2025 02:17
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 18, 2025
@wingerx wingerx marked this pull request as ready for review September 18, 2025 03:13
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 18, 2025
Copy link
Contributor

@skoeva skoeva left a comment

Choose a reason for hiding this comment

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

LGTM

@joaquimrocha
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 19, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: joaquimrocha, skoeva, wingerx

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 19, 2025
@k8s-ci-robot k8s-ci-robot merged commit 3240c78 into kubernetes-sigs:main Sep 19, 2025
12 checks passed
@wingerx wingerx deleted the fix_chipshow_zh branch September 19, 2025 14:11
@illume illume added this to the v0.36.0 milestone Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants