Skip to content

FOUR-13980 Fix Case title overlaps task name in saved searches #6158

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

Merged
merged 5 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions resources/js/requests/components/RequestsListing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
:class="{ 'pm-table-truncate': header.truncate }"
:style="{ maxWidth: header.width + 'px' }"
>
<div v-html="sanitize(getNestedPropertyValue(row, header.field))"></div>
<span v-html="sanitize(getNestedPropertyValue(row, header.field))"></span>
</div>
<b-tooltip
v-if="header.truncate"
Expand Down Expand Up @@ -333,7 +333,7 @@ export default {
let htmlString = '';
for (const task of value) {
htmlString += `
<div>
<div class="text-truncate">
Copy link
Contributor

Choose a reason for hiding this comment

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

you could add this case on the savedsearch package
controller SavedSearchController.php
adjustColumns method

            case 'case_title':
                    $this->adjustCommonColumns($column, 200, 'case_title', null, 'true', 'true');
                    break;                    

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Amazing thanks for the suggestion I added the code to the SavedSearchController PR #410.

But this change is needed, when a request has two or more active tasks the active_tasks column it will show two or more lines, like the following:

image

As you could see in the previous image, the ellipsis does not appear becasue of the use of <div> to render multiple lines of tasks.

This line of code adds a text-trucate to each active task div of the request to add the ellipsis like:

image

<a class="text-nowrap" href="${this.openTask(task)}">
${task.element_name}
</a>
Expand Down
5 changes: 2 additions & 3 deletions resources/js/tasks/components/TasksList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
:id="`element-${rowIndex}-${colIndex}`"
:class="{ 'pm-table-truncate': header.truncate }"
:style="{ maxWidth: header.width + 'px' }"
>
<div v-html="sanitize(getNestedPropertyValue(row, header.field))"></div>
>
<span v-html="sanitize(getNestedPropertyValue(row, header.field))"></span>
</div>
<b-tooltip
v-if="header.truncate"
Expand Down Expand Up @@ -290,7 +290,6 @@ export default {
</a>`;
},
setupColumns() {
const columns = this.getColumns();
this.tableHeaders = this.getColumns();
},
getColumns() {
Expand Down