Skip to content

CookieConsent cannot be hidden properly on very small screens #2336

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

Closed
lindapaiste opened this issue Jul 30, 2023 · 3 comments · Fixed by #2337
Closed

CookieConsent cannot be hidden properly on very small screens #2336

lindapaiste opened this issue Jul 30, 2023 · 3 comments · Fixed by #2337
Labels
Bug Error or unexpected behaviors Priority:Low Low-impact issue that can be addressed after higher-priority tasks

Comments

@lindapaiste
Copy link
Collaborator

p5.js version

No response

What is your operating system?

None

Web browser and version

No response

Actual Behavior

The positioning of the CookieConsent is always fine when it is visible, as we use bottom: 0 for this.
image

When it's hidden we use bottom: -300px (in rem). Moving the bottom down by exactly 300px will hide the banner if the banner is >= 300px. This is almost always true, even on the vast majority of mobile devices. But using fixed numeric positions is prone to edge case bugs. On a very narrow screen the banner can be taller than 300px due to text wrapping. In that case, part of the banner will always be visible and it's impossible to remove this visible part.
image

Expected Behavior

I expect it to be completely hidden regardless of screen size.

Steps to reproduce

Steps:

  1. Open the web app
  2. Shrink the window
@lindapaiste lindapaiste added the Bug Error or unexpected behaviors label Jul 30, 2023
@lindapaiste
Copy link
Collaborator Author

The solution is for the transition property to be a percentage-based transform rather than transitioning the bottom.

@dewanshDT this is such an edge case that I'm just gonna fix it myself if that's cool with you.

@lindapaiste lindapaiste added the Priority:Low Low-impact issue that can be addressed after higher-priority tasks label Jul 30, 2023
@madtitan02
Copy link

is this issue still open???

@lindapaiste
Copy link
Collaborator Author

@madtitan02 We do not need any help for this issue as it has been fixed by the linked PR #2337. The issue will remain open until that PR is approved and merged.

raclim added a commit that referenced this issue Jan 11, 2024
Fix #2336: `CookieConsent` cannot be hidden properly on very small screens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error or unexpected behaviors Priority:Low Low-impact issue that can be addressed after higher-priority tasks
Projects
None yet
2 participants