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

docs(Ads): fix multiple ads #3215

Merged
merged 5 commits into from
Oct 15, 2018
Merged

docs(Ads): fix multiple ads #3215

merged 5 commits into from
Oct 15, 2018

Conversation

layershifter
Copy link
Member

@layershifter layershifter commented Oct 12, 2018

Issue source

There was a strange tweet about issue with ads, https://twitter.com/ARedHerring_/status/1041044450288590848

I haven't ever seen this, looks really ugly 👎 I tried to find the issue and it seems that it comes from the Carbon's code, it adds multiple adds sometimes.

image

@layershifter
Copy link
Member Author

layershifter commented Oct 12, 2018

@levithomason can you please take a look? Possible there is a solution without dirty tricks?

@codecov-io
Copy link

codecov-io commented Oct 12, 2018

Codecov Report

Merging #3215 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3215   +/-   ##
=======================================
  Coverage   99.92%   99.92%           
=======================================
  Files         169      169           
  Lines        2790     2790           
=======================================
  Hits         2788     2788           
  Misses          2        2

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 87f467a...da1490a. Read the comment docs.

@levithomason
Copy link
Member

Thanks, this was also reported to me via email. The refresh method removes the ad then creates a new one. If there is no ad in the div, it will insert one. What is happening is that componentWillUpdate is called in rapid succession calling refresh multiple times rapidly. This removes and replaces the ad on the first call, but before it is loaded the second refresh is also called which fetches a second ad.

I will take a look at the changes here and confirm the fix or update it.

@levithomason
Copy link
Member

  • Added check to ensure we don't duplicate fetch ads.
  • Made it smaller and better styled, was taking up a lot of real estate.
  • Improved sidebar ux and layout to help with real estate.

@levithomason levithomason merged commit 845c347 into master Oct 15, 2018
@levithomason levithomason deleted the fix/docs-adds branch October 15, 2018 05:59
@levithomason
Copy link
Member

Released in [email protected].

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

Successfully merging this pull request may close these issues.

3 participants