Git Product home page Git Product logo

text.management's Introduction

Hi there 👋

text.management's People

Contributors

calebegg avatar mindofmatthew avatar reckoner165 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

calebegg

text.management's Issues

Tidal project management

I want to highlight a problem raised in the Tidal club forum. It can become quite messy to define all helper functions etc. in a single file. The standard pattern for Tidal seems to be to be to place reusable things in BootTidal.hs. However, there appears to be a severe tradeoff where, if we want to go and work on those functions again while working on some Tidal project, we need to reboot the entirety of Tidal (specifically, the scheduler) which interrupts the interactive flow.

A thought of mine is that maybe it would be possible to address this in the editor? Perhaps it could work to split up one session into multiple files and if we want to change a function in a different file, we can reevaluate that whole file? Another possible solution might be to allow smaller "windows" in one file like in Jupyter or Livebook.

More sophisticated language support

This would be better done on the hydra branch, because the Code Mirror Javascript language mode is more sophisticated than the old Haskell one.

Anyway, a cool thing to do with better language support would be to actually grab the current statement on enter, rather than the current line. Naively evaluating the current line (even in a multi-line statement) is an annoying thing that multiple live code editors do. Right now, I don't know how feasible this is...

More reasonable would be trying to integrate some of the other features that I'm sure Code Mirror supports. For example, running the diagnostic system to catch JS syntax errors, and maybe also adding an autocomplete for Hydra functions (I can figure out how to pull that list of function names).

Console: Better tracking of IO

For Tidal/GHCi (and future REPL-based livecode systems), use the presence of a prompt to signal that a discrete amount of output (or an error) has been printed. Use this for splitting console output into individual messages.

A couple use-cases (which may get punted to future issues):

  • Print inputs and outputs together in the console, so it's clearer what generated what
  • In collaborative editing, separate the results of different people's code execution so that different people only see the results of their own executions (or maybe someone can see all issues, with the ability to filter)

Tab browser keyboard shortcuts

