From 4ac9036196a7a94c4cbc6247009226ccb871ab44 Mon Sep 17 00:00:00 2001 From: John Harvey <10814889+john681611@users.noreply.github.com> Date: Tue, 4 Jul 2023 15:04:27 +0100 Subject: [PATCH 1/3] Improved Standard Section Heading (#315) --- .../frontend/src/pages/Standard/StandardSection.tsx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/application/frontend/src/pages/Standard/StandardSection.tsx b/application/frontend/src/pages/Standard/StandardSection.tsx index 71a0e8b9b..819e1f6c0 100644 --- a/application/frontend/src/pages/Standard/StandardSection.tsx +++ b/application/frontend/src/pages/Standard/StandardSection.tsx @@ -56,15 +56,8 @@ export const StandardSection = () => { return ( <>
-

- {id} - {version ? '-' + version : ''} -

-
- {getDocumentDisplayName(document) - .replace(document?.name, '') - .replace(document?.doctype, '') - .replace('::', '')} +
+ {getDocumentDisplayName(document)}
{document && document.hyperlink && ( <> From aba6d2b6c3b9038afd5aeede94c3412ec785c650 Mon Sep 17 00:00:00 2001 From: John Harvey <10814889+john681611@users.noreply.github.com> Date: Tue, 4 Jul 2023 15:04:59 +0100 Subject: [PATCH 2/3] Reference link for simple node views (#314) * Replaced: duplicate display name with "Which" * Added: Reference link to simple node views --- .../components/DocumentNode/DocumentNode.tsx | 19 ++++++++++++++++--- .../components/DocumentNode/documentNode.scss | 11 ++++++----- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/application/frontend/src/components/DocumentNode/DocumentNode.tsx b/application/frontend/src/components/DocumentNode/DocumentNode.tsx index 66c9f2c30..97ccb3306 100644 --- a/application/frontend/src/components/DocumentNode/DocumentNode.tsx +++ b/application/frontend/src/components/DocumentNode/DocumentNode.tsx @@ -18,6 +18,7 @@ import { getDocumentDisplayName, groupLinksByType } from '../../utils'; import { getApiEndpoint, getInternalUrl } from '../../utils/document'; import { FilterButton } from '../FilterButton/FilterButton'; import { LoadingAndErrorIndicator } from '../LoadingAndErrorIndicator'; +import { Icon } from 'semantic-ui-react'; export interface DocumentNode { node: Document; @@ -101,14 +102,27 @@ export const DocumentNode: FunctionComponent = ({ ); }; + + const HyperlinkIcon = (hyperlink) => { + if (!hyperlink.hyperlink) { + return <>; + } + + return ( + + + + ); + }; const SimpleView = () => { return ( <>
- {getDocumentDisplayName(usedNode)} + {getDocumentDisplayName(usedNode)} +
@@ -131,8 +145,7 @@ export const DocumentNode: FunctionComponent = ({
{idx > 0 &&
}
- {getDocumentDisplayName(usedNode)} - {DOCUMENT_TYPE_NAMES[type]}: + Which {DOCUMENT_TYPE_NAMES[type]}:
diff --git a/application/frontend/src/components/DocumentNode/documentNode.scss b/application/frontend/src/components/DocumentNode/documentNode.scss index 55cab702b..2fc8efe07 100644 --- a/application/frontend/src/components/DocumentNode/documentNode.scss +++ b/application/frontend/src/components/DocumentNode/documentNode.scss @@ -8,15 +8,19 @@ } .icon.external { - display: none; + color: #4183c4; font-size: 0.9em; padding-left: 0.5em; } +.external:hover::before { + color: #115c96; + padding: 1px; + } + .external-link, &.external-link { a { - display: flex; color: rgba(0, 0, 0, 0.4); } } @@ -26,9 +30,6 @@ a { color: rgba(0, 0, 0, 0.87); } - .icon.external { - display: inline-block; - } } &__link-type-container hr { From c81c0aaf7208a2d71d65e26615676eb984cea3a6 Mon Sep 17 00:00:00 2001 From: John Harvey <10814889+john681611@users.noreply.github.com> Date: Tue, 4 Jul 2023 15:05:33 +0100 Subject: [PATCH 3/3] Replaced: duplicate display name with "Which" (#313) --- .../CommonRequirementEnumeration.tsx | 3 +-- application/frontend/src/pages/Standard/StandardSection.tsx | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/application/frontend/src/pages/CommonRequirementEnumeration/CommonRequirementEnumeration.tsx b/application/frontend/src/pages/CommonRequirementEnumeration/CommonRequirementEnumeration.tsx index 17715d108..5f9a6b893 100644 --- a/application/frontend/src/pages/CommonRequirementEnumeration/CommonRequirementEnumeration.tsx +++ b/application/frontend/src/pages/CommonRequirementEnumeration/CommonRequirementEnumeration.tsx @@ -82,8 +82,7 @@ export const CommonRequirementEnumeration = () => { Object.entries(linksByType).map(([type, links]) => (
- {getDocumentDisplayName(display)} - {DOCUMENT_TYPE_NAMES[type]}: + Which {DOCUMENT_TYPE_NAMES[type]}:
{links.sort((a, b) => getDocumentDisplayName(a.document).localeCompare(getDocumentDisplayName(b.document))).map((link, i) => (
diff --git a/application/frontend/src/pages/Standard/StandardSection.tsx b/application/frontend/src/pages/Standard/StandardSection.tsx index 819e1f6c0..d27b46261 100644 --- a/application/frontend/src/pages/Standard/StandardSection.tsx +++ b/application/frontend/src/pages/Standard/StandardSection.tsx @@ -75,8 +75,7 @@ export const StandardSection = () => { Object.entries(linksByType).map(([type, links]) => (
- {getDocumentDisplayName(document)} - {DOCUMENT_TYPE_NAMES[type]}: + Which {DOCUMENT_TYPE_NAMES[type]}:
{links.sort((a, b) => getDocumentDisplayName(a.document).localeCompare(getDocumentDisplayName(b.document))).map((link, i) => (