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-infra] Additional white space left after expanding the code block #39272

Open
danilo-leal opened this issue Oct 2, 2023 · 8 comments Β· May be fixed by #39285
Open

[docs-infra] Additional white space left after expanding the code block #39272

danilo-leal opened this issue Oct 2, 2023 · 8 comments Β· May be fixed by #39285
Assignees
Labels
design This is about UI or UX design, please involve a designer scope: docs-infra Specific to the docs-infra product

Comments

@danilo-leal
Copy link
Contributor

danilo-leal commented Oct 2, 2023

Steps to reproduce πŸ•Ή

This problem can be seen in any component page β€” for example, Material UI's Button page.

  1. Go to a demo that has the "Expand code" button
  2. Click on it to expand the code block
  3. Then, click again on it to collapse the code block back
  4. See how there's now an empty div creating additional white space
Screen Shot 2023-10-02 at 16 01 08

Expected behavior πŸ€”

The additional white space shouldn't be there β€” content spacing throughout the page should remain the same.

@danilo-leal danilo-leal added design This is about UI or UX design, please involve a designer scope: docs-infra Specific to the docs-infra product labels Oct 2, 2023
@jpettis1
Copy link

jpettis1 commented Oct 2, 2023

Hello! I'd like to take a stab at this issue if possible?

@danilo-leal
Copy link
Contributor Author

@jpettis1 Yeah, go for it! Want to share how you're thinking about tackling it beforehand?

@oliviertassinari
Copy link
Member

oliviertassinari commented Oct 2, 2023

This is the space reserved for the ad.

It looks like .filter((item) => item.statlink) needs to be fixed, Carbon might have changed their API response format.

If there are really no ad that we can fetch after 10 attempts (current threshold), we could use the space with an in-house ad.

If ads are disabled, the space isn't allocated.

@danilo-leal
Copy link
Contributor Author

Though it shouldn't be there when there's no ad, right?

@alexfauquette
Copy link
Member

It looks like .filter((item) => item.statlink) needs to be fixed, Carbon might have changed their API response format.

I think it's just their is no add, because the JSON returned by the API query does not contain any link except one to the carbon branding page. Plus I managed to see one.

we could use the space with an in-house ad.

Sounds a good idea

SHould be fixed by #39285

@jpettis1
Copy link

jpettis1 commented Oct 3, 2023

Got it! I was taking a look at the src code this morning, but sounds like issue will be resolved. Thank you!

@oliviertassinari
Copy link
Member

oliviertassinari commented Oct 3, 2023

I think it's just their is no add, because the JSON returned by the API query does not contain any link except one to the carbon branding page. Plus I managed to see one.

@alexfauquette normally, we try to query an ad with up to 10 network requests. When I opened the network panel, I could only see one attempt. The logic was copied from https://github.com/Semantic-Org/Semantic-UI-React/blob/master/docs/src/components/CarbonAd/CarbonAdNative.js

@alexfauquette
Copy link
Member

When I opened the network panel, I could only see one attempt.

Maybe because it succeeds in getting an ad 😁

More seriously, I can't reproduce what you describe. here is a screenshot of the preview with no add found (10 requests sent)

image

Here is another one with 8 requests (the last contains an ad so it stopped)

image

@danilo-leal danilo-leal moved this to In progress in Docs-infra Oct 27, 2023
@danilo-leal danilo-leal moved this from In progress to Stalled in Docs-infra Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design This is about UI or UX design, please involve a designer scope: docs-infra Specific to the docs-infra product
Projects
Status: Stalled
Development

Successfully merging a pull request may close this issue.

4 participants