question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] New callback called when Nascar screen has been rendered.

See original GitHub issue
var uiConfig = {
  callbacks: {
    uiShown: function() {
        console.log(document.querySelectorAll('.mdl-js-button'));
        // []
    }
  },
  //...
}

Version: 2.6.0

Also, uiShown only runs the first time the content is rendered, and that means if the user clicks “Sign in by email”, and then cancel, any modifications done to the UI are removed, as the UI is rendered again.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bojeil-googlecommented, Feb 14, 2018

I see. Thanks @TangSteven, I need to investigate this more to see if we can simplify customization in similar cases.

0reactions
nicolasgarniercommented, Aug 31, 2018

btw a workaround is to trigger an interval that will keep checking for when the buttons are displayed. Not the most efficient approach but here is a code sample:

    'callbacks': {
        'uiShown': function() {
          const intervalId = setInterval(() => {
            const IDPButtons = $('.firebaseui-idp-button');
            const nbIDPButtonDisplayed = IDPButtons.length;
            if (nbIDPButtonDisplayed > 0) {
              clearInterval(intervalId);
              if (!$('#fp-pre-consent').is(':checked')) {
                IDPButtons.attr('disabled', 'disabled');
              }
            }
          }, 1);

I did this in order to disable the IDP buttons until the user had approved some disclaimer (e.g. read the TOS and such, which some lawyers made me do 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

dcampodonico-firebaseui-es - npm package - Snyk
When the user leaves a page where the FirebaseUI widget was rendered (for instance in the componentWillUnmount method of a React component), ...
Read more >
NASCAR Cup Series Full Race Replay - YouTube
Relive the 2022 NASCAR Cup Series All-Star Race in this week's NASCAR Cup Series Full Race Replay.----------Subscribe to NASCAR on YouTube: ...
Read more >
driver crossover
CROSSOVER POINTS AND "WAYS" If you have two speakers and you cut the high frequencies for one speaker and the low frequencies for...
Read more >
8 Powerful New Web Development Features in Laravel 8
Tailwind also features a just-in time mode enabled to have your styles generated on-demand rather than having everything rendered at initial build time....
Read more >
A New Yooka Laylee Support Character Has Been Revealed
Rextro is a dinosaur that's deliberately been crafted as a callback to the blocky characters of the N64 3D platformers of yore, right...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found