amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

๐Ÿ›Story Ads UI appears very small on 4k monitor

Open calebcordry opened this issue 4 years ago โ€ข 28 comments

image

Repro dimensions Monitor resolution: 3840x2160 Inner window size: 1920x1750

This appears to be an issue across all system layer components. Need to investigate if it also affects things like page-attachment.

calebcordry avatar Mar 04 '21 18:03 calebcordry

@calebcordry Can i work on it.

RamGoel avatar Jul 15 '22 07:07 RamGoel

Hello! I just recently sent in a PR to debug this issue. I made a couple of changes to the CSS in order to make the button and its contents sized dynamic to the screen. #38549

JakeSquier avatar Nov 16 '22 20:11 JakeSquier

hey @calebcordry how you want the ad to be shown on screen

monyishh avatar Aug 14 '24 16:08 monyishh

Hi! I would like to work on this issue. Could you please provide more details on the expected behavior or any guidelines for fixing it? I'll investigate and submit a PR soon.

AnsariAhmedFrontEnd avatar Feb 23 '25 06:02 AnsariAhmedFrontEnd

Hello maintainers, I'm interested in working on this issue. Is there anything specific I should consider before getting started?โ€‹

Nandan-P-Kashyap avatar Mar 15 '25 11:03 Nandan-P-Kashyap

Can I work on this??

BugFreeSemi avatar Mar 26 '25 06:03 BugFreeSemi

Hello I am wondering if I can work on this issue. Is there anything I need need to consider before working on this issue?

Duc-T-Nguyen avatar Apr 01 '25 19:04 Duc-T-Nguyen

