diff --git a/README.md b/README.md index 140cbb805b..4f895a092c 100644 --- a/README.md +++ b/README.md @@ -96,8 +96,6 @@ Note: there is a test account you can use. Get this from another developer if yo - `HELPJUICE_KNOWLEDGE_BASE_URL` - Knowledge base page to make the Helpjuice "Visit Knowledge Base" page link to (example: `https://www.helpducks.org/mpdx`) - `HELPJUICE_PARENT_CATEGORY` - The numerical value for the parent category within Helpjuice to search (example: `434642`) - `HELPJUICE_CATEGORY_ID` - The numerical value for the category ID within Helpjuice which contains popular documents (example: `472031`) -- `HELP_WHATS_NEW_URL` - URL of a page explaining what is new in the new version of MPDX -- `HELP_WHATS_NEW_IMAGE_URL` - URL of an image for the What's New link - `HELP_URL_COACHING_ACTIVITY` - Link to an article explaining the coaching activity table - `HELP_URL_COACHING_APPOINTMENTS_AND_RESULTS` - Link to an article explaining the coaching appointments and results table - `HELP_URL_SETUP_FIND_ORGANIZATION` - Link to an article explaining how to find an organization diff --git a/next.config.ts b/next.config.ts index deb2e7b307..eb7379573c 100644 --- a/next.config.ts +++ b/next.config.ts @@ -77,8 +77,6 @@ const config: NextConfig = { process.env.HELPJUICE_PARENT_CATEGORY ?? '434642', HELPJUICE_CATEGORY_ID: process.env.HELPJUICE_CATEGORY_ID ?? '472031', HELP_URL_COACHING_ACTIVITY: process.env.HELP_URL_COACHING_ACTIVITY, - HELP_WHATS_NEW_URL: process.env.HELP_WHATS_NEW_URL, - HELP_WHATS_NEW_IMAGE_URL: process.env.HELP_WHATS_NEW_IMAGE_URL, HELP_URL_COACHING_APPOINTMENTS_AND_RESULTS: process.env.HELP_URL_COACHING_APPOINTMENTS_AND_RESULTS, HELP_URL_SETUP_FIND_ORGANIZATION: diff --git a/src/components/Layouts/Primary/NavBar/NavBar.test.tsx b/src/components/Layouts/Primary/NavBar/NavBar.test.tsx index 4d9ae11aa8..012dc341fe 100644 --- a/src/components/Layouts/Primary/NavBar/NavBar.test.tsx +++ b/src/components/Layouts/Primary/NavBar/NavBar.test.tsx @@ -56,27 +56,4 @@ describe('NavBar', () => { expect(queryByRole('link', { name: 'Dashboard' })).not.toBeInTheDocument(); }); - - describe("What's New link", () => { - it('is visible when HELP_WHATS_NEW_URL is set', () => { - process.env.HELP_WHATS_NEW_URL = '/new'; - process.env.HELP_WHATS_NEW_IMAGE_URL = '/img.png'; - - const { getByRole } = render(); - - expect( - getByRole('link', { name: "Help logo What's New" }), - ).toHaveAttribute('href', '/new'); - }); - - it('is hidden when HELP_WHATS_NEW_URL is not set', () => { - process.env.HELP_WHATS_NEW_URL = ''; - - const { queryByRole } = render(); - - expect( - queryByRole('link', { name: "Help logo What's New" }), - ).not.toBeInTheDocument(); - }); - }); }); diff --git a/src/components/Layouts/Primary/NavBar/NavBar.tsx b/src/components/Layouts/Primary/NavBar/NavBar.tsx index 38c3d5552f..1cfc26e9ce 100644 --- a/src/components/Layouts/Primary/NavBar/NavBar.tsx +++ b/src/components/Layouts/Primary/NavBar/NavBar.tsx @@ -66,7 +66,6 @@ function reduceChildRoutes({ icon: item.icon, key: item.title + depth, title: item.title, - whatsNewLink: item.whatsNewLink, }; if (item.items) { diff --git a/src/components/Layouts/Primary/NavBar/NavItem/NavItem.test.tsx b/src/components/Layouts/Primary/NavBar/NavItem/NavItem.test.tsx index 0a7d406a4a..daa49ae38a 100644 --- a/src/components/Layouts/Primary/NavBar/NavItem/NavItem.test.tsx +++ b/src/components/Layouts/Primary/NavBar/NavItem/NavItem.test.tsx @@ -22,16 +22,4 @@ describe('NavItem', () => { expect(getByText(title)).toBeInTheDocument(); }); - - it("renders What's New link", () => { - process.env.HELP_WHATS_NEW_IMAGE_URL = '/img.png'; - - const { getByRole } = render( - - - , - ); - - expect(getByRole('img')).toHaveAttribute('src', '/img.png'); - }); }); diff --git a/src/components/Layouts/Primary/NavBar/NavItem/NavItem.tsx b/src/components/Layouts/Primary/NavBar/NavItem/NavItem.tsx index f1c041f730..41427d91f8 100644 --- a/src/components/Layouts/Primary/NavBar/NavItem/NavItem.tsx +++ b/src/components/Layouts/Primary/NavBar/NavItem/NavItem.tsx @@ -17,7 +17,6 @@ interface NavItemProps { icon?: string; open?: boolean; title: string; - whatsNewLink?: boolean; } const StyledListItem = styled(ListItem)({ @@ -51,7 +50,6 @@ export const NavItem: FC = ({ icon, open: openProp, title, - whatsNewLink, ...rest }) => { const [open, setOpen] = useState(openProp ?? false); @@ -108,14 +106,6 @@ export const NavItem: FC = ({ {...rest} > {icon && } - {whatsNewLink && process.env.HELP_WHATS_NEW_IMAGE_URL && ( - {t('Help - )} {title} ); diff --git a/src/components/Layouts/Primary/TopBar/Items/NavMenu/NavMenu.test.tsx b/src/components/Layouts/Primary/TopBar/Items/NavMenu/NavMenu.test.tsx index 2c07f78ecb..49afcb1116 100644 --- a/src/components/Layouts/Primary/TopBar/Items/NavMenu/NavMenu.test.tsx +++ b/src/components/Layouts/Primary/TopBar/Items/NavMenu/NavMenu.test.tsx @@ -260,29 +260,6 @@ describe('NavMenu', () => { expect(queryByRole('menuitem')).toBeNull(); }); - describe("What's New link", () => { - it('is visible when HELP_WHATS_NEW_URL is set', () => { - process.env.HELP_WHATS_NEW_URL = '/new'; - process.env.HELP_WHATS_NEW_IMAGE_URL = '/img.png'; - - const { getByRole } = render(); - - expect( - getByRole('menuitem', { name: "Help logo What's New" }), - ).toHaveAttribute('href', '/new'); - }); - - it('is hidden when HELP_WHATS_NEW_URL is not set', () => { - process.env.HELP_WHATS_NEW_URL = ''; - - const { queryByRole } = render(); - - expect( - queryByRole('menuitem', { name: "Help logo What's New" }), - ).not.toBeInTheDocument(); - }); - }); - it('test current tool id hook', () => { const { getByTestId } = render( { - const { t } = useTranslation(); const accountListId = useAccountListId(); const { classes } = useStyles(); @@ -246,28 +244,6 @@ const NavMenu: React.FC = () => { )} - - {process.env.HELP_WHATS_NEW_URL && ( - - - {process.env.HELP_WHATS_NEW_IMAGE_URL && ( - {t('Help - )} - - - - )} ) : null; }; diff --git a/src/hooks/useNavPages.tsx b/src/hooks/useNavPages.tsx index 3c6edcfb62..de3a2f6ebc 100644 --- a/src/hooks/useNavPages.tsx +++ b/src/hooks/useNavPages.tsx @@ -41,7 +41,6 @@ export interface NavPage { pathname?: string; searchIcon?: ReactElement; items?: Item[]; - whatsNewLink?: boolean; showInNav?: boolean; showInSearchDialog?: boolean; showInPanel?: boolean; @@ -180,16 +179,6 @@ export function useNavPages(coachingAccountCount: boolean, isSearch = false) { }); } - if (process.env.HELP_WHATS_NEW_URL) { - navPages.push({ - id: 'whats-new-page', - title: t("What's New"), - href: process.env.HELP_WHATS_NEW_URL, - whatsNewLink: true, - showInNav: true, - }); - } - return navPages.filter((page) => !page.hideTab); }, [ accountListId,