Code Monkey home page Code Monkey logo

Comments (1)

MinusGix avatar MinusGix commented on May 28, 2024 1

The cursor of the editor always blinks even when not in focus
The editor seems to ignore request_focus()

Yeah, it isn't handling FocusGained/FocusLost like the original text_input does. It should be changed to support that somehow.
I didn't think of those events when implementing it, so it should be simple to make the default implementation of 'should_blink` use that.

The editor ignores style function (should either remove it which is hard with Decorator or support it?)

Part of the issue is that we want more complex styling for some applications, like syntax highlighting, and you can't just style an individual piece of text or a line as a view.
But I think it should be possible to have SimpleStyling just default to the (for example) color given to the editorview, since it would merely have a constant color anyway. Though I'm not sure of the right way to pass that information to the Editor itself.
(I presume stuff like color, font family information, and background color are what you're referring to here, since it works with style functions like width_full)

keyboard_navigatable is being ignored

(TODO: i'm confused as to the details of this thing)

The Caret changes width depending if it's on a new line or has text

fun

I see no way to actually change anything besides color in the editor like caret width etc

I don't know everything people want to customize (admittedly didn't even think of caret width as one of those things), but a lot of it is just "hasn't been hooked up yet". Any other things that should be hooked up to be changeable?

(Though for some large changes like Lapce adding to gutter/scrollbar/etc, it turns into a 'just redeclare the view'. Though there's changes that can be made to make redeclarations easier, so it doesn't have to duplicate all the code in gutter or whatnot)

Not sure how you'd move focus away from the editor once you're in it with keyboard alone

Probably need some way to easily add basic keyboard handling events to the editor.

Should probably also support placeholder()?

Yep, shouldn't be hard. Edit: Done

on_event or any other event functions are not called. Instead the update function is used which is pretty inconsistent

Hm, yeah adding them as normal events would make some of that cleaner & more consistent.
Though I dislike having it as an event with all the others in that enum, since it is specific to the editor.
(Possibly .on_event should take a generic like .on_event::<PointerLeave> which would allow us to avoid the if let Some unwrapping even though it would always be the right event. Implementing that in a fancier way could allow arbitrary events)

on_event not being called for normal events shouldn't occur however, though I'm not immediately sure what would cause that. (Doing .on_event(EventListener::PointerDown doesn't seem to be ran if I use it on a text_editor view...)

Line wrap seems to be off by a few pixel

This is probably it not taking into account the scrollbar as part of the editor width.

from floem.

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.