Hi! I noticed that a PR (#38549) was made to address this issue. Is this issue still open for contribution? Iโ€™d love to work on it if it needs further improvements!

Parvathy333 avatar Apr 15 '25 15:04 Parvathy333

Hey! I started working on this and opened a PR to fix it. Let me know if anything needs changing

SrutiGupta avatar Apr 22 '25 04:04 SrutiGupta

hey, I want to work on this issue, please assign me

Immortal-codes avatar May 19 '25 18:05 Immortal-codes

Hi everyone! ๐Ÿ‘‹ I noticed that this issue has been open since 2021 and a few pull requests were created to address it (like #40273). Just wondering โ€” is there a reason why it hasnโ€™t been closed yet? Is additional work needed or is it waiting for review/approval?

Iโ€™d love to understand the current status โ€” thanks in advance! ๐Ÿ™ @calebcordry

alexnightowl avatar May 27 '25 21:05 alexnightowl

https://github.com/ampproject/amphtml/issues/33068

AbeHaim88 avatar Jul 04 '25 02:07 AbeHaim88

https://github.com/ampproject/amphtml/issues/33068

AbeHaim88 avatar Jul 04 '25 02:07 AbeHaim88

Hi ๐Ÿ‘‹

Thanks for keeping this issue open and visible โ€” Iโ€™ve reviewed the history including PRs like #38549 and #40273, and I really appreciate the effort made so far to improve Story Ads UI on high-resolution displays.

That said, if this issue still needs refinements or review-based updates, Iโ€™d love to help finalize and polish the solution. Let me know if additional testing on specific resolutions, responsiveness tweaks, or accessibility checks are needed โ€” happy to contribute actively to get this merged and resolved โœ…

Looking forward to collaborating!

โ€” Bhumit Mittal

Bhumit9416 avatar Jul 17 '25 11:07 Bhumit9416

Hi! Iโ€™d like to work on this issue. I will adjust the Story Ads UI scaling so it adapts properly to high-resolution displays like 4K monitors. Could you confirm if the fix should apply to all system layer components, including page-attachments?

SHUBHAMCODEC avatar Aug 10 '25 08:08 SHUBHAMCODEC

The Issue: Your website looks weird because your computer screen and browser aren't talking to each other properly. You have a really nice 4K monitor (3840x2160 resolution), but your browser thinks it's only half that size (1920x1750). It's like having a big TV but only using half the screen. Why This Happens: Your computer is trying to be helpful by making everything bigger so you can read it better on your high-resolution monitor. It automatically scales everything to 200% size, but your website doesn't know how to handle this scaling properly.

What You're Seeing: Your navigation bar, pop-up menus, and any floating elements probably look off - maybe too small, too big, or positioned in weird places. It's especially noticeable with things like dropdown menus, modals, and sticky headers. The Simple Fix: Think of it like adjusting your TV settings. You need to tell your website "hey, work properly with my fancy monitor." This involves:

Adding a simple line of code that tells browsers how to handle your screen size Writing some CSS rules that say "when someone has a high-resolution display, adjust things accordingly" Adding a bit of JavaScript that detects what kind of screen someone is using and adjusts automatically

Quick Temporary Workaround: If you need a quick fix right now, you can change your computer's display scaling from 200% back to 100% in your display settings. Everything will be smaller, but your website will work normally. Why This Matters: More and more people have high-resolution monitors these days, so fixing this ensures your website looks good for everyone, not just people with standard displays

ravin00 avatar Aug 20 '25 21:08 ravin00

is it still open? can i work on it?

thecrusader25225 avatar Oct 06 '25 16:10 thecrusader25225

Can I work on this

AmanRaj970 avatar Oct 07 '25 15:10 AmanRaj970

I am new to contributing. Can i work on this project if it is still open??

gourilaxmi avatar Oct 09 '25 09:10 gourilaxmi

Can i work on this project if it is still open??

swagatika60 avatar Oct 09 '25 15:10 swagatika60

Hey can I know if this issue is still Open. If it is can I contribute?

Huzaif-nabi avatar Oct 11 '25 12:10 Huzaif-nabi

Hi, Iโ€™d like to work on this issue. Can I take it?

erankitkr011 avatar Oct 13 '25 04:10 erankitkr011

Hi! ๐Ÿ‘‹

I've submitted a PR to fix this issue: #40419

Summary of the fix:

  • Updated CSS to use responsive viewport units with maximum bounds
  • Ad badge, attribution logo, and text now scale proportionally on 4K displays
  • Added device pixel ratio detection for future enhancements
  • Comprehensive unit tests included

The fix ensures UI elements are properly sized on 4K monitors while maintaining appropriate sizes on standard displays.

Tested on:

  • Standard displays (1920x1080, DPR = 1) โœ…
  • High-res displays (DPR = 2) โœ…
  • 4K displays (3840x2160, DPR = 2.5) โœ…
  • Various browser zoom levels โœ…

Ready for review! ๐Ÿš€

Ayush-Raj-Chourasia avatar Oct 21 '25 06:10 Ayush-Raj-Chourasia

can I work on it ?

kajal596 avatar Oct 31 '25 15:10 kajal596

Hey Maintainers,

It looks like the small UI issue on 4K monitors happens because amp-story-auto-ads uses fixed pixel values that donโ€™t scale properly on high-DPI displays. We could fix this by switching to relative CSS units and adding responsive media queries.

Example:


@media (min-resolution: 2dppx), (min-width: 2560px) {
  .i-amphtml-story-auto-ads-button {
    font-size: 1.25rem;
    padding: 0.75rem 1.5rem;
  }
}

Optionally, we can detect window.devicePixelRatio to fine-tune scaling for very high-resolution screens. This should make the Story Ads UI look consistent and readable across 1080p, QHD, and 4K monitors.

lakshan-jk avatar Nov 03 '25 10:11 lakshan-jk

Hello maintainers, I'm interested in working on this issue. Is there anything specific I should consider before getting started

muhammadsaqibs avatar Nov 11 '25 17:11 muhammadsaqibs

โ€œHi, Iโ€™d like to work on this issue. Can you please assign it to me?โ€

muhammadsaqibs avatar Nov 11 '25 17:11 muhammadsaqibs