Skip to content

Commit

Permalink
[docs-infra] Remove the design feedback alert (mui#39691)
Browse files Browse the repository at this point in the history
Co-authored-by: alexandre <[email protected]>
  • Loading branch information
danilo-leal and alexfauquette authored Nov 2, 2023
1 parent 272af96 commit c91ff01
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 40 deletions.
40 changes: 0 additions & 40 deletions docs/src/modules/components/ApiPage.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
/* eslint-disable material-ui/no-hardcoded-labels */
/* eslint-disable react/no-danger */
import * as React from 'react';
import PropTypes from 'prop-types';
import { exactProp } from '@mui/utils';
import Button from '@mui/material/Button';
import Typography from '@mui/material/Typography';
import Divider from '@mui/material/Divider';
import Alert from '@mui/material/Alert';
import AlertTitle from '@mui/material/AlertTitle';
import ReviewsRoundedIcon from '@mui/icons-material/ReviewsRounded';
import VerifiedRoundedIcon from '@mui/icons-material/VerifiedRounded';
import { alpha } from '@mui/material/styles';
import { useTranslate, useUserLanguage } from 'docs/src/modules/utils/i18n';
Expand Down Expand Up @@ -69,40 +65,6 @@ Heading.propTypes = {
level: PropTypes.string,
};

function DesignInfo() {
return (
<Alert
severity="info"
icon={<ReviewsRoundedIcon fontSize="small" color="primary" sx={{ marginTop: 0.3 }} />}
sx={[
(theme) => ({
mt: 4,
padding: '16px 20px',
gap: 1,
background: alpha(theme.palette.primary[50], 0.5),
border: '1px dashed',
borderColor: (theme.vars || theme).palette.divider,
...theme.applyDarkStyles({
background: alpha(theme.palette.primary[900], 0.2),
}),
}),
]}
>
<AlertTitle sx={{ fontWeight: (theme) => theme.typography.fontWeightSemiBold }}>
Have any feedback about this new API display design?
</AlertTitle>
<Typography>
We&apos;ve heard from you and iterated on making the design of API content documentation
more scalable and easier to parse! We value your input, so please don&apos;t hesitate to
share any additional feedback you may have.
</Typography>
<Button variant="outlined" data-feedback-hash="new-docs-api-feedback">
Share feedback
</Button>
</Alert>
);
}

export default function ApiPage(props) {
const { descriptions, disableAd = false, pageContent } = props;
const t = useTranslate();
Expand Down Expand Up @@ -373,8 +335,6 @@ export default function ApiPage(props) {
classDescriptions={classDescriptions}
spreadHint={t('api-docs.classesDescription')}
/>

<DesignInfo />
</MarkdownElement>
<svg style={{ display: 'none' }} xmlns="http://www.w3.org/2000/svg">
<symbol id="anchor-link-icon" viewBox="0 0 12 6">
Expand Down
3 changes: 3 additions & 0 deletions docs/src/modules/components/AppLayoutDocsFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ function usePageNeighbours() {
}

const EMPTY_SECTION = { hash: '', text: '' };

// The design feedback alert was removed in https://github.com/mui/material-ui/pull/39691
// This dead code is here to simplify the creation of special feedback channel
const SPEACIAL_FEEDBACK_HASH = [{ hash: 'new-docs-api-feedback', text: 'New API content design' }];

export default function AppLayoutDocsFooter(props) {
Expand Down
4 changes: 4 additions & 0 deletions netlify/functions/feedback-management.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const X_FEEBACKS_CHANNEL_ID = 'C04U3R2V9UK';
const JOY_FEEBACKS_CHANNEL_ID = 'C050VE13HDL';
const TOOLPAD_FEEBACKS_CHANNEL_ID = 'C050MHU703Z';
const CORE_FEEBACKS_CHANNEL_ID = 'C041SDSF32L';
// The design feedback alert was removed in https://github.com/mui/material-ui/pull/39691
// This dead code is here to simplify the creation of special feedback channel
const DESIGN_FEEDBACKS_CHANNEL_ID = 'C05HHSFH2QJ';

const getSlackChannelId = (url, specialCases) => {
Expand Down Expand Up @@ -143,6 +145,8 @@ exports.handler = async (event, context, callback) => {
githubRepo,
} = data;

// The design feedback alert was removed in https://github.com/mui/material-ui/pull/39691
// This dead code is here to simplify the creation of special feedback channel
const isDesignFeedback = inCommmentSectionURL.includes('#new-docs-api-feedback');
const commmentSectionURL = isDesignFeedback ? '' : inCommmentSectionURL;

Expand Down

0 comments on commit c91ff01

Please sign in to comment.