Also does some refactoring for `action`, `editable` and other variables
we were using which weren't very clear
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
- This commit doesn't change the way syntax highlighting is done.
- But due to changes in `radicle-httpd` we can highlight the entire
files of a changeset, and then replace the plain text lines with
highlighted ones.
- Also highlights only the files currently visible of a changeset.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
libgit2 optimizes around not loading the content, when there's no
content callbacks configured.
So we aren't able to get a clear answer from radicle-surf if a file in a
diff is a binary or not.
A simple way without doing additional API requests is to check if the
file type is a executable and if there are no hunks (since we don't get
any deltas in binaries), this is a strong
indicator for a binary.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
Since Heartwood is removing some of the radicle-node options we were
relying on when starting nodes for our tests, we need to move those to
the `config.json` file.
To make it more DX friendly, I added a `NodeConfigurator` class which
reads the correspondig `config.json`, stores it and allows to configure
it before starting a node.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
To avoid the test nodes to try to connect to the main network,
we need to modify the `config.json` of each node to use the `test`
network
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
We still allow already published URLs with `/seeds/` in them to be
resolved.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
We use `defaultHttpdPort` for both exposed ports like on
seed.radicle.xyz as also for local ports e.g. radicle.local.
This worked fine, for now but has shown the first issues, when external
ports like 443 show up in the radicle.local connection dashboard.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
Instead of using always the `config.seeds.defaultHttpdPort` which is
443, we should take into account the `customPort` variable that is set by the
user.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
Uses the projects activity, fetched from `/projects/${id}/activity`
which is an array of commit timestamps.
So could suffer from some errors if commits with non current timestamps
are being used.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
We had a regression because of introducing marked-linkify-it, which took
links for CONTRIBUTING.md or HACKING.md as domains of a new page instead
than files to be navigating to.
This commit sets the `fuzzyLink` option for marked-linkify-it to false,
which disables this behavior
Also tests that the browser tree expands itself when navigating to a
file inside a directory
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
We switch the test for `pathToRoute` from a paramterized test to regular
tests. I had a lot of trouble finding the right properties to change
when a test in this group failed. The line number was not helpful at all
and the test description was burried inside an object.
We also rename `pathToRoute` to `urlToRoute` because the function takes
a `URL` as an argument.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>