This improves UX making it easier to find the tab that I'm looking for
when I have multiple tabs open.
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
We simplify some of the choices for `ProjectLoadedView` by reducing the
nesting and removing redundant properties.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
To avoid the popping up of a terminal input field during the
globalFixture setup, we need to pass the wanted alias as a flag.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
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>
This fixture is simil to the way Playwright handles fixtures, which are
being setup and teardown for each test.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
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 remove all styling related lints and use `eslint-config-prettier`.
There’s no need to bother developers with styling lints because
Prettier already takes care of that. (This is the [recommended
integration with Prettier][1])
* We use the “warning” level for lints that are code style related. This
allows developers to distinguish issues that need to be fixed now
(like type errors) and issues that can be fixed later (like style
errors). We do enforce all lints on CI by settings
`--max-warnings=0`.
[1]: https://prettier.io/docs/en/integrating-with-linters.html
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>
To avoid port collisions between tests that can eventually run in
parallel, we need to be able to generate random port numbers.
This commit generates random httpd port numbers for inline tests,
while keeping the current palm seed with the default port number 8080.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
The end-to-end tests no run against the app served on port 3001 so that
we don’t need to shut down the development server.
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
We remove a couple of calls to `console.error()` in the code for the
local node connection. It’s not necessary to log errors that are
expected, for example, if the node is down.
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>