Code Monkey home page Code Monkey logo

Comments (1)

yusanshi avatar yusanshi commented on September 25, 2024 1

Sounds a interesting feature.

I believe the usage of the feature could be:

  • embedding the whole commit diff: https://github.com/yusanshi/emgithub/commit/86f230a6bc37805b6186b355a41b075c123d97d9
  • embedding a specific file in that commit diff (by clicking the filename shown in the following image): https://github.com/yusanshi/emgithub/commit/86f230a6bc37805b6186b355a41b075c123d97d9#diff-36cec0a19fd4229769211afcfd94c3aad3e3a98882aa0f68cdf9e836b0cbc4f8

image

Also the PR can be included as they are quite the same logic. For exampe: https://github.com/yusanshi/emgithub/pull/22/files.

And surely the github.com=>emgithub.com for quickly jumping should still work for this feature.


However the implementation may not be easy. Currently all the three existing modes are implemented by fetching the contents from GitHub and rendering them ourselves. We need write our rendering code but this give us more freedom for customization (e.g., code hightlighting style).

image

But rendering the commit diff seems somewhat complicated. After some searching, I think we can:

  • use the third-party libraries, like diff2html.
  • or, embedd the official contents by iframe. But it seems to have lots of limitations and I'm not sure whether it works well.

But currently I may not have the time to implement this (Maybe after serveral months). Anyway I'll mark this as help-wanted.

from emgithub.

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.