Skip to content

inline AuthorInput.getHintRangeFromCursor to address TypeError#4848

Merged
niik merged 1 commit intomasterfrom
mo-optimizing-mo-problems
Jun 4, 2018
Merged

inline AuthorInput.getHintRangeFromCursor to address TypeError#4848
niik merged 1 commit intomasterfrom
mo-optimizing-mo-problems

Conversation

@shiftkey
Copy link
Member

@shiftkey shiftkey commented Jun 1, 2018

Fixes #4847 by inlining the function.

Before:

  • run current master with yarn build:prod and yarn start:prod
  • choose a GitHub repository
  • try and add a co-author
  • 💥 no auto-complete appears, errors in dev tools console

screen shot 2018-06-01 at 5 09 00 pm

Which is this unminified code in onAutocompleteUser:

screen shot 2018-06-01 at 5 11 01 pm

After:

  • run this version with yarn build:prod and yarn start:prod
  • choose a GitHub repository
  • try and add a co-author
  • ✅ auto-complete appears, filtered users listed, no errors in dev tools console

This is the new unminified code for onAutocompleteUser:

screen shot 2018-06-01 at 5 32 24 pm

Other notes:

I could reproduce this with the latest webpack (4.10.2 as of writing) but I think this needs to be isolated and submitted to uglify-es because that's the component doing the JS mangling here.

@shiftkey shiftkey added ready-for-review Pull Requests that are ready to be reviewed by the maintainers infrastructure Issues and pull requests related to scripts and tooling for GitHub Desktop and removed infrastructure Issues and pull requests related to scripts and tooling for GitHub Desktop labels Jun 1, 2018
@niik niik self-assigned this Jun 1, 2018
Copy link
Member

@niik niik left a comment

Choose a reason for hiding this comment

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

This is highly disturbing if we can't trust the magnification step any more. Let's get this workaround in but we should definitely try to get to the bottom of what's causing this.

@niik niik merged commit 56ebf90 into master Jun 4, 2018
@niik niik deleted the mo-optimizing-mo-problems branch June 4, 2018 09:38
@lock lock bot locked as resolved and limited conversation to collaborators Aug 3, 2018
@desktop desktop unlocked this conversation Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants