šŸ†• Custom Component (AI Generated) - Feedback wanted!

I was really into the ā€˜CODEā€™ component, but lately, with the last two updates, itā€™s been super buggy. Iā€™m gonna have to hide it from the app for now. Canā€™t wait for it to get stable again.

Check out the code and GIF below for more detailsā€”make sure to watch till the end!
GravaodeTela2024-08-13002616-ezgif.com-video-to-gif-converter

<!DOCTYPE html>
<html lang="pt-BR">
  <head>
    <meta charset="UTF-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0"
    />
    <title>Animated Counter with Styled Progress Bar</title>
    <link
      rel="stylesheet"
      href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap"
    />
    <style>
      body {
        font-family: 'Roboto', sans-serif;
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        overflow: hidden;
      }

      .card-container {
        perspective: 1000px;
        width: 80%;
        opacity: 0;
        animation: fadeIn 1s ease forwards;
      }

      .card {
        position: relative;
        width: 100%;
        height: 200px;
        transform-style: preserve-3d;
        transition: transform 1s;
        box-shadow: none;
        border-radius: 10px;
      }

      .front, .back {
        position: absolute;
        width: 100%;
        height: 100%;
        backface-visibility: hidden;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 20px;
        box-sizing: border-box;
        border-radius: 10px;
      }

      .back {
        transform: rotateY(180deg);
      }

      .progress-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        margin-bottom: 10px;
      }

      .progress-label {
        font-size: 18px;
        color: #ffd700;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
        margin-right: 10px;
      }

      .progress-bar {
        height: 10px;
        width: calc(100% - 120px);
        background-color: #fff;
        border-radius: 5px;
        position: relative;
        overflow: hidden;
      }

      .progress-fill {
        height: 100%;
        width: 0%;
        background-image: linear-gqradient(to right, #ffd700, #e7c266);
        border-radius: 5px;
        position: absolute;
        top: 0;
        left: 0;
        transition: width 0.3s ease, background-color 0.3s ease;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
      }

      .counter {
        font-size: 36px;
        letter-spacing: 2px;
        font-variant-numeric: tabular-nums;
        color: #ffd700;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
        margin-top: 20px;
      }

      .bottom-text {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.8);
        margin-top: 10px;
      }

      .title {
        font-size: 18px;
        color: #ffd700;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
        margin-top: 20px;
      }

      @keyframes slideIn {
        0% {
          transform: translateX(-100%);
          opacity: 0;
        }
        100% {
          transform: translateX(0);
          opacity: 1;
        }
      }

      @keyframes rotate {
        0% {
          transform: rotateY(0deg);
        }
        100% {
          transform: rotateY(180deg);
        }
      }

      @keyframes fadeIn {
        0% {
          opacity: 0;
        }
        100% {
          opacity: 1;
        }
      }
    </style>
  </head>
  <body>
    <div class="card-container">
      <div class="card" id="card">
        <div class="front">
          <div class="progress-container">
            <div class="progress-label">Inicio</div>
            <div class="progress-bar">
              <div class="progress-fill"></div>
            </div>
            <div class="progress-label">Hoje</div>
          </div>
          <div class="counter">
            <span id="counter-number">R$0,00</span>
          </div>
        </div>
        <div class="back">
          <div class="counter">
            <span id="total-number">R$0,00</span>
          </div>
          <div class="title">Em negĆ³cios gerados</div>
          <div class="bottom-text">Entre maƧons</div>
        </div>
      </div>
    </div>
    <script>
      const finalValue = 5756226;
      const duration = 2000;

      const counterElement = document.getElementById(
        "counter-number"
      );
      const totalElement =
        document.getElementById("total-number");
      const progressBar = document.querySelector(
        ".progress-fill"
      );
      const card = document.getElementById("card");

      const animateValue = (start, end, duration) => {
        const startTime = performance.now();

        const updateCounterAndProgress = () => {
          const currentTime = performance.now();
          const elapsedTime = currentTime - startTime;

          if (elapsedTime >= duration) {
            counterElement.textContent =
              formatCurrency(end);
            progressBar.style.width = "100%";
            card.style.animation = "rotate 1s forwards";
            totalElement.textContent = formatCurrency(end);
          } else {
            const progress = (elapsedTime / duration) * 100;
            progressBar.style.width = `${progress}%`;
            counterElement.textContent = formatCurrency(
              start +
                Math.floor(
                  (end - start) * (elapsedTime / duration)
                )
            );
            progressBar.style.backgroundImage = `linear-gradient(to right, #ffd700, #e7c266)`;
            requestAnimationFrame(updateCounterAndProgress);
          }
        };

        requestAnimationFrame(updateCounterAndProgress);
      };

      const formatCurrency = (value) => {
        return value.toLocaleString("pt-BR", {
          style: "currency",
          currency: "BRL",
        });
      };

      // Inicia a animaĆ§Ć£o imediatamente
      animateValue(0, finalValue, duration);
    </script>
  </body>
</html>

1 Like

Yeah, same here. They are making changes though, I hope for a resolution soon.

Not sure what I am doing wrong, but I canā€™t get the AI Custom component to produce anything! In early versions - I had some success, but now I enter a prompt, add some data - and nothing.

I am using the ā€œCustomā€ component in the AI section

1 Like

I donā€™t think youā€™re doing anything wrong, theyā€™re just not working right now.

1 Like

Oh apologies and thanks. Hadnā€™t realised. I see itā€™s gone from the components list for now too

Itā€™s back for me and seems like some of them are working.

1 Like

Yep - me too. Just made a nice input field for the user to add time in hh:mm format with validation

2 Likes

This still appears broken on my end, and unfunctional, any others? I confirmed that it is turned on my team profile settings

Yeah, this is unfortunately broken again.

I used the AI custom component since it was out of beta and have build components with it. and it stopped working while i changed nothing

If glide changes the ai component in such ways previous uses stops working. Could the glide team please still put a label of beta on the component, that way users know they cant fully rely on the stability yet.

1 Like

So odd - just tried using it, and it wonā€™t let me input anything

1 Like

I found it in settings.


It seem working when checkup!

2 Likes

For my it is currently working in production and builder

Hi! I remember reading that the custom code component was going to be available in all plans. Is that no longer the case?

At the moment it seems like the ā€œAIā€ version is available on all plans, but the ā€œCodeā€ version is paid only. It has a ā€œStarterā€ tag with it, which I assume should be ā€œMakerā€.

1 Like

I am having trouble getting the AI Custom component to link to actions. Inspecting the element shows @click=ā€œactionnameā€ but nothing is happening.

Is this an AI component? Just wondering if youā€™re able to link it with variables as well, because itā€™s not working on my side, and the Code one has been broken for weeks.

Ahh yes! Thanks - that was it!

I had the Custom AI component (and had used it previously) - but without that check box in settings - you can not input any text. Was driving me mad!

Weā€™ve improved the AI custom componentā€™s styling and consistency. It now aligns better with existing Glide components. Give it a try and let us know what you think!

Known limitations

  • AI custom component in a custom collection does not allow navigating yet
  • It cannot import external libraries.
  • It cannot work with arrays or relations
9 Likes

Weā€™re looking for some more structured feedback on the AI Custom Component to understand whatā€™s working and where we can focus on improvements. Could those of you who have tried it out please take a few minutes to answer the 8 questions in the following survey?

Thank you! :pray:

6 Likes