Git Product home page Git Product logo

Comments (7)

maniator avatar maniator commented on May 9, 2024

I have this same issue

image

I don't really see the difference that the first image sees -- ran in circle ci

from loki.

vvscode avatar vvscode commented on May 9, 2024

@maniator I solved an issue for myself with next hack:
.storybook/preview-head.html :

<script>
(function() {
  var isLocalFileSession = !window.location.href.startsWith('http');
  if (isLocalFileSession) {
    console.log('[UI-LIB: WARNING] Please keep in mind, that some animations and styles are patched. Check the file `preview-head.html');
    var style = document.createElement('style');
    // https://dev.webonomic.nl/how-to-disable-css-transforms-transistions-and-animations
    style.innerHTML = `
    *, :before, :after {
      animation-duration: 0s !important;
    }
    /*
     ESRI relies on external resources, 
     so it might behave upredictable depends on environment
    */
    .esri-view-root {
      opacity: 0;
    }
    `;
    window.document.head.appendChild(style);
  }
})();
</script>

from loki.

maniator avatar maniator commented on May 9, 2024

@vvscode My issue mainly seems to be with svg rendering locally vs on CI.

That is where all the diffs are -- in SVGs

from loki.

vvscode avatar vvscode commented on May 9, 2024

@maniator following hack above - you can just hide svg elements from capturing

add opacity: 0 for failed elements (see .esr-view-root - the same example )

from loki.

maniator avatar maniator commented on May 9, 2024

@maniator following hack above - you can just hide svg elements from capturing

add opacity: 0 for failed elements (see .esr-view-root - the same example )

@vvscode but these are svgs loaded with css throughout storybook, how do we focus on all of them?

from loki.

oblador avatar oblador commented on May 9, 2024

@vvscode I'm trying to support gitlab in a nice way, how did you solve it?

from loki.

vvscode avatar vvscode commented on May 9, 2024

@vvscode but these are svgs loaded with css throughout storybook, how do we focus on all of them?

Didn't get. Hack above allows you to ignore some elements from screenshots. In my case, it was a map. In your case, it might be some other elements. I know - this is a workaround, but that's all I found

@vvscode I'm trying to support gitlab in a nice way, how did you solve it?

Looks like I don't understand ((

from loki.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.