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

Overlap invisible part of the logo #6273

Closed
ghost opened this issue Jan 25, 2019 · 4 comments · Fixed by #6276
Closed

Overlap invisible part of the logo #6273

ghost opened this issue Jan 25, 2019 · 4 comments · Fixed by #6276

Comments

@ghost
Copy link

ghost commented Jan 25, 2019

Is this a bug report?

Yes

Did you try recovering your dependencies?

Not relevant.

Which terms did you search for in User Guide?

Logo, rotating, overlapping

Environment

Environment Info:

  System:
    OS: Windows 10
    CPU: x64 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz
  Binaries:
    npm: 6.6.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 42.17134.1.0
    Internet Explorer: 11.0.17134.1
  npmPackages:
    react: ^16.7.0 => 16.7.0
    react-dom: ^16.7.0 => 16.7.0
    react-scripts: 2.1.3 => 2.1.3
  npmGlobalPackages:
    create-react-app: Not Found

This is a lie, I don't actually use IE or Edge. I am ashamed to admit I use Windows at home though.

Steps to Reproduce

  1. Create a new react app using create-react-app
    npx create-react-app react-bug
    cd react-bug
    npm start
  2. Add a button just below the logo component, add a little event to the button click, may I propose a counter?
    <button onClick={() => this.setState({counter: this.state.counter + 1})}>OMG Don't click me {this.state.counter} times </button>

And initialize some state:
state = { counter : 0 }
3. Click the button, notice it doesn't always work.
4. Inspect the logo, and notice the invisible part of it rotating over your button.
5. Realize you were clicking the rotating logo

Expected Behavior

I suspect the easiest solution is to give the logo SVG image more convenient dimensions. Maybe an actual square?

Actual Behavior

logooverlap

Reproducible Demo

I was too ashamed to push this to a public repo. I read a bit too many articles about setState grouping and render cycles before realizing the logo overlap was the culprit.
I know this is a silly bug report. We stumbled on this while introducing it to our teams, in a more complex example than I described here. Because some of us had used a bigger text component between the logo and the button counter, some of us didn't have the issue, which added to the confusion.

@Timer Timer added this to the 2.1.x milestone Jan 25, 2019
@kostadriano
Copy link
Contributor

Can I work on this one? :)

@Timer
Copy link
Contributor

Timer commented Jan 25, 2019

Sure!

@kostadriano
Copy link
Contributor

This #6276 solves de issue 😄 .

@ghost
Copy link
Author

ghost commented Jan 26, 2019

Thanks guys!

@lock lock bot locked and limited conversation to collaborators Jan 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants