-
Notifications
You must be signed in to change notification settings - Fork 5
Remove the override releated links from service pages #291
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
Conversation
5a19c5b
to
91c2fee
Compare
Fix #72 This is a holdover from the old BHCC site, but the functionlity for automated links was never implemented in Localgov Drupal. This will remove this field for new sites, and will always render the releated links if they are present regardless.
91c2fee
to
480808c
Compare
Related links should now always show when present
@localgovdrupal/maintainers Does this need an update to remove it, or are we happy others removing it themselves? Councils might already have done? |
@willguv is adding this whole topics / related links to the content group / review functionality list. In the mean time, @ekes suggests we refactor this to just do the minimum to hide this from new installs:
|
@andybroomfield Let me just double-check a bit of logic here: If we leave this method in: localgov_services/modules/localgov_services_page/src/Plugin/Block/ServicesRelatedLinksBlock.php Line 123 in 4986458
sites that have got the field will continue to return either the links (TRUE) or an empty array (FALSE). Maybe we rename it We then also change the default return value to TRUE, and remove the field for new installs. They will get the desired default behaviour of showing the links if there are any. Then the line localgov_services/modules/localgov_services_page/src/Plugin/Block/ServicesRelatedLinksBlock.php Line 29 in 4986458
The rest of your patch remains, remove the field for new installs, remove the redundant commented out code. |
@andybroomfield sommat like that 50567a8 |
I think that should work @ekes, though for completeness do we need to add the methods |
They were |
I'm testing this now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and happy.
Confirmed that
- on an existing install, the behaviour is unaffected. Existing related links continue to work with the (odd) toggle switch.
- On a fresh install, the toggle is gone and the links display if they are present and not if they are not.
Added a related issue #297 where if no link text, the link displays blank, but we can deal with that separately.
Thanks for checking this @finnlewis Also thanks to @andybroomfield and @ekes for spotting this and fixing |
|
Note: add some release notes to explain how the original behaviour was broken and how this removes that. |
Fix #72
What does this change?
This is a holdover from the old BHCC site, but the functionality for automated links was never implemented in Localgov Drupal.
This will remove this field for new sites, and will always render the related links if they are present regardless.
How to test
Do a fresh install, create a service page.
There should no longer be a replace automatically generated related links.
When adding a related link, this will now show on a service page all the time.
Before, if the above was not checked, then related links would not display, since the auto generation function was never implemented in LGD.
How can we measure success?
Related links now work as an editor would expect.
Have we considered potential risks?
Some councils may be using this 'feature' to hide related links and not show them, we should check that.
Images
Accessibility
n/a