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

updated material-ui and dialog responsiveness #153 #155

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from

Conversation

danielharvilik
Copy link

@danielharvilik danielharvilik commented Nov 1, 2019

Description

Updated material-ui version to newer for dialog responsiveness, also added rules for future use of hooks for eslint. Added dependencies related with dialogs: material-ui-fullscreen-dialog, react-full-screen, react-screen-orientation

Non-responsive dialongs #153

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Running web app at multiple devices to check responsiveness.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

}]
}
}
"env": {
Copy link
Owner

Choose a reason for hiding this comment

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

Are hooks being used anywhere right now?

Copy link
Owner

@theRoughCode theRoughCode left a comment

Choose a reason for hiding this comment

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

Hey Daniel, great work with this PR! Left a few initial comments here.

A few of my main concerns were:

  1. PR getting a bit big. Initially, my thought was that we could just modify a few CSS/Dialog component attributes which would default to fullScreen if the screen size was too big. (You could use the MediaQuery component used throughout the app).
  2. Try not to update package.json or add too many dependencies. I would first try to do it with only the components at hand. But, if that is not possible or if you have difficulties, just reach out to me and we can work through it together!
  3. Is it possible to make a PR with just one component change? That way, it would be easier for me to code review and provide feedback. Once I approve that change, we can duplicate it across all other components. Does that sound good?

"@material-ui/core": "^4.0.0-rc.0",
"@sentry/browser": "^5.7.1",
"@sentry/node": "^5.7.1",
"async": "^2.6.3",
Copy link
Owner

Choose a reason for hiding this comment

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

Is it possible to leave the versions as they were? In case of any breaking changes to other parts of the code.

@@ -7,16 +7,20 @@
"redux-logger": "^3.0.6"
},
"dependencies": {
"@material-ui/core": "^3.3.2",
"@material-ui/core": "^4.0.0-rc.0",
Copy link
Owner

Choose a reason for hiding this comment

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

Let's try to use the same version of material ui. They're constantly updating, so it's a bit difficult to keep up.

"classnames": "^2.2.6",
"cross-env": "^5.2.0",
"cryptiles": "^4.1.2",
"json2mq": "^0.2.0",
Copy link
Owner

Choose a reason for hiding this comment

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

Why do we need this?

"material-ui-search-bar": "^0.4.2",
"rc-progress": "^2.2.6",
"react-beautiful-dnd": "^9.0.2",
"react-dimensions": "^1.3.1",
"react-facebook-login": "^4.1.1",
"react-full-screen": "^0.2.4",
"react-screen-orientation": "0.0.4",
Copy link
Owner

Choose a reason for hiding this comment

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

Are all these added packages necessary? Just wondering because I would prefer to introduce as few new packages as possible to prevent the size of our dependencies from growing too large.

autoScrollBodyContent
fullWidth={ true }
Copy link
Owner

Choose a reason for hiding this comment

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

Good work! This was basically the kind of change I thought this PR would need, just minimal CSS changes and component attribute modifications.

@@ -335,7 +313,21 @@ export default class TermBoard extends Component {
: (
<div>
<MenuItem primaryText="Edit Name" onClick={ this.openRenameDialog } />
<MenuItem primaryText="Import Courses" onClick={ this.openImportDialog } />

{/* If screen of device is 'sm' and in portrait mode, then Dialog Import Courses wont open,
Copy link
Owner

Choose a reason for hiding this comment

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

So, if the device screen is small and in portrait mode, it will default to landscape mode?

${watchlist[toBeDeleted].catalogNumber} (${watchlist[toBeDeleted].classNum})
from your watchlist?
` }
<DialogTitle id="responsive-dialog-title">{"Are you sure?"}</DialogTitle>
Copy link
Owner

Choose a reason for hiding this comment

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

Why do we need the id of responsive-dialog-title?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants