Commit graph

10 commits

Author SHA1 Message Date
Mikkel Denker
110f4cdffd disallow bots from /search in robots.txt 2024-03-22 11:05:44 +01:00
Mikkel Denker
e71570e7f7 minor frontend improvements mobile
* [ios] discussion widget had two icons as <summary> list-none was not respected on safari.
* [ios] added a viewport width to remove horizontal scrolling.
* [ios] increased font size of searchbar to prevent ios from zooming when searchbar gets selected.
* 'found x results' was ugly on mobile. now only shown on desktop
* decreased font size of optic and language selector to not remove attention from results. hopefully they are still noticed.
* added og:title and og:image to improve experience when stract is linked from somewhere.
2024-01-02 13:15:43 +01:00
Mikkel Denker
54fe19ddf6 trystract.com -> stract.com 2023-12-16 14:43:00 +01:00
Mikkel Denker
4eb8ef3892
Precalculate slow inbound similarities (#114)
* pre-calculate inbound similarities

* only pre-calculate similarities for nodes that have many inbound links

* tweak dark theme

* parallel inbound pre-calculation
2023-12-12 18:26:25 +01:00
Mikkel Denker
4c8973eb1a update robots.txt 2023-12-04 08:14:39 +01:00
Mikkel Denker
f30e9131f9 New spell corrector training.
I have just now gotten to the point where we can test this, so it definitely doesn't work yet but must o
f the parts should be there.
2023-11-30 15:47:56 +01:00
Mikkel Denker
97f2f37eb7 new logo text 2023-11-23 10:08:51 +01:00
Mikkel Denker
95fb9a871d autosuggest browser 2023-09-10 19:56:56 +02:00
Oliver Bøving
2e2aff3da0
🥬 Svelte frontend (#91)
* remove deno frontend

* Add Svelte frontend

* change frontend port to 8000 and autofocus searchbar on frontpage

* Setup formatting of the new frontend with the new monorepo

* Add "show more" button to explore

* Add searchbar arrow key navigation

* Update query based on navigation in search bar

* Highlight mathcing prefix in search results

* Add toggling of site rankings to search results

* Fix crashing when having multiple semi-identical optics

* Refactor searchbar visibility

---------

Co-authored-by: Mikkel Denker <mikkel@trystract.com>
2023-09-10 16:32:03 +00:00
Oliver Bøving
072a6323e9
🍋 Fresh frontend (#84)
* Add fresh frontend

This reimplements the existing frontend using Fresh. Primay highlights of
this new frontend is:

- Uses deno instead of node/npm for less dependencies. Deno for example
  includes a formatter and linter, and dependencies are downloaded
  automatically.
- Everything is TypeScript. There is no more .astro or similar, which
  reduces complexity.
- The frontend is built up of components entirely, which can either be
  server side rendered only, or rehidrated on the client for
  interactivity (islands).
- Fresh server side renderes all requests, populated by using the API,
  which is typesafe and generated from the OpenAPI spec.
- Combining the last two, it becomes much easier to add high levels of
  interactivity, which needed to be written in external JS files. Now
  these are Preact component and can use all lthe benefits that comes
  from this.

Future work includes:
- [ ] Integrating Alice in the new UI
- [ ] Direct answers UI
- [ ] Default Optics. Should they come from the API or the frontend?
- [ ] Integrating the new fresh server with the existing backend
- [ ] Rutes supplying `queryUrlPart` to `Header`

* Update fresh frontend to use "type" rather than "@type"

* Add placeholder Tailwind config for VSCode intellisense

* Add discussions UI

* Clean up some left over template `{{...}}`

* './icons' might not exist before generation

* some UI/UX changes for consistency with old frontend

* Remove unused ENABLE_CSP flag since it is always enabled now

* Store icons used for the frontend in the repository

* Don't generate icons when starting the frontend

* Fix chat textarea sizing in Firefox

* Add Chat UI to new frontend

* Only allow one of liked, disliked, blocked at a time

* Add `curosr-pointer` to safe search radio buttons

* Add `leading-6` to articles to get more line spacing

Almost equivalent to the old frontend

* Prefix explore and site ranking links with https://

Perhaps we should determine the protocol in a more robust way?

* Fix explore sites regressions from adding tailwind-forms

* Refactor manage optics UI

* Add API endpoint for exporting optic from site rankings

`/beta/api/sites/export` is a JSON equivilant of the existing
`/settings/sites/export` endpoint.

* Add "Export as optic" and "Clear all and export as optic" buttons

These new buttons use the new `/beta/api/sites/export` endpoint to
download the generated optic

* Store site rankings in URL and send it during searching

* Use the tailwind config to extend the twind theme

* Add `/beta/api/explore/export` API endpoint

* Fix optics export button on explore

* Reflect the currently searched optic in the optic selector

* Add `noscript:hidden` class to hide fx search result adjust buttons

* Re-search when changing ranking of a webpage

* Refactor searchbar interaction and suggestion highlighting

We now do the highlighting on the frontend

* Change site blocking to be domain blocking when converting site rankings to optics.
The domain field uses the public suffix list which already handles suffixes that can be shared by multiple users (netlify.app etc.).
In other words, the domain of 'site.netlify.app' is 'site.netlify.app', so users of stract can still block specific netlify sites without blocking them all.

* Pass around `queryUrlPart` between pages

* Do syntax highlighting server-side using HighlightJS

* Remove `facebook.com` as default site in explore

* Add webmasters page to new frontend

* Remove old frontend

* Remove dead code from old Rust frontend

* Rename webstract to frontend

* remove more stuff from old frontend

---------

Co-authored-by: Mikkel Denker <mikkel@trystract.com>
2023-09-04 05:59:28 +00:00