Skip to content

Click to load: mobile block placeholder #525

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

Merged

Conversation

franfaccin
Copy link
Contributor

No description provided.

@franfaccin franfaccin force-pushed the ffaccin/ctl-mobile-block-placeholder branch from ca9f4d9 to a061a7a Compare May 17, 2023 13:43
Copy link
Member

@GioSensation GioSensation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great 💪. The code seems well structured and easy to follow. I haven't run the code and I'm not familiar with the codebase so half of my points are likely moot 🙃. Anyway, a few comments from me, mostly minor stuff 🙂.

…e arrow functions and keep reference on Firefox
This container is set to copy the styles from the root element outside
the shadow root.

- Add Web Component lifecycle functions to update the styles from the
Placeholder Blocked template when connected to the DOM and when the
root elements gets its styles updated.

- Use CSS classes to set the size and show/hide content instead of media queries.
That because the size of the placeholder isn't related to the size of the screen.

- Minor style adjustments.
- Add comment explaining new custom element
- Rename DDGCtlPlaceholderBlocked -> DDGCtlPlaceholderBlockedElement
- General fixes to CSS - reset styles from host element, clean up styles, etc
@franfaccin franfaccin force-pushed the ffaccin/ctl-mobile-block-placeholder branch from 5ec413f to eda47b9 Compare May 22, 2023 14:45
- Introduce size-xs to show only the unblock button when there isn't enough height
to show our placeholder copy -> pending review
- Update CSS selectors to directly target size-md and size-lg when necessary.
- Update the placeholder size after style updates from the parent element, because we
change the root element height based on the parent size after injecting it on the page,
and that might change our placeholder to a different size.
@franfaccin franfaccin marked this pull request as ready for review May 23, 2023 11:26
Copy link
Contributor

@shakyShane shakyShane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@franfaccin great stuff!

I tried to reflect everything we spoke about in our call - let me know if I missed anything or if you have any questions :)

@franfaccin franfaccin requested a review from shakyShane May 24, 2023 18:00
@franfaccin
Copy link
Contributor Author

This is ready for review again :)

@franfaccin franfaccin merged commit 625dc74 into duckduckgo:main May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants