openkfw / TruBudget

A blockchain-based workflow tool for efficient and transparent project management
https://openkfw.github.io/trubudget-website/
GNU General Public License v3.0
83 stars 40 forks source link

Long workflow item titles break layout #1850

Closed jzakotnik closed 3 weeks ago

jzakotnik commented 1 month ago

In some cases the workflow titles are pretty long (e.g. copy pasted from respective workflow documents) - in this case it would be good to truncate the title at some good point and potentially leave it as tooltip.

jzakotnik commented 1 month ago

image

pmolnar-dev commented 1 month ago

@jzakotnik shouldn't we also restrict length of workflow item title when user is creating one? I am not sure what are the requirements and if it is necessary to have workflow title as long as you described in the picture

jzakotnik commented 1 month ago

@pmolnar-dev The use case was to take some workflows out of documents and have them in trubudget instead. In any case I believe that the title could be longer than what is rendered (in particular when responsive on mobile), so some trimming would be needed.

pmolnar-dev commented 1 month ago

@jzakotnik ye I would go for massive trim there and put whole title to tooltip maybe because what I see in the picture is not good at all

jzakotnik commented 1 month ago

Yes I agree. Actually I am not skilled enough in frontend dev, but would trim be dynamic based on the viewport?

pmolnar-dev commented 1 month ago

Trim is based on the width of the field itself so if the title field is perhaps 200px then it would not go more then that. In fact in this case it is percentage based that is why it is stretching vertically.

pmolnar-dev commented 4 weeks ago

@jzakotnik I would suggest something like this, text won't go pass 2 lines, so it won't break UI design and tooltip will be in place so user can see whole title if he wants.

Screenshot 2024-05-31 at 10 46 56
jzakotnik commented 3 weeks ago

@pmolnar-dev I think this looks good, thanks!