Skip to content

Frontend : Fixed Activity-Component responsiveness#4473

Open
greedy-wudpeckr wants to merge 1 commit intokubernetes-sigs:mainfrom
greedy-wudpeckr:responsiveness
Open

Frontend : Fixed Activity-Component responsiveness#4473
greedy-wudpeckr wants to merge 1 commit intokubernetes-sigs:mainfrom
greedy-wudpeckr:responsiveness

Conversation

@greedy-wudpeckr
Copy link
Contributor

Summary

This PR fixes Activity Component Text Overflow on Small Screens

Related Issue

Fixes #4472

Screenshots (if applicable)

Before :
Screenshot 2026-01-28 at 11 23 58 PM

After :
Screenshot 2026-01-28 at 11 26 31 PM

Notes for the Reviewer

  • [e.g., This touches the i18n layer, so please check language consistency.]

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: greedy-wudpeckr
Once this PR has been reviewed and has the lgtm label, please assign joaquimrocha for approval. For more information see the Code Review Process.

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

Details 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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 28, 2026
@illume illume requested a review from Copilot January 28, 2026 20:44
Copy link
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

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

Interesting, thanks!

Can you please check the commit message guideline documentation? Have a look at the git log --oneline commit messages for examples.

The text looks a bit small. With the text overflow at least people can read all the text. It might be increasing the size of the boxes is better? If the text is cut off, there should be some way for users to read and copy the full string IMHO.

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

Fixes Activity component text overflow on small screens by applying responsive sizing and truncation styles in the overview tile, window header, and activity taskbar items.

Changes:

  • Made overview tile font/icon sizes responsive and added ellipsis truncation for long titles.
  • Added truncation + width constraints for header title and cluster label to prevent overflow.
  • Improved ActivityBar item truncation by adding minWidth: 0 and width/ellipsis styling for cluster/title lines.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
frontend/src/components/activity/Activity.tsx Adds responsive sizing and ellipsis truncation rules in overview/header/taskbar to prevent small-screen overflow.
frontend/src/components/activity/snapshots/Activity.Basic.stories.storyshot Updates storyshot snapshots to reflect new generated classnames from style changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@greedy-wudpeckr
Copy link
Contributor Author

greedy-wudpeckr commented Jan 28, 2026

@illume wt are your opinions on this ?

Screenshot 2026-01-29 at 2 26 50 AM

added hover tooltips ?

@illume
Copy link
Contributor

illume commented Jan 31, 2026

hrmm...

  • the text in the bubble should be at a similar size to the other text, so it's readable. Generally you want the body text to be the same size as other body text. Most of the text in headlamp defaults to a size that most people can read. It's also an a11y standard to have minimum sizes.
  • cutting off the text makes it less readable to the user than the original. Having a hover makes it readable to people who hover, but just looking at it without having to go to the extra effort of hovering is harder

Could you try to increase the size of the box the text lives in instead? I think vertical height increase would perhaps be better, because looking at the original bumping up the vertical size a bit would allow them both to fit.

@greedy-wudpeckr
Copy link
Contributor Author

greedy-wudpeckr commented Jan 31, 2026

hrmm...

  • the text in the bubble should be at a similar size to the other text, so it's readable. Generally you want the body text to be the same size as other body text. Most of the text in headlamp defaults to a size that most people can read. It's also an a11y standard to have minimum sizes.
  • cutting off the text makes it less readable to the user than the original. Having a hover makes it readable to people who hover, but just looking at it without having to go to the extra effort of hovering is harder

Could you try to increase the size of the box the text lives in instead? I think vertical height increase would perhaps be better, because looking at the original bumping up the vertical size a bit would allow them both to fit.

@illume any suggestion regarding the taskbar ? does it need to show the whole content or just oky with the one in the image ?

@greedy-wudpeckr
Copy link
Contributor Author

Screenshot 2026-02-01 at 2 01 36 AM

@illume Does this works ?

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 31, 2026
@greedy-wudpeckr greedy-wudpeckr force-pushed the responsiveness branch 2 times, most recently from b85c923 to 43975a6 Compare January 31, 2026 20:53
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 31, 2026
@illume
Copy link
Contributor

illume commented Feb 1, 2026

@greedy-wudpeckr I think the text should be the same size as in the "Before" screenshot.

Something to try: Maybe the Icon could be top left? Then the text could continue on the same line making good use of the space. It might cut off the text though and be more readable with the icon by itself. Edit: I think how you have the icon on the top row by itself means the text doesn't wrap as much making it more readable.

For the task bar, I think it's important to be able to read it without having to hover or such.
Maybe add one more row in height? Then perhaps it won't be so wide, and the full text could wrap.

@greedy-wudpeckr
Copy link
Contributor Author

@greedy-wudpeckr I think the text should be the same size as in the "Before" screenshot.

Something to try: Maybe the Icon could be top left? Then the text could continue on the same line making good use of the space. It might cut off the text though and be more readable with the icon by itself. Edit: I think how you have the icon on the top row by itself means the text doesn't wrap as much making it more readable.

For the task bar, I think it's important to be able to read it without having to hover or such. Maybe add one more row in height? Then perhaps it won't be so wide, and the full text could wrap.

Screenshot 2026-02-01 at 6 11 38 PM

i think we are sorted with taskbar , and for items do we need change in font size or this is okay ?

@illume
Copy link
Contributor

illume commented Feb 1, 2026

Try another variation of the task bar? Where the icons are on the same row as the cluster name? "docker-desktop". I expect this will allow the name of it have more space and to flow more.

The text is still smaller than other text I see in the background, and smaller than before. I believe the smallest text shown is the minimum size we should be showing text, according to accessibility and usability guidelines.

@greedy-wudpeckr
Copy link
Contributor Author

Try another variation of the task bar? Where the icons are on the same row as the cluster name? "docker-desktop". I expect this will allow the name of it have more space and to flow more.

The text is still smaller than other text I see in the background, and smaller than before. I believe the smallest text shown is the minimum size we should be showing text, according to accessibility and usability guidelines.

Screenshot 2026-02-01 at 11 00 17 PM

increased the font size little bit , and that task bar icon things , is this okay now ?

@illume
Copy link
Contributor

illume commented Feb 1, 2026

Nice one. Looking better. We can await feedback from others :)

In order to test this with different content, it can be good to create different storybook states.

For example:

  • very long cluster name
  • very long pod name
  • very long resource name (Pod is a very short resource name SomeAreVeryLongAndMightLookDifferent)
  • very short cluster name
  • very short pod name
  • some real world example values found on the internet

Then it can be quicker to see if your change works with all the states by quickly flicking through the states in storybook.

Signed-off-by: greedy-wudpeckr <mudituiet@gmail.com>
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 2, 2026
@greedy-wudpeckr
Copy link
Contributor Author

snapshots.mov

PTAL @illume

@illume
Copy link
Contributor

illume commented Feb 2, 2026

@greedy-wudpeckr good work adding all those states.

With all the states you can look through them to see how the implementation works, and fix any design inconsistencies.

For example, you can see that on some of them the left icon is in the middle, and on others it's at the top. (same with the cluster name).

I think next is to try to fix these inconsistencies, and try to make them render well in all the different states. When you're ready, I think it's a good time to ask for some design feedback on this in the headlamp slack channel.

@ashu8912 ashu8912 added this to the v0.41.0 milestone Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frontend : Activity Component Text Overflow on Small Screens

4 participants