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

[core] Batch small changes #20255

Merged
merged 9 commits into from
Mar 24, 2020
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
2 changes: 1 addition & 1 deletion docs/pages/api-docs/list-item-text.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi

| Name | Type | Default | Description |
|:-----|:-----|:--------|:------------|
| <span class="prop-name">children</span> | <span class="prop-type">node</span> | | Alias for the `primary` property. |
| <span class="prop-name">children</span> | <span class="prop-type">node</span> | | Alias for the `primary` prop. |
| <span class="prop-name">classes</span> | <span class="prop-type">object</span> | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. |
| <span class="prop-name">disableTypography</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the children won't be wrapped by a Typography component. This can be useful to render an alternative Typography variant by wrapping the `children` (or `primary`) text, and optional `secondary` text with the Typography component. |
| <span class="prop-name">inset</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the children will be indented. This should be used if there is no left avatar or left icon. |
Expand Down
14 changes: 0 additions & 14 deletions docs/pages/company/software-engineer.js

This file was deleted.

8 changes: 6 additions & 2 deletions docs/src/modules/components/AppContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ import clsx from 'clsx';
import { makeStyles } from '@material-ui/core/styles';
import Container from '@material-ui/core/Container';

const useStyles = makeStyles({
const useStyles = makeStyles((theme) => ({
root: {
paddingTop: 80 + 16,
[theme.breakpoints.up('lg')]: {
paddingLeft: theme.spacing(5),
paddingRight: theme.spacing(5),
},
},
});
}));

