Done:
Working completion for buffers
Substitute values into command line
Prepare for non-buffers completions
Wrote too many classes and helper functions
Todo:
Learn inferno and hopefully simplify
If not, simplify the main functions so that people can actually
build for it.
Define an interface for tabbing through options
Allow more than one CompletionSource per command
This commit squashes a load of work by @Koushien, a dozen hours from
@cmcaine and some CSS by @bovine3dom.
@cmcaine is writing this commit message, but the work was mostly by
Koushien so the author is set to them. Thanks Koushien!
The following issues need to be fixed:
- The interface is over complicated (my fault)
- commandline_frame is hard-coded to use BufferCompletionSource. This
needs to be made more general
- BufferCompletionSource should be generalised
- completions.ts calls helper functions in commandline_frame. Should
just use browser proxy. If that's too slow can define a
completions_background.ts
After that's done, this should be fixed:
- Completion hiding/unhiding is currently too messy.
Firefox doing what it does on Escape in input
fields fires both the input and keydown listeners
leading to a race condition. Rudimentally protect
ourselves by checking completions directly since
it is always modified sequentially.
User shouldn't notice any difference besides:
* removing "buffer " from cli clears buffers
* retyping "buffer " repopulates buffers
* text after "buffer " filters with smartcase.
We no longer directly set completion's innerHTML.
* prev tab ('#') isn't always the previously
selected tab, i.e., even if you remotely close
the previously selected tab, since we determine
based on time of last access, we always have a
previous tab as long as there is more than one
tab in the window.
* related, displayed prev tab could be wrong if
user unfocuses commandline, switches tabs via
other means and returns to the already opened
:buffer. Possible solution could be to share the
variable so it is only set when tabs are listed.
* Sometimes favicons initially fail to load but
reappear in the commandline when you switch to
the tab. Appears unrelated to whether the tab
is discarded (unloaded in memory).
* Unsuccessfully adding rules for <a> tags.
Beside incompetence, Firefox might be overriding?
Motivation:
- Most test frameworks expect modules
- I'm told they're the future
Changes:
- Every typescript source file is now an es6 module
- Build system is now webpack (tho rollup makes nicer outputs)
- Outputs of buildsystem are one js file per entry point (background,
content, commandline_frame)
- These bundled js files are generated by traversing the dependency
graph of each entry point
2017-10-02 01:17:32 +01:00
Renamed from src/commandline/commandline.ts (Browse further)