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

[SD-83] external redirects #1272

Merged
merged 2 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions examples/nuxt-app/test/features/search-listing/list.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ Feature: List layout
And the search network request should be called with the "/search-listing/list/request" fixture
And the search listing results count should read "Displaying 1-9 of 124 results"
And the search listing results should have following items:
| title | content | component |
| 2-BE-event-1 | The ingenious hero who travelled far and wide | tide-search-result |
| 5-BE-land-3 Landing Page | Outside thundered the approaching surf of war | tide-search-result |
| Accessibility - demo | Accessibility information about this website. | tide-search-result |
| title | content | url | component |
| 2-BE-event-1 | The ingenious hero who travelled far and wide | /2-be-event-1 | tide-search-result |
| 5-BE-land-3 Landing Page | Outside thundered the approaching surf of war | /5-be-land-3-landing-page-complete-test | tide-search-result |
| Accessibility - demo | Accessibility information about this website. | https://vic.gov.au/page | tide-search-result |

@mockserver
Example: A custom skeleton loader can be use for list result items
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@
"field_paragraph_body": [
"The Department of Premier and Cabinet, as owner of this website on behalf of the Victorian Government, is committed to providing a website that is accessible to the widest possible audience, regardless of technology or ability.  This website aims to meet level AA of the Web Content Accessibility Guidelines (WCAG) 2.1 World Wide Web Consortium (W3C) Web Content Accessibility Guidelines 2.0 . If there is information on this website that you can't access, or have any suggestions on how we can improve the accessibility of this website, please email us via  digital@dpc.vic.gov.au digital@dpc.vic.gov.au  or contact us by mail to: Department of Premier and Cabinet 1 Treasury Place East Melbourne VIC 3002 All constructive feedback regarding the accessibility or usability of this website is welcome and will be carefully considered. Assistance If you are a TTY user, phone 133 677 133 677 then ask for 1300 366 356 If you are a Speak and Listen user, phone 1300 555 727 1300 555 727 then ask for 1300 366 356 For SMS relay, use 0423 677 767 0423 677 767 If you are an internet relay user, visit the Internet Relay call page Make an Internet Relay call page and use this number: 1300 366 356"
],
"field_redirect_website": [
"https://vic.gov.au/page"
],
"field_tags": [
2095,
2096
Expand Down
6 changes: 6 additions & 0 deletions packages/ripple-tide-search/composables/useSearchResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ export default (result, options: ResultOptions = { summaryMaxLength: 150 }) => {
const { $app_origin } = useNuxtApp()
const title = computed(() => getSearchResultValue(result, 'title'))
const url = computed(() => {
const externalURL = getSearchResultValue(result, 'field_redirect_website')

if (externalURL) {
return externalURL
}

return stripSiteId(getSearchResultValue(result, 'url'), $app_origin || '')
})
const updated = computed(() => {
Expand Down
Loading