Coder Social home page Coder Social logo

extract-to-react's People

Contributors

bassjacob avatar jesstelford avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

extract-to-react's Issues

Some CSS rules missing

Possibly due to ancestor CSS not being applied?

In particular; the font-face is missing.

Looks like it should be applied though, since the algorithm uses getComputedStyle for each element.

Try wrapping the output elements in ancestor html, and also dumping ancestor css to see if it fixes it.

Support psuedo elements when inlining styles

  • Stringify psuedo elements' properties along with the selector, then add as a <style> tag as a child node to the node being converted
  • If node being converted cannot have children, throw a warning about losing psuedo selectors
  • Alternatively; Keep the separately generated stylesheets

Usage info in UI

Such as:

  • How to select what to extract
  • Extracting multiple nested components

Error after extracting

Error:

<TODO: Fill in your error>

Version: v1.0.2

URL: https://flone.reactdemo.hasthemes.com/home-grid-banner

Extracting:

<img src="/assets/img/product/hm6-pro-3.jpg" alt="" data-snapshooter-original-id="" id="IMG_1">
#IMG_1 {
    block-size: 626.422px;
    box-sizing: border-box;
    cursor: pointer;
    height: 626.422px;
    inline-size: 381px;
    perspective-origin: 190.5px 313.203px;
    text-align: left;
    text-size-adjust: 100%;
    transform: matrix(1, 0, 0, 1, 0, 0);
    transform-origin: 190.5px 313.211px;
    vertical-align: middle;
    width: 381px;
    font: 14px / 24px Poppins, sans-serif;
    transition: all 0.5s ease 0s;
}/*#IMG_1*/

#IMG_1:after {
    box-sizing: border-box;
    cursor: pointer;
    text-align: left;
    text-size-adjust: 100%;
    font: 14px / 24px Poppins, sans-serif;
}/*#IMG_1:after*/

#IMG_1:before {
    box-sizing: border-box;
    cursor: pointer;
    text-align: left;
    text-size-adjust: 100%;
    font: 14px / 24px Poppins, sans-serif;
}/*#IMG_1:before*/

Error after extracting

Error:

<TODO: Fill in your error>

Version: v1.0.2

URL: https://sofinnovapartners.com/

Extracting:

<header class="container padding index_header__8k7Yb" data-snapshooter-original-id="" id="HEADER_1"><h1 class="hm-3 hd-1 titleLoop_titleLoop__AKd5z" data-snapshooter-original-id="" id="H1_2"><span class="titleLoop_wrapper__AZGCx" data-snapshooter-original-id="" id="SPAN_3"><span class="titleLoop_title__qeRMf" style="transform: translate3d(0px, -7%, 0px);" data-snapshooter-original-id="" id="SPAN_4">Partners for</span></span><span class="titleLoop_wrapper__AZGCx" data-snapshooter-original-id="" id="SPAN_5"><span class="titleLoop_word__lqR1c" style="transform: translate3d(0px, -7%, 0px);" data-snapshooter-original-id="" id="SPAN_6">Healthcare</span></span></h1></header>

How to report issues?

So I have a pen that fails, but I don't have a real way to report it. Maybe the generator could output a hash that can be used to deterministically retry builds to test and retest features?

url + xpath or something?

Easier way to indicate nested copmonents

Maybe a UI where the user can select sub-elements from the already selected element?

Also need to be able to name the component (or at least; change the default)

EU data tracking laws?

I seem to remember something having to get the user to opt-in to tracking in some cases, such as the EU. If so, we need to add this option.

Inline styles

Give user the option to generate inline styles instead of separate CSS.

  • Remove the to-string conversion
  • Stringify the properties only, and add them as a style attribute to the HTML node

Don't double-extract HTML/CSS

It is extracted once when the extension opened, then again when the button to extract is clicked.

The only action we need to perform when clicking the button is to convert to react.

Error after extracting

Error:

<TODO: Just try to identify the error>

Version: v1.0.2

URL: https://www.creativeboom.com/resources/20-best-websites-with-mockups-for-your-graphic-design-projects/

Extracting:

<div class="masthead__logo-container masthead__logo-container--eyes-visible" data-snapshooter-original-id="" id="DIV_1">
              <a class="masthead__logo" href="https://www.creativeboom.com/" data-snapshooter-original-id="" id="A_2">
                
              </a>
            <canvas class="masthead__eyes" width="90" height="90" style="width: 70px; height: 70px;" data-snapshooter-original-id="" id="CANVAS_3"></canvas></div>

Dark letters in "Extract to React" tab in Chrome

Hi.

I'm using Dark Theme in Chrome Inspector (Settings in developer tools -> Appareance) and in the "Extract to React" tab i can't read the info because the contrast.

Can you add a white background or change font color for dark themes?

Thank you

Error after extracting

Error:

<TODO: Fill in your error>

Version: v1.0.2

Extracting:

<link rel="stylesheet" type="text/css" property="stylesheet"  data-snapshooter-original-id="" id="LINK_1">

Render in extension

Depends on #8.

We can render extracted components directly in the extension's panel UI.

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.