Skip to content
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

QOLSVC-8587 fix non-truncated titles #49

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

ThrawnCA
Copy link
Contributor

Adding a custom label function caused long titles not to be truncated.

It isn't worth trying to recreate Jinja truncation within our helper function, so just apply it regardless of the custom function's presence.

@ThrawnCA ThrawnCA requested a review from a team December 13, 2024 05:31
@ThrawnCA
Copy link
Contributor Author

Raised ckan/ckan#8585 to address this upstream.

{% set label = label_function(name, item) if label_function else item.display_name %}
{% set label_truncated = label|truncate(22) if not label_function else label %}
{% set label_truncated = label|truncate(22) %}
Copy link
Member

Choose a reason for hiding this comment

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

did we have to 'hack' the side bar to split the data sources??

has ckan 2.10 or 2.11 made this easier to not need to do the split?

also what exactly are we needing to add/update/remove when compared to ckan core or our theme?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From

def custom_label_function(facet_field, facet_item):
it appears that our custom label function exists to convert the dataset types (dataset and geoscience) into domain names (data.qld.gov.au and geoscience.data.qld.gov.au).

@ThrawnCA ThrawnCA merged commit c908a82 into develop Dec 16, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants