Skip to content

Commit fab0f9b

Browse files
authored
Merge branch 'main' into feature/III-6977-notification-publication-delay
2 parents 42dacb8 + 519dad8 commit fab0f9b

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

src/hooks/useFeatureFlag.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const FeatureFlags = {
1717
REACT_DUPLICATE: 'react_duplicate',
1818
REACT_LABELS_CREATE_EDIT: 'react_labels_create_edit',
1919
SHOW_CONSOLE_DEBUGGING: 'show_console_debugging',
20+
SHOW_IFRAME_BORDER: 'show_iframe_border',
2021
REACT_ROLES_OVERVIEW: 'react_roles_overview',
2122
REACT_ROLES_CREATE_EDIT: 'react_roles_create_edit',
2223
REACT_USERS_SEARCH: 'react_users_search',

src/pages/[...params].page.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useRouter } from 'next/router';
33
import PropTypes from 'prop-types';
44
import { memo, useState } from 'react';
55

6+
import { FeatureFlags, useFeatureFlag } from '@/hooks/useFeatureFlag';
67
import {
78
useHandleWindowMessage,
89
WindowMessageTypes,
@@ -16,26 +17,31 @@ import { getApplicationServerSideProps } from '@/utils/getApplicationServerSideP
1617
const prefixWhenNotEmpty = (value, prefix) =>
1718
value ? `${prefix}${value}` : value;
1819

19-
const IFrame = memo(({ url }) => (
20+
const IFrame = memo(({ url, showBorder }) => (
2021
<Box
2122
id="fallback_frame"
2223
as="iframe"
2324
src={url}
2425
width="100%"
25-
height="100vh"
2626
flex={1}
27+
css={`
28+
${showBorder ? 'border: 2px solid red;' : ''}
29+
height: 100vh;
30+
`}
2731
/>
2832
));
2933

3034
IFrame.displayName = 'IFrame';
3135

3236
IFrame.propTypes = {
3337
url: PropTypes.string,
38+
showBorder: PropTypes.bool,
3439
};
3540

3641
const Fallback = () => {
3742
const router = useRouter();
3843
const { publicRuntimeConfig } = getConfig();
44+
const [showBorder] = useFeatureFlag(FeatureFlags.SHOW_IFRAME_BORDER);
3945

4046
// Keep track of which paths were not found. Do not store as a single boolean
4147
// for the current path, because it's possible to navigate from a 404 path to
@@ -61,7 +67,7 @@ const Fallback = () => {
6167
// and then the 404 logic does not get triggered because the listener is too
6268
// late to get the message from the AngularJS app.
6369
if (isClientSide) {
64-
return <IFrame url={legacyPath} />;
70+
return <IFrame url={legacyPath} showBorder={showBorder} />;
6571
}
6672

6773
return null;

src/pages/search/index.page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useState } from 'react';
44
import { TabContent } from 'react-bootstrap';
55
import { useTranslation } from 'react-i18next';
66

7+
import { FeatureFlags, useFeatureFlag } from '@/hooks/useFeatureFlag';
78
import {
89
useHandleWindowMessage,
910
WindowMessageTypes,
@@ -28,6 +29,7 @@ const Search = () => {
2829
const isClientSide = useIsClient();
2930
const { publicRuntimeConfig } = getConfig();
3031
const isOwnershipEnabled = publicRuntimeConfig.ownershipEnabled === 'true';
32+
const [showBorder] = useFeatureFlag(FeatureFlags.SHOW_IFRAME_BORDER);
3133

3234
const handleSelectTab = async (tabKey: Scope) =>
3335
router.push(
@@ -54,6 +56,7 @@ const Search = () => {
5456
width="100%"
5557
css={`
5658
overflow-y: auto;
59+
${showBorder ? 'border: 2px solid red;' : ''}
5760
`}
5861
>
5962
{isOwnershipEnabled && (

0 commit comments

Comments
 (0)