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

Improve Resizer Further #1453

Merged
merged 8 commits into from
May 11, 2017
Merged

Improve Resizer Further #1453

merged 8 commits into from
May 11, 2017

Conversation

alexpaxton
Copy link
Contributor

@alexpaxton alexpaxton commented May 10, 2017

  • CHANGELOG.md updated
  • Rebased/Mergeable
  • Tests Pass

Problem

#1427 - First thing people do is resize the page. The initial sizes of QueryMaker vs Visualization are not ideal

Solution

  • Created a couple props in ResizeContainer for initial height
  • Created constants for initial height of Visualization and QueryMaker alongside minimum heights
  • Essentially, QueryMaker will initially be 2/3 of the page on load

Preview

screen shot 2017-05-10 at 11 35 16 am
screen shot 2017-05-10 at 11 35 10 am

Default is now 50/50 instead of 60/40, but can be specified on a per
use basis
@alexpaxton alexpaxton changed the title Fix #1427 Improve Resizer Further May 10, 2017
Copy link
Contributor

@jaredscheib jaredscheib left a comment

Choose a reason for hiding this comment

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

Good work altogether -- glad to see this fix. Just a couple of changes requested for clarity.

@@ -159,6 +159,8 @@ class CellEditorOverlay extends Component {
containerClass="resizer--full-size"
minTopHeight={MINIMUM_HEIGHTS.visualization}
minBottomHeight={MINIMUM_HEIGHTS.queryMaker}
initialTopHeight={INITIAL_HEIGHTS.visualization}
Copy link
Contributor

Choose a reason for hiding this comment

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

cool

@@ -10,7 +10,7 @@ import Header from '../containers/Header'
import ResizeContainer from 'src/shared/components/ResizeContainer'

import {VIS_VIEWS} from 'src/shared/constants'
import {MINIMUM_HEIGHTS} from '../constants'
import {MINIMUM_HEIGHTS, INITIAL_HEIGHTS} from '../constants'
Copy link
Contributor

Choose a reason for hiding this comment

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

no relative paths plz

static defaultProps = {
minTopHeight: minimumTopHeight,
minBottomHeight: minimumBottomHeight,
initialTopHeight: initialHeight,
Copy link
Contributor

Choose a reason for hiding this comment

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

it's a bit confusing to assign initialHeight to both initialTopHeight and initialBottomHeight -- maybe rename this constant fiftyPercent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Chose to use defaultInitialTopHeight and defaultInitialBottomHeight instead of a single constant for both

}
}

const {node, number, string} = PropTypes
Copy link
Contributor

Choose a reason for hiding this comment

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

install and use Prettier for auto-formatting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did the thing

Copy link
Contributor

@jaredscheib jaredscheib left a comment

Choose a reason for hiding this comment

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

Looks great. Cleaner, clearer, faster, better, stronger.

@alexpaxton alexpaxton merged commit ceea00c into master May 11, 2017
@alexpaxton
Copy link
Contributor Author

Connect #1427

@alexpaxton alexpaxton deleted the improve-resizer branch June 27, 2017 01:02
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