Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
views.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
9 Jul 2016 at 14:28 UTC
Updated:
5 Feb 2024 at 12:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
hass commentedComment #3
cilefen commentedI do not see how we could remove a function because we do not know who may be using it. It could be deprecated to be removed before 9.x.
Comment #14
quietone commentedAdd template to the IS, There isn't anything functionally wrong here so changing to a task.
Comment #15
longwaveAgree with #14 :)
Comment #22
dimitriskr commentedComment #23
dimitriskr commentedComment #24
smustgrave commentedLets go ahead and assume the same on this one. Deprecate in 12
Will also need a deprecation message test.
Comment #25
dimitriskr commentedShould I put the deprecation test in
core/tests/Drupal/Tests/Component/Utility/UnicodeTest.phpor somewhere incore/modules/views_ui/tests/src?Comment #26
dimitriskr commentedComment #27
smustgrave commentedTest coverage is there and all instances appear to be replaced
Comment #28
quietone commentedI'm triaging RTBC issues. I read the IS, the comments and the MR. I didn't find any unanswered questions or other work to do.
I do have a question.
views_ui_truncateuses a 3 character string'...'when the input string is truncated but the \Drupal\Component\Utility\Unicode::truncate uses an ellipsis character,'…'. What are the ramifications of this behavior change? A before and after screenshot may be helpful here.Comment #29
smustgrave commentedUpdate
Comment #30
dimitriskr commentedVisually, there seems to be no difference on the ellipsis/3-character string at my browser (Firefox ESR 115.6.0esr (64-bit)) The behaviour changes a bit, regarding when to cut the string and add the ellipsis when using Unicode::truncate().
Given a string longer than 80 characters:
- views_ui_truncate() cuts the string at the 80th character and adds 3 more characters, making the string 83 characters long.
- Unicode::truncate() depends on what parameters you give it. If $wordsafe parameter is FALSE, it cuts the string at 79 chars and adds the ellipsis, making it in total of 80 chars long. If the parameter above is TRUE, it cuts it at the last word possible to be at max 80 chars long with the ellipsis, so it can happen that the final string won't be at 80 chars long
Comment #31
dimitriskr commentedComment #32
smustgrave commentedThanks, still LGTM then.
Comment #34
catchCommitted/pushed to 11.x (which will become 10.3.x), thanks!
Comment #35
dimitriskr commentedI've copied what I wrote in #30 to the CR, in order to better explain how Unicode::truncate behaves with its parameters
Comment #36
quietone commented@dimitriskr, thank you for updating the CR!
Comment #37
longwaveThe UI truncations seem a bit arbitrary and presumably date back to an ancient version of Views. To modernise this is it worth a followup to consider truncating in CSS instead which would respond to the available space and probably be more usable? Or perhaps just reconsidering the truncations altogether as screens are somewhat larger than they likely were when this was first written.
Comment #39
quietone commentedPublished the change record