Keyboard shortcuts for tabs:

  • Mod-W to close tabs?
  • Mod-Left/Right to navigate between tabs? Mod-Tab?
  • Add tab region to tab index
  • Add correct ARIA roles to tab elements (Using automatic activation. See: https://www.w3.org/WAI/ARIA/apg/patterns/tabs/examples/tabs-automatic/)
  • Add visual indicator for when editor is in tab-trapped and non-tab-trapped mode
  • Use different command (rather than Esc for showing/hiding console (probably Mod-`)
  • Fix issue with keyboard not triggering close buttons

Highlight on evaluation

When evaluating a line of code, the editor should display a highlight decoration for the given line for a second. I attempted this in the tidal-highlights branch, but didn't get far, and Caleb mentioned that he wasn't able to get it to trigger a re-render either.

The first decoration example here seems to be exactly what I've described, so we need to figure out what's missing from there.

The question of how these decorations get removed is still pretty open. Ideally, it would be cool if they stayed around and applied some subtle styling (after a bright initial flash) to indicate evaluated lines vs non-evaluated lines. Then, they could get grayed out if they no longer have an effect (eg, after evaluating a different line of code that takes over some output or something), but that's a very speculative thing that would need a level of integration with code environments that (I believe) doesn't exist yet.

Basic file management for desktop

File actions on desktop:

  • Open a new file
  • Indicate filename in title bar as well as saved status
  • Save an unsaved file
  • Autosave an opened/saved file
  • Save as to make a copy

Which languages should be added?

The goal with this project is to create an environment that can support a wide variety of programming languages. Eventually, language packages will be well-defined and other people can contribute their own, but for now, I'm going to focus on incubating some language packages within this repository to guide development.

That said, what should I focus on? I'll add some comments for individual languages—reach with an emoji to the ones that you're most interested in seeing, or post comments suggesting others that you'd like to see.

Allow evaluate selection

If the user selects multiple lines and then hits the evaluate key, the editor should get the lines containing the selection and then evaluate the entire range

Extra padding when editor is scrolling

The custom-styled scrollbars currently cover the scrolling content. Detect when a scrollbar is going to be shown and add some extra padding to the scroller on the right and/or bottom edges

[feature request] cps/bpm and cycle displays and tap tempo

first off, really great work!

what i would like to suggest is a display of the current cps and bpm and possibly also of the current cycle modulo a editable parameter (so if we are on cycle 400 and the modulo is set to 8 it will show 0)

i think the cps can already be queried from the running tidal stream, i'm not completely sure about the current cycle (might have to be implemented on the tidal side or the tidal-listener side)

then, what would be really awesome is to have a tap tempo to set the cps triggered via a shortcut key!

[feature request] Help -> About menu item

Another Tiny Feature request, but I still looked for it - Now that we have multiple versions, a Help About window would be handy to quickly check which version we're running

eg from pulsar (nothing this verbose is required):
image

Auto-update

Mac OS and Windows have support for an auto-update mechanism. It should be pretty easy to implement—it uses GitHub releases by default, and just requires hooking into a few lifecycle events.

Blocked by #44

Screen Reader Issues

There are various issues and cross-browser inconsistencies when using screen readers. Some of these might need to be upstream bugs filed against CodeMirror, and some might just be browser bugs, but I'm capturing them here for further experimentation and diagnosis:

  • On Mac, there's a bug with Safari/Firefox where deleting characters is not properly read out
  • On Chrome, the screen reader will sometimes detach from the current editing position, so that edits can be made but the screen reader stops speaking
  • On Chrome, the screen reader reads the edits from multiple users, rather than just the current user

Get some auto-indentation working

This mostly depends on #18, but it would be good to get some basic idiomatic Tidal auto-indentation working. I got a rough indentation service set up, but it needs to handle more cases and, in particular, I've yet to figure out how auto-indentation when pressing enter between brackets works

Keyboard Shortcuts

I'm bad at using keyboard shortcuts when I write code, so I don't have a good sense of what's useful to folks. What are your favorite keybindings?

Some categories:

  • Basic editor commands/common modes (Emacs keybindings exist within CodeMirror already, and would be easy to enable)
  • Commands specific to this editor/live coding:
    • Evaluate code (at various levels of specificity)
    • Clear (or hide) console messages
  • Other functions?

Fira code ligature display issue

Typing ... then deleting one character causes the .. ligature to disappear. A vanilla content-editable div doesn't have this problem, so it's presumably a CodeMirror (or extension) bug. I'll file an issue against CodeMirror once I have more information.

Default theme

Finesse the theme a bit. Make a "dark" (white text on dark highlights) and "light" (black text on white highlights) variant, test both with a variety of background colors and inherit the operating system's preferred mode.

Undo/Redo support

Undo and redo are supposed to be supported, but they don't work well at all in the current version of the editor.

Feature discussion: changes highlighting for unevaluated code?

So something that I find I do quite regularly is begin typing a big idea, then realise I need to change something small somewhere else, make the change, forget about my big idea that I've begun writing then wind up at some point attempting to evaluate the incomplete code changes forgetting that they are there at all.

It would actually be really nice if the editor could highlight my not-yet-evaluated changes somehow, sort of like how you can get uncommitted git changes highlights - there is a whole other discussion on how it would look (eg how to highlight a deletion, or partial deletion change) but for myself at least this could be a really killer feature :)

An (overly simplistic) neovim example with the gitgutter plugin:

image

1.0 Roadmap

I think this is already at a point where it only does a few things, but does them well, with a minimum of bugs (mostly because CodeMirror is a mature project that works very well). So, it’s nearly time to start putting real version numbers on things. Here are a few outstanding features that I think are necessary for minimum viable text.management:

  • Tidal restart
  • Custom BootTidals
  • Better GHCi management (#24)
  • File management (#15)
  • Tabbed browsing (#22)
  • Rudimentary settings (e.g. #25)
  • Collaboration w/ cursors (#38, #8)
  • Icons on all platforms
  • RedHat release
  • Undo/Redo (figure out if this is working, needs menu items, etc) (#43)
  • Code signing and auto-update (#44, #45)

Test Action

Add a GitHub action to run tests (and typechecks)

Console: Get rid of GHCI prompts

Two parts: Strip the prompt off the first line and then remove the relevant :set directives from any processed files (we don't want to allow users to set prompts because they're not actually in a REPL).

Cursor alignment

Nitpick: the default cursor is 2px wide, but both pixels are right of center.

Also see what (if anything) can/should be done about cursor height and vertical alignment.

don't keep the background of the error console red for as long

Hey Matt, this is is really nice, thanks so much for making it!

One thing I'm finding is that after I evaluate something and an error is thrown, it sometimes confuses me for subsequent evaluationss because it is still there and red even though my code is fine after fixing the issue.

I was thinking that maybe it'd be good if it could just flash red and fade out, so you know it's an error now
Another option could be to change the background colour on a successful eval from red to something non-descript

Many possibilities I'm sure, don't have a particular preference but just looking for it to be easier to map errors to actions in time.

Thanks :)

Tidal shows up as "Disconnected" in Windows

Under the hood the request to get the version/establish that Tidal is installed is probably crashing due to single-quotes in Node child process commands. (A problem that I already solved elsewhere but forgot to fix here.)

Basic MVP Status Bar

We should have a status bar at the bottom that can host basic information about running livecode systems, etc. For now, proof of concept is a bar that displays the following information:

  • Tidal (1.9.4) or whatever when running
  • Tidal (Disconnected) or something when Tidal isn't available in a web environment
  • Tidal (Error) or something when there's an error with GHCI

Batch terminal output from GHCI

On the GHCI side, set up a slight delay so that multi-line messages (in particular error logs) can be sent to the interface as a single "message" object

Tabbed browsing

Roadmap

  • Basic tab display and multi-file support
  • Correct Save/Save As menu behavior
  • Implement close behavior (checking for unsaved files etc...)
  • Implement correct tab names (with appropriate updates)
  • Hide tab bar when no tabs are open
  • Re-implement code evaluation/console logging, both of which broke
  • Implement menu option/keyboard shortcut for closing current tab (Mod-W)

Auto-completion

Pull exposed functions from Tidal package via GHCi and enable a simple auto-completion extension

Editor width layout issues

Currently an extra-wide editor can cause the page content to be greater than 100% width. Instead, set up editor to scroll on its own, which works with the graphics canvas and theoretically works with multiple columns of editors.

Code Signing

It would be good to actually do proper code signing on Mac & Windows. This passes certain OS-level security checks, and is necessary for auto-update.

This is just blocked by not wanting to spend money yet.

Cmd-Period not working

The "Mod-." keybinding seemed to not work on a MacBook. Might be a Mac-specific issue, or an issue with specifying the key as "." vs "Period" or something.

Color scheme settings

The editor is designed to have pretty backgrounds, so there should be a setting for changing the default background. Ideally this supports setting a background color and (in the absence of a fully-formed Hydra engine) an arbitrary URL for an iframe that can be embedded.

Hydra Support

A hacky version of this exists, but it would be good to get it properly implemented. This means support for multiple documents, running in multiple systems, etc.

High-contrast color scheme

The default theme should handle high-contrast colors when the forced-colors media query is in effect. Do some testing with Windows high contrast mode.

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.