Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes instances where we've feature flagged the new (current) design #2064

Merged
merged 5 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
560 changes: 189 additions & 371 deletions cms/templates/product_page.html

Large diffs are not rendered by default.

24 changes: 10 additions & 14 deletions frontend/public/src/components/AnonymousMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ import React from "react"

import MixedLink from "./MixedLink"
import { routes } from "../lib/urls"
import { checkFeatureFlag } from "../lib/util"

type Props = {
mobileView: boolean
}

const AnonymousMenu = ({ mobileView }: Props) => {
const identifierPostfix = mobileView ? "Mobile" : "Desktop"
const newDesign = checkFeatureFlag("mitxonline-new-header", "anonymousUser")
const makeNavLink = (text: string) => {
return mobileView ? (
<span data-bs-target="#nav" data-bs-toggle="collapse">
Expand All @@ -24,18 +22,16 @@ const AnonymousMenu = ({ mobileView }: Props) => {
}
return (
<ul>
{newDesign ? (
<li>
<MixedLink
id="catalog"
dest={routes.catalog}
className="top-nav-link"
aria-label="Catalog"
>
{makeNavLink("Catalog")}
</MixedLink>
</li>
) : null}
<li>
<MixedLink
id="catalog"
dest={routes.catalog}
className="top-nav-link"
aria-label="Catalog"
>
{makeNavLink("Catalog")}
</MixedLink>
</li>
<li>
<MixedLink
id={"login".concat(identifierPostfix)}
Expand Down
6 changes: 3 additions & 3 deletions frontend/public/src/components/AnonymousMenu_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe("AnonymousMenu component", () => {
assert.equal(
shallow(<AnonymousMenu mobileView={false} />)
.find("MixedLink")
.at(0)
.at(1)
.prop("dest"),
routes.login
)
Expand All @@ -21,7 +21,7 @@ describe("AnonymousMenu component", () => {
assert.equal(
shallow(<AnonymousMenu mobileView={false} />)
.find("MixedLink")
.at(1)
.at(2)
.prop("dest"),
routes.register.begin
)
Expand All @@ -31,7 +31,7 @@ describe("AnonymousMenu component", () => {
assert.equal(
shallow(<AnonymousMenu mobileView={true} />)
.find("MixedLink")
.at(1)
.at(2)
.prop("dest"),
routes.register.begin
)
Expand Down
Loading
Loading