Problem/Motivation
The "Summary length" option for Navigation Cards does not work as intended:
- When set to 0 the text fully disappears, despite the tooltip saying "Set to 0 for no limit."
- When set to a huge number, the text still gets cut off significantly earlier
Steps to reproduce
On any CivicTheme install,
1. Create a Navigation Card (for example in a Manual List) with a long Summary text
2. The text will be cut off after a while
3. Go to Appearance -> Settings -> CivicTheme -> Navigation Card and change "Summary length" to 0
4. The text will have completely dissapeared
5. Go to Appearance -> Settings -> CivicTheme -> Navigation Card and change "Summary length" to 10000
6. The text will still be cut at a convenient point (for example at the end of a phrase, in my case around 500 chars)
Proposed resolution
On the Slack channel, I was informed:
> It is not possible to disable this behaviour. This was done to make sure that the card always looks as per design and has some sensible limits.
Therefore, I suggest the tooltip text be changed to reflect this.
Expected behaviour
- The help text (tool tips) should accurately reflect the outcome of adding
0
Acceptance criteria
AC 1 - Navigation card
Given I'm a Site Admin
When I go to /admin/appearance/settings/[site-name]
And select Navigation card and observe the Summary length help text
Then it says Set the length of the Summary field: the content will be trimmed to this length and ellipsis will be added. Set to 0 fto never show a summary on the card.
AC 2 - Event card
Given I'm a Site Admin
When I go to /admin/appearance/settings/[site-name]
And select Event card and observe the Summary length help text
Then it says Set the length of the Summary field: the content will be trimmed to this length and ellipsis will be added. Set to 0 fto never show a summary on the card.
AC 3 - Promo card
Given I'm a Site Admin
When I go to /admin/appearance/settings/[site-name]
And select Promo card and observe the Summary length help text
Then it says Set the length of the Summary field: the content will be trimmed to this length and ellipsis will be added. Set to 0 fto never show a summary on the card.
AC 4 - Publication card
Given I'm a Site Admin
When I go to /admin/appearance/settings/[site-name]
And select Publication card and observe the Summary length help text
Then it says Set the length of the Summary field: the content will be trimmed to this length and ellipsis will be added. Set to 0 fto never show a summary on the card.
AC 5 - Snippet
Given I'm a Site Admin
When I go to /admin/appearance/settings/[site-name]
And select Snippet and observe the Summary length help text
Then it says Set the length of the Summary field: the content will be trimmed to this length and ellipsis will be added. Set to 0 fto never show a summary on the card.
Comments
Comment #2
fionamorrison23 commentedComment #3
fionamorrison23 commented@iulianrotaru I think the issue here is that the help text is incorrect. We will fix that. It should say
Set to 0 to never show a summary on navigation cards.The same issue is present on all the card types, so we'll update it across the board.
With regards to adding 1000 characters and being cut off around 500, I see that Drupal has a default cut off of 600 characters. I presume that's probably what you saw. We won't make any change to this as it's default Drupal behaviour. If anything, we'd limit it to a lower count.
Sorry it's taken so long to address this. Thanks for reporting it.
Comment #4
fionamorrison23 commentedComment #5
fionamorrison23 commentedComment #6
richardgaunt commentedComment #8
richardgaunt commentedComment #9
richardgaunt commented