We simplify the properties of the project views `Issue`, `Issues`,
`NewIssue`, and `Patch`. This aligns them with other project views and
makes the view selection consistent.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
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>
- prettier assumes now that we want to ignore files listed in .gitignore
by default
- trailingComma: all is now the default value
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
We prepare the data for `PeerSelector` and `BranchSelector` in the
`History` and `Browser` instead of `SourceBrowsingHeader`. This makes
the component APIs overall simpler and allows us to remove
`LoadedSourceBrowsingView`.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
There’s no need for the outer `if branches.length > 0`. We already
disable the dropdown unless `branches.length > 1`.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
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 were always calling `replace` and not passing the desired action in
the `navigateInternalOnAnchor`, this was leading to the URL not updating
when e.g. clicking on file URLs in Markdown renders.
By passing the action to the `navigate` fn instead we can also take the
`push` action into account.
Test have been written to guarantee this works
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
For a single commit view the source browsing header (peer selector,
branch selector, commits, contributor count) does not contain meaningful
information. We remove the header and simply show the commit.
See #938.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
We greatly reduce the numbers of properties that need to be passed to
`BranchSelector` and `PeerSelector` by constructing routes in
`SourceBrowsingHeader`. We’ll lift the logic out of
`SourceBrowsingHeader` in a follow-up.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
The `loadProjectRoute` function has become too big too understand. To
address this, we extract and separate the loading for the `tree` and
`history` views. This also gives us the opportunity to simplify some of
the code and parallelize more HTTP requests.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
Based on a new addition to marked, this commits replaces the imported
marked namespaces with a Marked class, that doesn't change when
`marked.use` introduces new options or extensions.
Also changes the naming slighty to use `markdown` as module, so it
sounds more generic.
Reference: https://github.com/markedjs/marked/pull/2831
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>
We switch to a project route type that is just a union. This has the
following advantages
* It’s much easier to construct project routes. Fewer properties are
needed and there are no nested objects.
* We eliminate the implicitly shared properties `path`, `peer`,
`revision` and `route` which only belonged to the tree route.
* The structure of the project route is more regular and thus easier to
understand.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
We determine URLs to mock with a URL matcher instead of mocking every
URL and determining the behavior in the route handler. This should be
slightly faster and should result in better debugging experience because
we don’t come across the `route.continue()` event that often.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>