Commit graph

2006 commits

Author SHA1 Message Date
glacambre
698fc6ad36
Add FileSystem completion 2018-10-13 20:48:47 +01:00
Oliver Blanthorn
a555c6a330
Merge pull request #1072 from tridactyl/exclaim_why
[RFC] Try to make exclaim give better errors
2018-10-12 17:11:05 +01:00
glacambre
14a7d96f54
config.ts: Add missing "native" logging level in default config 2018-10-12 13:59:23 +02:00
Oliver Blanthorn
3d5068e39d
Revert "Buildbot downtime"
This reverts commit 5b9a81ad67.
2018-10-12 12:13:29 +01:00
Oliver Blanthorn
5b9a81ad67
Buildbot downtime 2018-10-12 09:58:26 +01:00
Oliver Blanthorn
b97feb931a
Bagsied 2000th commit 2018-10-11 10:39:59 +01:00
Oliver Blanthorn
09063ecdf4
Merge branch 'editor_style' 2018-10-11 10:38:24 +01:00
glacambre
8ae6376081
Turn :bmarks into a proper excmd
Turning `:bmarks` into a proper excmd has several advantages: it will
show up in the `:help` pages, be available for excmd completions and
enbales adding specific arguments (such as "-t") in order to open
bookmarks in other tabs.

This time I'm directly messaging the background script in order to
trigger a tabopen rather than trying to bring tabopen to the content
script.

Closes https://github.com/tridactyl/tridactyl/issues/902.
2018-10-11 11:18:54 +02:00
glacambre
1984a66fb9
Add indication that input is being edited in external editor
This commit adds a .TridactylEditing class to input fields that are
being edited in an external editor. In the default theme, this
corresponds to just adding Tridactyl's logo to the input field.

It looks like it is impossible to reference Tridactyl's logo in CSS and
have it work on non-privileged pages so instead of doing that we add a
step to the build process which turns one of Tridactyl's logo into its
base64 representation and embeds it in the default.css theme file.
2018-10-10 18:54:09 +02:00
Oliver Blanthorn
5c0647242c
Merge branch 'improve_docs2' 2018-10-10 17:53:06 +01:00
glacambre
6c20f02d93
config.ts: Merge documentation lines 2018-10-10 18:30:50 +02:00
Oliver Blanthorn
8327d25c07
Merge pull request #1077 from antonva/zoom-features
Extend zoom excmd keybindings and improve documentation.
2018-10-10 16:16:02 +01:00
Anton Vilhelm Ásgeirsson
8ccb3378e6 Fix erroneous dot in zoom documentation. 2018-10-10 15:13:24 +00:00
Oliver Blanthorn
486f8277ae
Merge pull request #1076 from glacambre/fix_errors
Fix errors
2018-10-10 16:10:17 +01:00
Oliver Blanthorn
9e27e5a633
Update changelog for 1.14.1 2018-10-10 16:04:28 +01:00
Anton Vilhelm Ásgeirsson
2f362b055f Extend zoom excmd keybindings and improve documentation.
This patch improves upon the existing zoom excmd and adds some features present
in Vimperator and Pentadactyl. `zI` and `zO` are now bound to the maximum and
minimum zoom levels respectively. `zM` (read zoom more) zooms in on increments
of 50pp and `zR` (read zoom reduce) zooms out on increments of 50pp.

In addition, overshooting the zoom level while using relative adjustments is now
handled by setting the level to it's max/min zoom level.

An error is thrown if an absolute value is given that is out of bounds of the
allowed zoom range.
2018-10-10 15:01:02 +00:00
glacambre
2d37524364
Make contentLocation check more robust
f51e08d introduced a bug by defining the window.tri object in the
command line. This made the window.tri check in getURL succeed and then
'loc' was assigned undefined, as "window.tri.contentLocation" isn't
actually defined. We fix this by making sure that
"window.tri.contentLocation" is actually defined.
2018-10-10 16:32:12 +02:00
glacambre
f51e08d9eb
commandline_frame.ts: Fix exception thrown because of 'tri' not existing
The commandline_frame document does not have a window.tri object. This
makes the commandline throw an exception on page load. We fix this by
using 'window.tri || {}' in order to avoid to avoid issues should
'window.tri' be defined in the command line one day.
2018-10-10 16:21:33 +02:00
glacambre
8744d73423
lib/webext.ts: Fix error thrown on page load
It is not useful to await in ownTabContainer as it could cause an
unnecessary context switch and will throw an error if the tab is not in
a container.
While it could seem like throwing errors in ownTabContainer is not a big
deal, it is actually quite annoying when using Firefox's "Pause on
exceptions" feature: execution is paused even if the error is caught by
the caller and there is no stack trace to help us understand what's
happening because ownTabContainer is async.

