fix(web/filters): truncate too long name (#545)

* Fixed an issue where the div containing the filter name in the delete modal would overflow if the filter name is too long. Text inside the div is now contained and will word-break when too long.
* Fixed an issue where the filter name headline would break into a second line if the filter name is too long. In case the filter name is too long the filter name headline will now truncate and show it's full value at mouseover.
This commit is contained in:
xoaaC 2022-12-03 15:45:18 +01:00 committed by GitHub
parent 25a165b764
commit 2ae237015d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -50,8 +50,8 @@ export const DeleteModal: FC<DeleteModalProps> = ({ isOpen, buttonRef, toggle, d
<div className="bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4"> <div className="bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
<div className="sm:flex sm:items-start"> <div className="sm:flex sm:items-start">
<ExclamationTriangleIcon className="h-16 w-16 text-red-500 dark:text-red-500" aria-hidden="true" /> <ExclamationTriangleIcon className="h-16 w-16 text-red-500 dark:text-red-500" aria-hidden="true" />
<div className="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"> <div className="mt-3 text-center sm:mt-0 sm:ml-4 sm:pr-8 sm:text-left max-w-full">
<Dialog.Title as="h3" className="text-lg leading-6 font-medium text-gray-900 dark:text-white"> <Dialog.Title as="h3" className="text-lg leading-6 font-medium text-gray-900 dark:text-white break-words">
{title} {title}
</Dialog.Title> </Dialog.Title>
<div className="mt-2"> <div className="mt-2">

View file

@ -213,7 +213,7 @@ export default function FilterDetails() {
</NavLink> </NavLink>
</h1> </h1>
<ChevronRightIcon className="h-6 w-6 text-gray-500" aria-hidden="true" /> <ChevronRightIcon className="h-6 w-6 text-gray-500" aria-hidden="true" />
<h1 className="text-3xl font-bold text-black dark:text-white">{filter.name}</h1> <h1 className="text-3xl font-bold text-black dark:text-white truncate" title={filter.name}>{filter.name}</h1>
</div> </div>
</header> </header>
<div className="max-w-screen-xl mx-auto pb-12 px-4 sm:px-6 lg:px-8"> <div className="max-w-screen-xl mx-auto pb-12 px-4 sm:px-6 lg:px-8">