Git Product home page Git Product logo

Comments (14)

saimonkat avatar saimonkat commented on July 30, 2024 1

@rishi-raj-jain JS implementation looks good and according the shiki transformers docs 👏

Regarding CSS I'd like to:

  • move it up to the @layer components
  • adjust scss classes
  • add before items as + and
  • update colors for dark theme support
.has-diff code .line {
  @apply pl-6;

  &.diff {
    &.add {
      @apply bg-code-green-1/10 before:absolute before:left-2 before:text-code-green-1 before:content-['+'];
    }
    &.remove {
      @apply bg-code-red-1/10 before:absolute before:left-2 before:text-code-red-1/50 before:content-['—'];
    }
  }
}

image

image

from website.

saimonkat avatar saimonkat commented on July 30, 2024 1

@rishi-raj-jain I also noticed that we need to update our copy button with styles and functionality in case of transformers.

Styles

It's good for dark theme
image

But has a lack of background for light theme
image

Functionality
According the functionality on original shiki transformers page, copy button shouldn't copy removed lines of code. I guess we need to improve it in the same way

If you want me, I can help you with this, uploading my commit

from website.

rishi-raj-jain avatar rishi-raj-jain commented on July 30, 2024 1

@saimonkat

Appreciate your detailed review.

Yes, it'd be great to have help from you!

from website.

rishi-raj-jain avatar rishi-raj-jain commented on July 30, 2024 1

Would you be open to committing the changes as you suggested earlier as well? I'm happy to as well.

from website.

saimonkat avatar saimonkat commented on July 30, 2024 1

@rishi-raj-jain ok sure, I'll commit my updates now.

Copy button would take extra time by the way, but I'll work on this too.

from website.

rishi-raj-jain avatar rishi-raj-jain commented on July 30, 2024 1

Thank you, @saimonkat!

from website.

rishi-raj-jain avatar rishi-raj-jain commented on July 30, 2024 1

Added a fix, please review @saimonkat.

from website.

saimonkat avatar saimonkat commented on July 30, 2024 1

@rishi-raj-jain Thanks! I'm not home now, but overall looks like a good fix overall by the code 🔥 I'll review closer when I'm back home

from website.

saimonkat avatar saimonkat commented on July 30, 2024 1

Hey @rishi-raj-jain your fix looks really good and works good as well, thank you!

I just optimized it a little bit and I think we're ready!

from website.

rishi-raj-jain avatar rishi-raj-jain commented on July 30, 2024 1

@saimonkat Thank you!

I've simplified it even further: 92f6c2e.

Feel free to drop an approving review for it.

from website.

rishi-raj-jain avatar rishi-raj-jain commented on July 30, 2024

Being addressed in #1724.

from website.

rishi-raj-jain avatar rishi-raj-jain commented on July 30, 2024

JS: https://github.com/neondatabase/website/pull/1724/files#diff-09b768860037e61d5b8f3b59dffc714d602d84d23886eeb513e520c45aae274d
CSS: https://github.com/neondatabase/website/pull/1724/files#diff-24af49ca5abe8cb68bafd6b913d714250978eec3978bb9fa35a2f9c097eaaf91

from website.

saimonkat avatar saimonkat commented on July 30, 2024

@rishi-raj-jain updated styles for highlighting and fix for copy button in #1724.

There is only one bug left, removed line of code provides empty line in result of copying:

image

Hope you could help me to take a look at this commit 8b55b94

from website.

rishi-raj-jain avatar rishi-raj-jain commented on July 30, 2024

Taking a look now!

from website.

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.