From 6267208024300eb070dbcf60ed88a1a99e3bed7c Mon Sep 17 00:00:00 2001
From: amy-corson-ibigroup
<115499534+amy-corson-ibigroup@users.noreply.github.com>
Date: Thu, 13 Apr 2023 16:36:11 -0500
Subject: [PATCH 1/6] Add icon for link that opens a new window
---
i18n/en-US.yml | 1 +
lib/components/admin/field-trip-details.js | 7 +++
lib/components/admin/field-trip-list.js | 9 ++-
lib/components/user/terms-of-use-pane.js | 17 ++++--
lib/components/util/externalLink.tsx | 64 ++++++++++++++++++++++
lib/components/viewers/route-details.js | 22 +++-----
6 files changed, 100 insertions(+), 20 deletions(-)
create mode 100644 lib/components/util/externalLink.tsx
diff --git a/i18n/en-US.yml b/i18n/en-US.yml
index 2cbfbe8ed..2a014600b 100644
--- a/i18n/en-US.yml
+++ b/i18n/en-US.yml
@@ -154,6 +154,7 @@ common:
tripDurationFormat: >-
{hours, plural, =0 {} other {# hr }}{minutes} min { seconds, plural, =0 {}
other {# sec}}
+ linkOpensNewWindow: "(Opens new window)"
components:
A11yPrefs:
accessibilityRoutingByDefault: Prefer accessible trips by default
diff --git a/lib/components/admin/field-trip-details.js b/lib/components/admin/field-trip-details.js
index 6d4aef155..01f6e54e6 100644
--- a/lib/components/admin/field-trip-details.js
+++ b/lib/components/admin/field-trip-details.js
@@ -42,6 +42,7 @@ import {
Text,
Val
} from './styled'
+import { NewWindowIconA11y } from '../util/externalLink'
import DraggableWindow from './draggable-window'
import EditableSection from './editable-section'
import FieldTripNotes from './field-trip-notes'
@@ -98,6 +99,9 @@ class FieldTripDetails extends Component {
const { request, sessionId } = this.props
const cancelled = request.status === 'cancelled'
const printFieldTripLink = `/#/printFieldTrip/?requestId=${request.id}&sessionId=${sessionId}`
+ const newWindowIconStyles = (
+
+ )
return (
Feedback link
+ {newWindowIconStyles}
-