This new component doesn't rely on marked.js but escapes any special
characters and then replaces any backtick with a <code> HTML tag to
render any inline codeblocks in all titles.
Since the legacy config is being deprecated at the end of 2024, we
should start moving to the eslint flat config.
I avoided the tseslint config helper function so we avoid wrapping
magic.
This seems to have triggered more checking since any checks in svelte
files have appeared and the $$Generic type that is being deprecated had
to be rewritten.
Also fixes some any types that weren't caught previously
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 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 replace the tests for `routeToPath` with a test that calls
`pathToRoute(routeToPath(route))`. These test do not only cover the
assertions of the previous tests but also check an important invariant
for route parsing and building.
I’m not using `test.each` here because this makes the tests less
readable.
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>
- Clicking on the project in various places goes now to `../<rid>`
instead of `../<rid>/tree/<commit>`
- Project URL on seed allows trailing slash, eg. `../<rid>/`
- Navigating to a project URL with a `remotes/<nodeId>` suffix works now
correctly w or w/o trailing slash
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This allows people to either search for their vesting contract through
the search form or visit directly `vesting/<contract address>`
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
Playwright is more flexible and has better developer experience than Cypress.
We add end to end tests covering:
- project source browsing
- tree view
- commit list view
- commit view
- routing
- hash based
- history API based
- clipboard copy paste functionality
- seed view
- project search
- landing page view
- settings
Co-authored-by: Sebastian Martinez <me@sebastinez.dev>
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>