From 4f11771afba6a958439e6fd553e239a9c9a34a1d Mon Sep 17 00:00:00 2001 From: Artur Yapparov Date: Fri, 15 Sep 2023 10:06:54 +0300 Subject: [PATCH 1/2] add feedback link --- src/common/translations/en.js | 2 ++ src/components/top-bar/top-bar.js | 15 ++++++++++----- src/components/top-bar/top-bar.style.js | 10 +++++++++- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/common/translations/en.js b/src/common/translations/en.js index e2038d9..8438d34 100644 --- a/src/common/translations/en.js +++ b/src/common/translations/en.js @@ -64,6 +64,8 @@ const en = { 'exterior': 'Exterior', 'facility.levels': 'Facility Levels', 'facility.name': 'Facility name', + 'feedback': 'Feedback', + 'feedback.link': 'Feedback link', 'geography': 'Geography', 'file.name': 'File name', 'geography.europe': 'Europe', diff --git a/src/components/top-bar/top-bar.js b/src/components/top-bar/top-bar.js index 9a5f0d0..961e33e 100644 --- a/src/components/top-bar/top-bar.js +++ b/src/components/top-bar/top-bar.js @@ -1,16 +1,17 @@ import { useTranslation } from 'react-i18next'; -import { Icon } from '@fluentui/react/lib/Icon'; import { azMapsCreatorTextStyle, barStyle, docLink, + linksContainer, logoContainer, msftAzureTextStyle, splitterStyle, } from './top-bar.style'; const docsLink = 'https://learn.microsoft.com/en-us/azure/azure-maps/drawing-package-guide?pivots=drawing-package-v2'; +const feedbackLink = 'https://feedback.azure.com/d365community/post/fc834083-0925-ec11-b6e6-000d3a4f09d0?page=1&sort=newest'; const TopBar = () => { const { t } = useTranslation(); @@ -22,10 +23,14 @@ const TopBar = () => { Azure Maps Creator - - {t('docs')}  - - +
+ + {t('docs')} + + + {t('feedback')} + +
); }; diff --git a/src/components/top-bar/top-bar.style.js b/src/components/top-bar/top-bar.style.js index 82d956f..2d94fad 100644 --- a/src/components/top-bar/top-bar.style.js +++ b/src/components/top-bar/top-bar.style.js @@ -36,6 +36,14 @@ export const logoContainer = css` export const docLink = css` color: white; - margin: 0 1.25rem; text-decoration: none; + &:hover { + text-decoration: underline; + } +`; + +export const linksContainer = css` + display: flex; + gap: 1rem; + margin-right: 1.25rem; `; \ No newline at end of file From 97277b52dcdd28bca77fcec568c4265d3b276d70 Mon Sep 17 00:00:00 2001 From: Artur Yapparov Date: Fri, 15 Sep 2023 10:14:19 +0300 Subject: [PATCH 2/2] fixed failing snapshot --- .../__snapshots__/top-bar.test.js.snap | 96 +++++++++++++------ 1 file changed, 66 insertions(+), 30 deletions(-) diff --git a/src/components/top-bar/__snapshots__/top-bar.test.js.snap b/src/components/top-bar/__snapshots__/top-bar.test.js.snap index 0c2ce11..6525d7f 100644 --- a/src/components/top-bar/__snapshots__/top-bar.test.js.snap +++ b/src/components/top-bar/__snapshots__/top-bar.test.js.snap @@ -51,12 +51,25 @@ Object { } .emotion-5 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + gap: 1rem; + margin-right: 1.25rem; +} + +.emotion-6 { color: white; - margin: 0 1.25rem; -webkit-text-decoration: none; text-decoration: none; } +.emotion-6:hover { + -webkit-text-decoration: underline; + text-decoration: underline; +} +
- - docs -   - - + docs + + + feedback + +
, @@ -147,12 +165,25 @@ Object { } .emotion-5 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + gap: 1rem; + margin-right: 1.25rem; +} + +.emotion-6 { color: white; - margin: 0 1.25rem; -webkit-text-decoration: none; text-decoration: none; } +.emotion-6:hover { + -webkit-text-decoration: underline; + text-decoration: underline; +} +
- - docs -   - - + feedback + +
, "debug": [Function],