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 overflow ensuring visibility and proper positioning of action buttons in WidgetHeader component #78

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

Ktbch
Copy link
Contributor

@Ktbch Ktbch commented Jun 24, 2024

Pull Request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Tests
  • Other (please describe):

What is the current behavior?

when the title attains a certain length it pushes the the action button out of the box which distort the UI and positioning of the action button

Issue Number: N/A

What is the new behavior?

it has been enhanced to hide the overflow of the truncated value when it has overflowed a certain fixed width.

Does this introduce a breaking change?

  • Yes
  • No

Other information

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@thrownullexception thrownullexception left a comment

Choose a reason for hiding this comment

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

Trimmed the CSS to just want works

@@ -35,13 +35,15 @@ export function WidgetHeader({

return (
<div className="flex justify-between items-start w-full">
<div className="flex flex-1 w-full gap-2">
<div className="flex flex-1 items-center overflow-hidden w-full gap-2">
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<div className="flex flex-1 items-center overflow-hidden w-full gap-2">
<div className="flex flex-1 overflow-hidden w-full gap-2">

{setting && (
<SortableKnob>
<GrabIcon width={18} />
</SortableKnob>
)}
<p className="truncate w-[calc(100%-1px)]">{title} TODO</p>
<p className="truncate max-w-[calc(100%-5px)] w-full ">
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<p className="truncate max-w-[calc(100%-5px)] w-full ">
<p className="truncate">

@thrownullexception thrownullexception merged commit b2b05af into dashpresshq:master Jun 25, 2024
0 of 3 checks passed
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