Skip to content

Commit

Permalink
[core] Close 2022 developer survey
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jan 6, 2023
1 parent 985a21f commit 612db95
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 31 deletions.
7 changes: 1 addition & 6 deletions docs/notifications.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@
"text": "Migrate to the latest version for improved DX, customizability, and API consistency. Check out the <a style=\"color: inherit;\" data-ga-event-category=\"Blog\" data-ga-event-action=\"notification\" data-ga-event-label=\"date-pickers-stable-v5\" href=\"/blog/date-pickers-stable-v5/\">blog post</a> for details."
},
{
"id": 71,
"id": 72,
"title": "<b>A major update is coming for MUI X—and you can get involved</b>",
"text": "Check out the <a style=\"color: inherit;\" data-ga-event-category=\"Blog\" data-ga-event-action=\"notification\" data-ga-event-label=\"mui-x-v6-alpha-zero\" href=\"/blog/mui-x-v6-alpha-zero/\">blog post</a> for details, and let us know what you want to see in MUI X v6."
},
{
"id": 72,
"title": "<b>The MUI Developer survey is live!</b>",
"text": "Please take a few minutes to complete <a style=\"color: inherit;\" data-ga-event-category=\"Survey\" data-ga-event-action=\"notification\" data-ga-event-label=\"mui-developer-survey-2022\" href=\"https://www.surveymonkey.com/r/mui-developer-survey-2022?source=notification_docs\">the survey</a> and help us shape the roadmap for 2023."
}
]
50 changes: 27 additions & 23 deletions docs/src/components/banner/AppHeaderBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import Link from 'docs/src/modules/components/Link';
import ROUTES from 'docs/src/route';
import FEATURE_TOGGLE from 'docs/src/featureToggle';

const getSurveyMessage = () => (
<React.Fragment>
function getSurveyMessage() {
return (
<React.Fragment>
🚀&nbsp;Influence the future of MUI!&nbsp;&nbsp;Please take a few minutes for the&nbsp;
<Link
href="https://www.surveymonkey.com/r/mui-developer-survey-2022?source=website"
Expand All @@ -21,30 +22,33 @@ const getSurveyMessage = () => (
MUI Developer survey 2022 →
</Link>
</React.Fragment>
);
);
}

const getDefaultHiringMessage = () => (
<React.Fragment>
🚀&#160;&#160;We&apos;re hiring a Designer, Full-stack Engineer, React Support Engineer, and
more!&nbsp;&#160;
<Link
href={ROUTES.careers} // Fix me!
target="_blank"
color="inherit"
underline="always"
sx={{
'&:hover': {
opacity: 0.9,
},
}}
>
Check the careers page →
</Link>
</React.Fragment>
);
function getDefaultHiringMessage() {
return (
<React.Fragment>
🚀&#160;&#160;We&apos;re hiring a Designer, Full-stack Engineer, React Support Engineer, and
more!&nbsp;&#160;
<Link
href={ROUTES.careers} // Fix me!
target="_blank"
color="inherit"
underline="always"
sx={{
'&:hover': {
opacity: 0.9,
},
}}
>
Check the careers page →
</Link>
</React.Fragment>
);
}

export default function AppHeaderBanner() {
const showSurveyMessage = true;
const showSurveyMessage = false;
const bannerMessage = showSurveyMessage ? getSurveyMessage() : getDefaultHiringMessage();

return FEATURE_TOGGLE.enable_website_banner ? (
Expand Down
2 changes: 1 addition & 1 deletion docs/src/featureToggle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// need to use commonjs export so that @mui/markdown can use
module.exports = {
enable_website_banner: true,
enable_website_banner: false,
enable_toc_banner: true,
enable_docsnav_banner: false,
};
2 changes: 1 addition & 1 deletion docs/src/modules/components/AppTableOfContents.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const shouldShowJobAd = () => {
export default function AppTableOfContents(props) {
const { toc } = props;
const t = useTranslate();
const showSurveyBanner = true;
const showSurveyBanner = false;
const showAddJob = shouldShowJobAd() && !showSurveyBanner;

const items = React.useMemo(() => flatten(toc), [toc]);
Expand Down

0 comments on commit 612db95

Please sign in to comment.