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
toggleLoading: remove force paramater #27508
Conversation
a3e7ee5
to
077b7ae
Compare
Nice find that |
Man these codepaths are so messy. Another thing I noticed: we should avoid calling |
Happy to pursue in a separate PR! Unless you think this PR directly exacerbates the issue. |
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.
Thanks for cleaning this up. LGTM as long as we manually verify that amp-list/amp-twitter works as expected.
This pull request introduces 1 alert when merging b1fb267 into c21d89a - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging fd1b388 into 680f8cf - view on LGTM.com new alerts:
|
summary
The
opt_force
attribute forcustom-element.toggleLoading
is used to force an element to reshow its loading indicator even ifisLoadingEnabled
returns false. This behavior is only used viamutatedAttributesCallback
(amp-bind) in amp-list and amp-twitter.By taking advantage of
base-element.isLoadingReused
withinisLoadingEnabled
, I think we can remove the need for aforce
option.testing done