-
Notifications
You must be signed in to change notification settings - Fork 28
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
Click to load: mobile block placeholder #525
Conversation
ca9f4d9
to
a061a7a
Compare
There was a problem hiding this 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 🙂.
src/features/click-to-load/components/ctl-placeholder-blocked.js
Outdated
Show resolved
Hide resolved
src/features/click-to-load/components/ctl-placeholder-blocked.js
Outdated
Show resolved
Hide resolved
src/features/click-to-load/components/ctl-placeholder-blocked.js
Outdated
Show resolved
Hide resolved
src/features/click-to-load/components/ctl-placeholder-blocked.js
Outdated
Show resolved
Hide resolved
src/features/click-to-load/components/ctl-placeholder-blocked.js
Outdated
Show resolved
Hide resolved
…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
5ec413f
to
eda47b9
Compare
- 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.
There was a problem hiding this 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 :)
src/features/click-to-load/components/ctl-placeholder-blocked.js
Outdated
Show resolved
Hide resolved
src/features/click-to-load/components/ctl-placeholder-blocked.js
Outdated
Show resolved
Hide resolved
src/features/click-to-load/components/ctl-placeholder-blocked.js
Outdated
Show resolved
Hide resolved
src/features/click-to-load/components/ctl-placeholder-blocked.js
Outdated
Show resolved
Hide resolved
src/features/click-to-load/components/ctl-placeholder-blocked.js
Outdated
Show resolved
Hide resolved
…Introduce toggle size param and decouple it from platform logic
…a query to automatically update values to dark theme
…nstructor and split localized copy in different params
This is ready for review again :) |
No description provided.