We move the `peer` and `revision` properties from the shared
`ProjectLoadedParams` interface to the `tree` and `history` subroutes
where they are needed.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
We remove the requirement that `LoadedSourceBrowsingView` needs to be
assignable to `ProjectParams["view"]`. This decouples `ProjectRoute` and
`ProjectLoadedRoute` and lets us modify them independently.
I did not use a common `routeParamsView` function because I prefer the
flexibility of being able to modify them independently while this area
of code changes a lot.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
We refactor the code that builds a URL from a project route so that it
is clearer that only the `tree` and `history` resource have some
complicated logic. We also eliminate the use of the shared `suffix`
variable. We now build the URL left-to-right.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
We stop handling the URL hash through the routing system. Hashes are
local to the current view and can be handled by the shown components.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
This way we can get rid of the project browsing specific ProjectLink
component and simplify the router types.
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
We don’t replace the path when we navigate internally. This means we
keep the hash part of the URL even if it is not part of the route and we
can remove the workaround for that.
This also means that we keep the original URL if the parsed route would
result in a different URL. This change is visible through a slight
adjustments in the tests.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
* Don’t load branches in `commits` view. We the branch selector is not
enabled there.
* Don’t silently swallow errors when fetching branches. Let the route
loading mechanism handle errors.
* Don’t use the default branch as the fallback for `branches`. They are
allowed to be empty and the empty case is handled properly now.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
We remove logic used in the `BranchSelector` component. Instead we
restructure the component properties and rely on the `Browser`,
`History` and `Commit` components to pass values that result in the same
behavior.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
Also uses same border-radius on comment and other events, and removes
the revision creation as a timeline event.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
We restricted the allowed parameters that are used for project-relative
navigation. This allows us to better understand which of the parameters
are used.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
To make the code easier to reason about we handle all app URL encoding
and decoding and the related seed BaseUrl extraction in a single place.
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
Adds also a root level comment to the cobFixture to avoid margin
regressions between root level comments
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
We only supported fetching the default httpd port (8080).
This commit removes navigation to `radicle.local` which represents
`0.0.0.0:8080`, and prepares the app for defining custom port.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>