Thus, removing this await is very useful.
2018-10-10 16:09:34 +02:00
glacambre
848eb89fe8
help.ts: Jump back to hash after elements have been added to page 2018-10-10 15:43:32 +02:00
glacambre
1c63478b5c
Add HelpCompletionSource
The help completion source provides completions for settings, excmds,
aliases and bindings, sorted in lexicographical order. It's basically a
huge copy-paste of the Settings and Excmd completion sources but should
be enough until we have a way to provide multiple completion sources for
a single excmd.
2018-10-10 11:31:27 +02:00
glacambre
d8c59a5a21
Update default_config help page layout
The previous layout behaved badly on small screens.
2018-10-10 10:26:28 +02:00
glacambre
5a837397f2
excmds.ts: s/cursor/caret/g 2018-10-10 09:28:44 +02:00
Oliver Blanthorn
1123554970
Merge pull request #1073 from joaomsa/feature/control-filename-position-in-editorcmd
Allow control over filename position in editorcmd
2018-10-09 17:24:17 +01:00
Joao Sa
9f39b6fb53 use %f instead of {} for editorcmd 2018-10-09 15:56:02 +00:00
glacambre
8acfbafe36
Add default_config help page to Tridactyl's about:addons entry 2018-10-09 16:09:30 +02:00
glacambre
68d337084b
Embed setting values in the help page
This commit adds input fields to some of the settings in the help page.
These input fields are filled with the value of the setting they
correspong to. Users can edit these values and save their modifications
by pressing <Enter>. This is an easy way to see and change settings and
hopefully enough to use as option page.

This is achieved by adding more ugly code to help.ts. Hopefully one day
we'll get rid of TypeDoc and do our own thing in React or whatever
framework we'll have choosen and things will be cleaner.
2018-10-09 15:58:17 +02:00
glacambre
e9aabaa865
Slightly improve documentation
This commit removes unnecessary documentation, tries to make the
introduction shorter and fleshes out the documentation of a few
under-documented functions.
2018-10-09 15:57:36 +02:00
glacambre
884b8fbe6d
Make :help configoption work
This commits makes getting to the help page of a configuration option
easier.
2018-10-09 15:57:10 +02:00
glacambre
8514209cf9
Allow embedded settings to wrap
The previous code used <ul> and <li> in order to generate the list of
aliases/bindings related to an ex command. This was semantically correct
but required ugly CSS hacks in order to display them on a single line.
On top of that, this line didn't wrap when the list of bindings/commands
was longer that the page and thus required scrolling horizontally.

This commit replaces <ul> with <p> and <li> with span. It inserts a
space between each span and simplifies the css a bit, this results in
lines of bindings/aliases wrapping neatly.
2018-10-09 15:40:06 +02:00
Oliver Blanthorn
0552d3d5ab
Merge pull request #1074 from glacambre/fix_doc_path
Fix default config doc path
2018-10-09 14:12:06 +01:00
glacambre
7375f8b7db
Fix default config doc path
3ec27fd broke the path to the default config documentation when moving
directories around. This commits fixes that.
2018-10-09 15:01:49 +02:00
Joao Sa
fe62ebe96b Allow control over filename position in editorcmd 2018-10-08 23:56:35 +00:00
Oliver Blanthorn
d5de3bf91c
Revert "Turn :bmarks into a proper excmd"
This reverts commit ad5e9db562.

Fixes broken `tabopen -c [container] [url]`.
2018-10-08 22:01:15 +01:00
Oliver Blanthorn
af405af883
Try to make exclaim give better errors 2018-10-08 18:25:37 +01:00
glacambre
3fe4e0f693
styling.ts: Fix theme not loading on non-tridactyl pages 2018-10-08 14:48:23 +02:00
glacambre
771ce6f983
excmds.ts: Fix loadtheme breaking when loading some themes
When trying to load a theme named `test.css`, `loadtheme()` would
attempt to store it in the config as `test.css`. But the config stored
it as an object named `test` which contained a key named `css` and this
broked everything. This is fixed by making sure that users do not
specify the `.css` part of the theme themselves, instead it will be
automatically added when trying to load the file.