export default function AppContainer(props) {
const { className, ...other } = props;
Expand Down
2 changes: 2 additions & 0 deletions docs/src/modules/components/AppFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,13 @@ function AppFooter(props) {
Contact Us
</Link>
</li>
{/*
<li>
<Link color="inherit" variant="body2" href="/company/jobs/">
Jobs
</Link>
</li>
*/}
</ul>
</Grid>
</Grid>
Expand Down
5 changes: 3 additions & 2 deletions docs/src/modules/components/AppSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export default function AppSearch() {
const inputRef = React.useRef(null);
const theme = useTheme();
const userLanguage = useSelector((state) => state.options.userLanguage);
const t = useSelector((state) => state.options.t);

React.useEffect(() => {
const styleNode = loadCSS(
Expand Down Expand Up @@ -219,9 +220,9 @@ export default function AppSearch() {
</div>
<Input
disableUnderline
placeholder="Search…"
placeholder={`${t('algoliaSearch')}…`}
inputProps={{
'aria-label': 'Search',
'aria-label': t('algoliaSearch'),
}}
type="search"
id="docsearch-input"
Expand Down
5 changes: 3 additions & 2 deletions docs/src/modules/components/MarkdownElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,14 @@ const styles = (theme) => ({
},
},
'& code': {
lineHeight: 1.4,
display: 'inline-block',
fontFamily: 'Consolas, "Liberation Mono", Menlo, Courier, monospace',
WebkitFontSmoothing: 'subpixel-antialiased',
padding: '2px 6px',
padding: '0 3px',
color: theme.palette.text.primary,
backgroundColor:
theme.palette.type === 'light' ? 'rgba(255, 229, 100, 0.1)' : 'rgba(255, 229, 100, 0.2)',
theme.palette.type === 'light' ? 'rgba(255, 229, 100, 0.2)' : 'rgba(255, 229, 100, 0.2)',
fontSize: 14,
borderRadius: 2,
},
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/company/jobs/jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

<p class="description">Join our team!</p>

- [Senior Software Engineer](/company/software-engineer/) • Remote<br />
We are looking for a software engineer to help support our open source team, assist the Material-UI community and grow our premium products. Join us in our mission to make React application development fun by making it simple.
<!-- - [Senior Software Engineer](/company/software-engineer/) • Remote<br />
We are looking for a software engineer to help support our open source team, assist the Material-UI community and grow our premium products. Join us in our mission to make React application development fun by making it simple. -->
22 changes: 13 additions & 9 deletions docs/src/pages/components/modal/SimpleModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,28 @@ export default function SimpleModal() {
setOpen(false);
};

const body = (
<div style={modalStyle} className={classes.paper}>
<h2 id="simple-modal-title">Text in a modal</h2>
<p id="simple-modal-description">
Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
</p>
<SimpleModal />
</div>
);

return (
<div>
<button type="button" onClick={handleOpen}>
Open Modal
</button>
<Modal
aria-labelledby="simple-modal-title"
aria-describedby="simple-modal-description"
open={open}
onClose={handleClose}
aria-labelledby="simple-modal-title"
aria-describedby="simple-modal-description"
>
<div style={modalStyle} className={classes.paper}>
<h2 id="simple-modal-title">Text in a modal</h2>
<p id="simple-modal-description">
Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
</p>
<SimpleModal />
</div>
{body}
</Modal>
</div>
);
Expand Down
22 changes: 13 additions & 9 deletions docs/src/pages/components/modal/SimpleModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,28 @@ export default function SimpleModal() {
setOpen(false);
};

const body = (
<div style={modalStyle} className={classes.paper}>
<h2 id="simple-modal-title">Text in a modal</h2>
<p id="simple-modal-description">
Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
</p>
<SimpleModal />
</div>
);

return (
<div>
<button type="button" onClick={handleOpen}>
Open Modal
</button>
<Modal
aria-labelledby="simple-modal-title"
aria-describedby="simple-modal-description"
open={open}
onClose={handleClose}
aria-labelledby="simple-modal-title"
aria-describedby="simple-modal-description"
>
<div style={modalStyle} className={classes.paper}>
<h2 id="simple-modal-title">Text in a modal</h2>
<p id="simple-modal-description">
Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
</p>
<SimpleModal />
</div>
{body}
</Modal>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/landing/Quotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const quotes = [
'Material-UI continues to blow my mind how easily I can put together really aesthetic and functional components and minimize overhead.',
},
{
avatar: 'https://pbs.twimg.com/profile_images/1169043984561389568/pEdFvVIW_400x400.jpg',
avatar: 'https://pbs.twimg.com/profile_images/1231452795368329216/GhjrxYH2_400x400.jpg',
name: 'Derek Shanks',
username: '@fragileglass',
tweet: 'https://twitter.com/fragileglass/status/1205256087290753025',
Expand Down Expand Up @@ -129,8 +129,8 @@ const QuoteLink = React.forwardRef((props, ref) => {
data-ga-event-label="home-link"
target="_blank"
rel="noopener nofollow"
naked
ref={ref}
underline="none"
{...props}
/>
);
Expand Down
159 changes: 80 additions & 79 deletions docs/translations/translations.json
Original file line number Diff line number Diff line change
@@ -1,98 +1,99 @@
{
"homeQuickWord": "A quick word from our sponsors:",
"helpToTranslate": "Help to translate",
"editWebsiteColors": "Edit website colors",
"useDarkTheme": "Use dark theme",
"toggleTheme": "Toggle light/dark theme",
"toggleRTL": "Toggle right-to-left/left-to-right",
"toggleNotifications": "Toggle notifications panel",
"github": "GitHub repository",
"strapline": "React components for faster and easier web development. Build your own design system, or start with Material Design.",
"getStarted": "Get Started",
"installation": "Installation",
"installDescr": "Install Material-UI's source files via npm. We take care of injecting the CSS needed.",
"cdn": "or use a CDN.",
"loadFont": "Load the default Roboto font.",
"installButton": "Read installation docs",
"usage": "Usage",
"usageDescr": "Material-UI components work without any additional setup, and don't pollute the global scope.",
"usageButton": "Explore the docs",
"themes": "Premium themes",
"themesDescr": "Take your project to the next level with premium themes from our store – all built on Material-UI.",
"themesButton": "Browse themes",
"whosUsing": "Who's using Material-UI?",
"joinThese": "Join these and other great organisations!",
"usingMui": "Are you using Material-UI?",
"letUsKnow": "Let us know!",
"praise": "Praise for Material-UI",
"praiseDescr": "Here's what some of our users are saying.",
"footerCommunity": "Community",
"footerResources": "Resources",
"footerCompany": "Company",
"homeFooterRelease": "Currently {{versionNumber}}. Released under the {{license}}.",
"license": "MIT License",
"likeMui": "Help us keep running",
"adblock": "If you don't mind tech related ads (no tracking or remarketing), and want to keep us running, please whitelist Material-UI in your blocker.",
"thanks": "Thank you!",
"editPage": "Edit this page",
"tableOfContents": "Contents",
"sourceCode": "Source code",
"traffic": "Traffic",
"newest": "Newest",
"stars": "GitHub stars",
"visit": "Visit the website",
"dashboardTitle": "Dashboard",
"dashboardDescr": "A minimal dashboard with taskbar and mini variant draw. The chart is courtesy of Recharts, but it is simple to substitute an alternative.",
"signInTitle": "Sign In",
"signInDescr": "A simple Sign In page.",
"signInSideTitle": "Sign-in side",
"signInSideDescr": "A simple Sign In side page.",
"signUpTitle": "Sign Up",
"signUpDescr": "A simple Sign Up page.",
"blogTitle": "Blog",
"albumDescr": "A responsive album / gallery page layout with a hero unit and footer.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we avoid these in the future please? needless git blame indirection. otherwise add a lint rule to prevent regression.

Copy link
Member Author

@oliviertassinari oliviertassinari Mar 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering if they were some sort of prefixing structure in the translation keys, as I was about to add a new key. I have sorted ASC to figure this point out. It turns out, there is none.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not saying that sorting isn't useful. But it's easily forgotten and once every blue moon someone decides to update it 😆

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, it's rarely kept up to date.

"albumTitle": "Album",
"algoliaSearch": "Search",
"blogDescr": "A sophisticated blog page layout. Markdown support is courtesy of markdown-to-jsx but is easily replaced.",
"checkoutTitle": "Checkout",
"blogTitle": "Blog",
"cdn": "or use a CDN.",
"changeLanguage": "Change language",
"checkoutDescr": "A step-by-step checkout page layout. Adapt the number of steps to suit your needs, or make steps optional.",
"albumTitle": "Album",
"albumDescr": "A responsive album / gallery page layout with a hero unit and footer.",
"pricingTitle": "Pricing",
"pricingDescr": "Quickly build an effective pricing table for your potential customers with this page layout.",
"stickyFooterTitle": "Sticky footer",
"stickyFooterDescr": "Attach a footer to the bottom of the viewport when page content is short.",
"expandAll": "Expand all",
"showSource": "Show the source",
"hideSource": "Hide the source",
"showFullSource": "Show the full source",
"hideFullSource": "Hide the full source",
"viewGitHub": "View the source on GitHub",
"checkoutTitle": "Checkout",
"close": "Close",
"codesandbox": "Edit in CodeSandbox",
"seeMore": "See more",
"copySource": "Copy the source",
"copiedSource": "The source code has been copied.",
"copiedSourceLink": "Link to the source code has been copied.",
"copySource": "Copy the source",
"copySourceLinkJS": "Copy link to JavaScript source",
"copySourceLinkTS": "Copy link to TypeScript source",
"copiedSourceLink": "Link to the source code has been copied.",
"stackblitz": "Edit in StackBlitz (JS only)",
"headTitle": "Material-UI: A popular React UI framework",
"dashboardDescr": "A minimal dashboard with taskbar and mini variant draw. The chart is courtesy of Recharts, but it is simple to substitute an alternative.",
"dashboardTitle": "Dashboard",
"decreaseSpacing": "decrease spacing",
"demoToolbarLabel": "demo source",
"diamondSponsors": "Diamond Sponsors",
"editPage": "Edit this page",
"editWebsiteColors": "Edit website colors",
"emojiLove": "Love",
"emoojiWarning": "Warning",
"expandAll": "Expand all",
"footerCommunity": "Community",
"footerCompany": "Company",
"footerResources": "Resources",
"getProfessionalSupport": "Get Professional Support",
"getStarted": "Get Started",
"github": "GitHub repository",
"headTitle": "Material-UI: A popular React UI framework",
"helpToTranslate": "Help to translate",
"hideFullSource": "Hide the full source",
"hideSource": "Hide the source",
"homeFooterRelease": "Currently {{versionNumber}}. Released under the {{license}}.",
"homeQuickWord": "A quick word from our sponsors:",
"increaseSpacing": "increase spacing",
"installation": "Installation",
"installButton": "Read installation docs",
"installDescr": "Install Material-UI's source files via npm. We take care of injecting the CSS needed.",
"joinThese": "Join these and other great organisations!",
"letUsKnow": "Let us know!",
"license": "MIT License",
"likeMui": "Help us keep running",
"loadFont": "Load the default Roboto font.",
"mainNavigation": "Main navigation",
"skipToContent": "Skip to content",
"newest": "Newest",
"openDrawer": "Open main navigation",
"changeLanguage": "Change language",
"pageTOC": "Page table of contents",
"praise": "Praise for Material-UI",
"praiseDescr": "Here's what some of our users are saying.",
"pricingDescr": "Quickly build an effective pricing table for your potential customers with this page layout.",
"pricingTitle": "Pricing",
"resetDemo": "Reset demo",
"resetDensity": "Reset density",
"seeMore": "See more",
"showFullSource": "Show the full source",
"showJSSource": "Show JavaScript source",
"showSource": "Show the source",
"showTSSource": "Show TypeScript source",
"close": "Close",
"useHighDensity": "Apply higher density via props",
"signInDescr": "A simple Sign In page.",
"signInSideDescr": "A simple Sign In side page.",
"signInSideTitle": "Sign-in side",
"signInTitle": "Sign In",
"signUpDescr": "A simple Sign Up page.",
"signUpTitle": "Sign Up",
"skipToContent": "Skip to content",
"sourceCode": "Source code",
"spacingUnit": "Spacing unit",
"resetDensity": "Reset density",
"increaseSpacing": "increase spacing",
"decreaseSpacing": "decrease spacing",
"getProfessionalSupport": "Get Professional Support",
"diamondSponsors": "Diamond Sponsors",
"demoToolbarLabel": "demo source",
"resetDemo": "Reset demo",
"stackblitz": "Edit in StackBlitz (JS only)",
"stars": "GitHub stars",
"stickyFooterDescr": "Attach a footer to the bottom of the viewport when page content is short.",
"stickyFooterTitle": "Sticky footer",
"strapline": "React components for faster and easier web development. Build your own design system, or start with Material Design.",
"tableOfContents": "Contents",
"thanks": "Thank you!",
"themes": "Premium themes",
"themesButton": "Browse themes",
"themesDescr": "Take your project to the next level with premium themes from our store – all built on Material-UI.",
"toggleNotifications": "Toggle notifications panel",
"toggleRTL": "Toggle right-to-left/left-to-right",
"toggleTheme": "Toggle light/dark theme",
"traffic": "Traffic",
"usage": "Usage",
"usageButton": "Explore the docs",
"usageDescr": "Material-UI components work without any additional setup, and don't pollute the global scope.",
"useDarkTheme": "Use dark theme",
"useHighDensity": "Apply higher density via props",
"usingMui": "Are you using Material-UI?",
"viewGitHub": "View the source on GitHub",
"visit": "Visit the website",
"whosUsing": "Who's using Material-UI?",
"pages": {
"/getting-started": "Getting Started",
"/getting-started/installation": "Installation",
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/ListItemText/ListItemText.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface ListItemTextProps<
SecondaryTypographyComponent extends React.ElementType = 'p'
> extends StandardProps<React.HTMLAttributes<HTMLDivElement>, ListItemTextClassKey> {
/**
* Alias for the `primary` property.
* Alias for the `primary` prop.
*/
children?: React.ReactNode;
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/ListItemText/ListItemText.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ ListItemText.propTypes = {
// | To update them edit the d.ts file and run "yarn proptypes" |
// ----------------------------------------------------------------------
/**
* Alias for the `primary` property.
* Alias for the `primary` prop.
*/
children: PropTypes.node,
/**
Expand Down
Loading