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

Instructions Tab: Only Force Resize for Feedback Tab #27571

Merged
merged 1 commit into from Mar 18, 2019

Conversation

dmcavoy
Copy link
Contributor

@dmcavoy dmcavoy commented Mar 18, 2019

Only allow force resize of tab when it's the comments tab.

Before

Screenshot from 2019-03-18 14-02-46

After

Screen Shot 2019-03-18 at 5 33 11 PM

@@ -209,7 +209,9 @@ class TopInstructions extends Component {
* contents of the comment tab.
*/
forceTabResizeToMaxHeight = () => {
this.props.setInstructionsRenderedHeight(this.adjustMaxNeededHeight());
if (this.state.tabSelected === TabType.COMMENTS) {
Copy link
Contributor

Choose a reason for hiding this comment

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

i think rather than checking this.state.tabSelected === TabType.COMMENTS here, we should instead not be calling forceTabResizeToMaxHeight unless we are on the comments tab. i know you're trying to get this out for the deploy, so non-blocking, but should be refactored later

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok I will refactor tomorrow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After discussion, this is the best way to do this for now so not refactoring

@dmcavoy dmcavoy merged commit 6ea3167 into staging Mar 18, 2019
@dmcavoy dmcavoy deleted the resize-instructions branch March 18, 2019 21:43
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.

None yet

2 participants