Documentation has been updated accordingly.
2018-10-08 14:47:31 +02:00
glacambre
9788600d5d
colourschemes: Add various small improvements
- Update the readme to mention `colors $theme` rather than `set theme
  $theme` because `colors` is more powerful than `set theme`.
- Update the doc
- Version bump native messenger and nativegate check
2018-10-08 14:47:27 +02:00
glacambre
113fd9ef80
Implement loading themes from disk.
This fixes https://github.com/cmcaine/tridactyl/issues/491.
2018-10-08 14:47:06 +02:00
Oliver Blanthorn
048349bd37
Merge branch 'fix_902' 2018-10-08 12:23:40 +01:00
glacambre
ad5e9db562
Turn :bmarks into a proper excmd
Turning `:bmarks` into a proper excmd has several advantages: it will
show up in the `:help` pages, be available for excmd completions and
enbales adding specific arguments (such as "-t") in order to open
bookmarks in other tabs.

Doing this required moving tabopen and some of its dependencies to the
content script.

Closes https://github.com/tridactyl/tridactyl/issues/902.
2018-10-08 09:53:20 +02:00
glacambre
d48bf00f1f
Implement mergedeep function
Previously, running `config.get()` would result in only top level
objects being merged and returned. This means that if you ran
`config.get()`, the `nmaps` object would be the default one if no custom
bindings were defined, but it would not contain the default bindings if
custom bindings were defined.

This commit fixes that by implementing a mergeDeep function that makes
sure that children of the returned are merged with the default config.

Closes https://github.com/tridactyl/tridactyl/issues/390.
2018-10-07 17:03:46 +02:00
Oliver Blanthorn
d1479b2aaf
Merge pull request #1067 from glacambre/fix_noiframeon
Fix `:set noiframeon`
2018-10-07 14:38:24 +01:00
glacambre
42908799ae
Fix :set noiframeon
`:set noiframeon` has been broken since at least 1a1588a8 because of the
use of target.concat instead of target.push. This caused subsequent
config.set() calls to interpret every url except the last as being part
of the keys that needed to be set in the config rather that as urls that
should be saved in the noiframeon setting.
2018-10-07 13:52:48 +02:00
Oliver Blanthorn
98fca088a5
Merge pull request #1064 from glacambre/fix_825
Fix completions preventing relative tabmoves
2018-10-06 15:50:44 +01:00
glacambre
7c1718aac0
Fix completions preventing relative tabmoves
Buffer completions autoselect matches and this prevents relative
tabmoves from being easily performed. This is fixed by making sure that
autoselection only happens when the command doesn't look like a relative
tabmove.

Fixes https://github.com/tridactyl/tridactyl/issues/825
2018-10-06 16:39:23 +02:00
Oliver Blanthorn
86ddc368e1
Merge pull request #1062 from glacambre/catch_exception
commandline_frame.ts: Catch exception in input handler
2018-10-05 13:02:31 +01:00
glacambre
0fff3056cd
commandline_frame.ts: Catch exception in input handler
Because of the await in the input handler, exceptions that are thrown
for previous computations will be thrown for the current one too, even
if there's no reason for it to go wrong. We fix this by surrounding the
await keyword with a try/catch and simply logging the error.
2018-10-05 13:10:52 +02:00
Oliver Blanthorn
6ef16cc03b
Merge pull request #1061 from glacambre/errormsg_on_failed_xselection
excmds.ts: Display error messages when setclip/getclip fails
2018-10-05 10:32:05 +01:00
glacambre
e48951ca3c
excmds.ts: Display error messages when setclip/getclip fails
This commit makes {set,get}clip display error messages when they fail to
interact with the X selection. Somehow exceptions are lost somewhere so
we use fillcmdline manually. This problem will disappear once these
functions are moved to the content script.

Fixes https://github.com/tridactyl/tridactyl/issues/959
2018-10-05 10:36:37 +02:00