Code Monkey home page Code Monkey logo

Comments (4)

ebpa avatar ebpa commented on May 26, 2024

Absolutely. The idea behind this package was to make it radically easier to build composable UI's for Emacs packages.

This library isn't production-ready yet though- something that is necessary for such a popular package as magit. I'm close to releasing a new version which has improved on the performance and fixed some stability issues.

Have you built anything with tui.el yet?

from tui.el.

alphapapa avatar alphapapa commented on May 26, 2024

Sounds neat! :)

No, I just discovered it recently by accident (don't remember how). I do have some ideas though:

  • I'm pretty satisfied with how https://github.com/alphapapa/pocket-reader.el has turned out, but tabulated-list-mode leaves several things to be desired. It would be nice if tui could make such UIs easier and more powerful.
  • In working on https://github.com/jgkamat/matrix-client-legacy-el, we've been considering trying to use lui for our UI, but I wonder if tui could work. Do you have any thoughts about components that might be useful for building a chat client? e.g. we need a header (currently provided by header-line-format, which may be the only possibility in Emacs anyway, since it must not scroll off-screen), an input area and prompt (currently provided by an overlay at the end of the buffer, which all messages are inserted read-only before), a last-seen line (currently provided by an overlay, which is manually moved to just before the prompt overlay), and a list of messages (currently provided by simply inserting read-only text, with text-properties to track message IDs, timestamps, etc).

That might be out-of-scope for this project, but some kind of next-gen UI paradigm for this kind of thing in Emacs would be exciting. :)

from tui.el.

ebpa avatar ebpa commented on May 26, 2024

Well I'm glad you did find it!

This the first I've heard about lui.el. Both lui and pocket-reader.el look really cool! I see that circe uses it too-- are there any other popular packages that do?

It's nice to aim for a clean functional style with component design, but the examples you mention might be circumstances in which there might not be an elegant solution. It's nice to have pure components, but really any logic could get thrown into a component (i.e. components could be written with deliberate side-effects in mind). You could set header-line-format in the :component-did-mount and :component-did-update lifecycle methods of your top-level component or define a dummy component that doesn't render anything and just changes the header.

I've been meaning to play around more with layout components (namely a grid-based layout mechanism). Imagine something like CSS Grid Layout, but for text in Emacs! More sophisticated layout could be achieved (such as headers and footers or even columns or pseudo-frames) without splitting windows :-)

I would say what you mention is not out-of-scope for this project (or at least not out of the realm of its intended usage). I probably won't include a dummy component that just sets header-line-format in tui.el itself, but I'm definitely open to iterating on the tui.el API to make it possible or easier to do wacky things! This library is all about experimenting.

Check out the links at the bottom of the readme to see examples of where I'm hoping to head with this. In particular- blessed has some pretty nice eye-candy.

I just pushed some of the changes I've made in the last two months to the dev branch- in case you're interested. I would love to hear how your experience is. I'm on Twitter as @ebanders.

from tui.el.

bryce-carson avatar bryce-carson commented on May 26, 2024

Hi, alphapapa. If you could please answer if lui.el from the Emacs Wiki is what you were referring to, it might be nice for the historical reasons for this issue.

The issue shouldn't be reopened, ebpa.

I'm just I was looking for disambiguation. I should've read further; circe lead me to the evidence that lui.el is the right reference.

from tui.el.

Related Issues (10)

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.