CATcher-org / CATcher

CATcher is a software application used for peer-testing of software projects.
https://catcher-org.github.io/CATcher/
MIT License
70 stars 68 forks source link

Fix title being cut off in issue-tables #1198

Closed seetohjinwei closed 1 year ago

seetohjinwei commented 1 year ago

Summary:

Fixes #1158

Changes Made:

image

Proposed Commit Message:

Fix title being cut off in issue-tables

Let's
* Replace the truncation of text by JavaScript with CSS instead.
* Reduces reliance on pre-determined `MAX_WORD_LENGTH`.

Alternate Fix

/* overflow-wrap: anywhere; */
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;

image

damithc commented 1 year ago

@seetohjinwei I think it is better to show the full title, just in case multiple issue have similar titles but differs only at the tail end. What do others think?

seetohjinwei commented 1 year ago

@seetohjinwei I think it is better to show the full title, just in case multiple issue have similar titles but differs only at the tail end. What do others think?

I think it makes sense to show the full title too!

If there are many issues, it would be convenient to be able to see the full title without any interaction (mousing over the title, or clicking into the page).

chia-yh commented 1 year ago

I also think showing the full title would be preferred, as useful information could be obscured otherwise.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -0.74% :warning:

Comparison is base (f4c136c) 54.63% compared to head (28844c4) 53.90%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1198 +/- ## ========================================== - Coverage 54.63% 53.90% -0.74% ========================================== Files 101 101 Lines 2888 2881 -7 Branches 535 534 -1 ========================================== - Hits 1578 1553 -25 - Misses 967 984 +17 - Partials 343 344 +1 ``` | [Files Changed](https://app.codecov.io/gh/CATcher-org/CATcher/pull/1198?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CATcher-org) | Coverage Δ | | |---|---|---| | [.../app/shared/issue-tables/issue-tables.component.ts](https://app.codecov.io/gh/CATcher-org/CATcher/pull/1198?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CATcher-org#diff-c3JjL2FwcC9zaGFyZWQvaXNzdWUtdGFibGVzL2lzc3VlLXRhYmxlcy5jb21wb25lbnQudHM=) | `14.13% <ø> (-23.25%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/CATcher-org/CATcher/pull/1198/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CATcher-org)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

gycgabriel commented 1 year ago

I think the current implementation is optimal:

image

We can still see if there are any words at the end, and long words themselves are truncated.

gycgabriel commented 1 year ago

@damithc @CATcher-org/2223s2 If there are no objections, we can put this on hold and give @seetohjinwei the credit.

damithc commented 1 year ago

I actually prefer this solution by @seetohjinwei :

Changes Made:

  • Fix title being cut off in issues table.

image

While long words or long titles are rare, it is better to show the full title when it happens. By hiding the tail end of a word or the title, we risk hiding critical information.