-
Notifications
You must be signed in to change notification settings - Fork 380
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
feat(react-scheduler): add mobile adaptability to the Scheduler #2497
Merged
AryamnovEugeniy
merged 11 commits into
DevExpress:master
from
AryamnovEugeniy:mobile-adaptability
Oct 30, 2019
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
67baa95
Initial
AryamnovEugeniy 0324306
Fix Navigation button
AryamnovEugeniy 04f3a68
Fix Open button
AryamnovEugeniy cb51723
Fix vertical view
AryamnovEugeniy 0f47ad1
Fix redux demo
AryamnovEugeniy 073c218
Fix form
AryamnovEugeniy 1b979c4
Refactor
AryamnovEugeniy 2ddba66
Apply suggestions from review
AryamnovEugeniy 498702f
Refactor
AryamnovEugeniy 223c33b
Apply suggestions
AryamnovEugeniy eb82b84
Refactor
AryamnovEugeniy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,33 @@ import DialogTitle from '@material-ui/core/DialogTitle'; | |
import Radio from '@material-ui/core/Radio'; | ||
import RadioGroup from '@material-ui/core/RadioGroup'; | ||
import FormControlLabel from '@material-ui/core/FormControlLabel'; | ||
import { withStyles } from '@material-ui/core/styles'; | ||
|
||
export const Layout = React.memo(({ | ||
const styles = ({ typography }) => ({ | ||
title: { | ||
...typography.h6, | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. title: typography.h6, |
||
content: { | ||
fontSize: '1rem', | ||
}, | ||
'@media (max-width: 500px)': { | ||
title: { | ||
fontSize: '1.1rem', | ||
}, | ||
content: { | ||
fontSize: '0.9rem', | ||
}, | ||
}, | ||
}); | ||
|
||
const LayoutBase = React.memo(({ | ||
buttonComponent: Button, | ||
handleClose, | ||
commit, | ||
availableOperations, | ||
getMessage, | ||
isDeleting, | ||
classes, | ||
...restProps | ||
}) => { | ||
const [currentValue, setCurrentValue] = React.useState(availableOperations[0].value); | ||
|
@@ -31,7 +50,9 @@ export const Layout = React.memo(({ | |
<div | ||
{...restProps} | ||
> | ||
<DialogTitle>{getMessage(isDeleting ? 'menuDeleteTitle' : 'menuEditTitle')}</DialogTitle> | ||
<DialogTitle className={classes.title} disableTypography> | ||
{getMessage(isDeleting ? 'menuDeleteTitle' : 'menuEditTitle')} | ||
</DialogTitle> | ||
<DialogContent> | ||
<RadioGroup | ||
value={currentValue} | ||
|
@@ -43,6 +64,7 @@ export const Layout = React.memo(({ | |
control={<Radio />} | ||
label={operation.title} | ||
key={operation.value} | ||
classes={{ label: classes.content }} | ||
/> | ||
))} | ||
</RadioGroup> | ||
|
@@ -55,18 +77,21 @@ export const Layout = React.memo(({ | |
); | ||
}); | ||
|
||
Layout.propTypes = { | ||
LayoutBase.propTypes = { | ||
buttonComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired, | ||
availableOperations: PropTypes.array.isRequired, | ||
handleClose: PropTypes.func, | ||
commit: PropTypes.func, | ||
getMessage: PropTypes.func, | ||
isDeleting: PropTypes.bool, | ||
classes: PropTypes.object.isRequired, | ||
}; | ||
|
||
Layout.defaultProps = { | ||
LayoutBase.defaultProps = { | ||
handleClose: () => undefined, | ||
commit: () => undefined, | ||
getMessage: () => undefined, | ||
isDeleting: false, | ||
}; | ||
|
||
export const Layout = withStyles(styles, { name: 'Layout' })(LayoutBase); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we just add a
text-overflow: elipsis
without change formating?