Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix name overflow on deployed model card #3465

Merged

Conversation

ashley-o0o
Copy link
Contributor

@ashley-o0o ashley-o0o commented Nov 12, 2024

Closes: RHOAIENG-13078

Description

Fixes a bug where model names over 55+ characters overflow off of the deployed model card. It will now truncate at the end. It will also show a tooltip for names that are truncated.

How Has This Been Tested?

Tested locally

  1. Create a project
  2. Deploy a model via model serving with a name of 55+ characters
  3. Navigate to Data Science Projects > Project
  4. Scroll down to 'Serve Models' element
  5. Name should be truncated now

Test Impact

No new tests added

Screenshots

Before:
Screenshot 2024-11-12 at 12 57 44 PM
After:
Screenshot 2024-11-12 at 12 58 10 PM
Screenshot 2024-11-12 at 3 25 55 PM

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

Copy link
Contributor

openshift-ci bot commented Nov 12, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress This PR is in WIP state label Nov 12, 2024
@ashley-o0o ashley-o0o marked this pull request as ready for review November 12, 2024 18:05
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress This PR is in WIP state label Nov 12, 2024
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 85.66%. Comparing base (e85d7a1) to head (67f4f81).
Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
.../serverModels/deployedModels/DeployedModelCard.tsx 50.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3465   +/-   ##
=======================================
  Coverage   85.66%   85.66%           
=======================================
  Files        1347     1347           
  Lines       30670    30679    +9     
  Branches     8550     8554    +4     
=======================================
+ Hits        26272    26280    +8     
- Misses       4398     4399    +1     
Files with missing lines Coverage Δ
.../serverModels/deployedModels/DeployedModelCard.tsx 88.88% <50.00%> (-11.12%) ⬇️

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e85d7a1...67f4f81. Read the comment docs.

Copy link
Contributor

@jenny-s51 jenny-s51 left a comment

Choose a reason for hiding this comment

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

Truncated text is looking great here @ashley-o0o ! There's just a small bug that's preventing the tooltip from rendering when the text is hovered - we'll want use the same approach to wrapping the Truncate component with a Button as we currently do in ProjectCard :
Screenshot 2024-11-12 at 2 55 49 PM

Copy link
Contributor

@jenny-s51 jenny-s51 left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

openshift-ci bot commented Nov 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: jenny-s51

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

@openshift-merge-bot openshift-merge-bot bot merged commit 037ecd0 into opendatahub-io:main Nov 13, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants