Commit Graph

32 Commits

Author SHA1 Message Date
1784edefaf Remove unused imports, use a single Label fragment 2022-03-25 14:17:02 -07:00
ea98d97915 Move the edit labels modal into the page so the embedded react component does not bundle it
This will have a native modal on iOS
2022-03-25 14:03:01 -07:00
0859002c0c Remove next dependencies from the article components
This pulls next related deps up into the page instead of the
component and allows us to pull next out of the app reader
dependency.
2022-03-25 13:26:01 -07:00
59da82ddc7 Merge pull request #316 from omnivore-app/fix/bound-highlight-responses
Bridging for GQL highlight responses
2022-03-25 12:56:35 -07:00
e10c1a3671 Merge pull request #322 from omnivore-app/opt/import-lodash-debounce
Import just the debounce package to reduce bundle size
2022-03-25 11:14:13 -07:00
8e1526ce22 Merge pull request #311 from omnivore-app/OMN-158
[Omn-158] - Update the snackbar on web based on latest designs
2022-03-25 10:59:01 -07:00
d6fb21e6c4 Import just the debounce package to reduce bundle size 2022-03-25 10:57:35 -07:00
45d4a99d17 Fix Highlight type attributes 2022-03-24 13:52:38 -07:00
f1c20c731f don't bundle maxjax script tags for apple embeds 2022-03-24 09:18:07 -07:00
5ead3ea339 [Omn-158] - Update the snackbar on web based on latest designs 2022-03-24 01:28:15 +00:00
6db46ab8ae Remove the share highlight PDF menu item
This feature is temporarily disabled
2022-03-23 15:05:17 -07:00
6daa599b76 Separate the mutations out of lower level components
This will let us handle the mutations differently on native
iOS and should help in avoiding making web calls directly from
the web view, so we can avoid CORs and introduce a caching
layer.
2022-03-22 13:58:39 -07:00
4c535147f1 round reading progress to 100% if more than that
round reading progress to 100% if more than that

round reading progress to 100% if more than that
2022-03-18 14:56:49 +08:00
17edc482f6 update debounce timeout to be 2 seconds 2022-03-18 14:06:58 +08:00
1218bb0afd use lodash debounce the api call to save reading progress 2022-03-18 12:20:45 +08:00
463e569e57 In /app use the window to scroll to initial read position
There isn't a scrollElementRef in `/app` because there is no
fixed header, so this will scroll the entire document instead.
2022-03-16 12:47:28 -07:00
e652a6ea8c Rebased version of the elastic PR (#225)
* Add elastic to our docker compose

* add AND/OR/NOT search operations

* add elastic and create article in elastic

* change error code when elastic throws error

* add search pages in elastic

* add search by labels

* Add elastic to GitHub Action

* Update elastic version

* Fix port for elastic

* add url in search query

* Set elastic features when running tests

* add debug logs

* Use localhost instead of service hostname

* refresh elastic after create/update

* update search labels query

* add typescript support

* search pages in elastic

* fix search queries

* use elastic for saving page

* fix test failure

* update getArticle api to use elastic

* use generic get page function

* add elastic migration python script

* fix bulk helper param

* save elastic page id in article_saving_request instead of postgres article_id

* fix page archiving and deleting

* add tests for deleteArticle

* remove custom date type in elastic mappings which not exist in older version of elastic

* fix timestamp format issue

* add tests for save reading progress

* add tests for save file

* optimize search results

* add alias to index

* update migration script to receive env var as params

* Add failing test to validate we don't decrease reading progress

This test is failing with Elastic because we aren't fetching
the reading progress from elastic here, and are fetching it
from postgres.

* Rename readingProgress to readingProgressPercent

This is the name stored in elastic, so fixes issues pulling the
value out.

* Linting

* Add failing test for creating highlights w/elastic

This test fails because the highlight can't be looked up. Is there
a different ID we should be passing in to query for highlights,
or do we need to update the query to look for elastic_id?

* add tests code coverage threshold

* update nyc config

* include more files in test coverage

* change alias name

* update updateContent to update pages in elastic

* remove debug log

* fix createhighlight test

* search pages by alias in elastic

* update set labels and delete labels in elastic

* migration script enumeration

* make BULK_SIZE an env var

* fix pdf search indexing

* debug github action exit issue

* call pubsub when create/update/delete page in elastic

* fix json parsing bug and reduce reading data from file

* replace a depreciated pubsub api call

* debug github action exit issue

* debug github action exit issue

* add handler to upload elastic page data to GCS

* fix tests

* Use http_auth instead of basic_auth

* add index creation and existing postgres tables update in migration script

* fix a typo to connect to elastic

* rename readingProgress to readingProgressPercent

* migrate elastic_page_id in highlights and article_saving_request tables

* update migration script to include number of updated rows

* update db migration query

* read index mappings from file

* fix upload pages to gcs

* fix tests failure due to pageContext

* fix upload file id not exist error

* Handle savedAt & isArchived attributes w/out quering elastic

* Fix prettier issues

* fix content-type mismatching

* revert pageId to linkId because frontend was not deployed yet

* fix newsletters and attachment not saved in elastic

* put linkId in article for setting labels

* exclude orginalHtml in the result of searching to improve performace

* exclude content in the result of searching to improve performace

* remove score sorting

* do not refresh immediately to reduce searching and indexing time

* do not replace the backup data in gcs

* fix no article id defined in articleSavingRequest

* add logging of elastic api running time

* reduce home feed pagination size to 15

* reduce home feed pagination size to 10

* stop revalidating first page

* do not use a separate api to fetch reading progress

* Remove unused comment

* get reading progress if not exists

* replace ngram tokenizer with standard tokenizer

* fix tests

* remove .env.local

* add sort keyword in searching to sort by score

Co-authored-by: Hongbo Wu <hongbo@omnivore.app>
2022-03-16 12:08:59 +08:00
f29d0fdb71 Prettier fix 2022-03-09 19:17:33 -08:00
be75bfdd0b Only updating reading progress if scroll position changes 2022-03-09 19:12:55 -08:00
bf035a4ec4 use window to track scrolling for /app web routes 2022-03-09 13:40:18 -08:00
ddb13770d3 set position to fixed for article container wrapper in /app routes 2022-03-09 13:40:18 -08:00
191fcb2675 send reading progres updates from embedded web views 2022-03-09 13:40:18 -08:00
8109dd3a85 Fix implementation of u key
The `u` key isn't supposed to be a general purpose back key, there
is a `b` command for that. The `u` key should just be used as an
"up" command to go from the reader to the library.
2022-03-08 12:57:59 -08:00
3d72d0f9d5 Dont use <Script inside next/head 2022-03-03 20:56:16 -08:00
fb6564a126 Use next/script for Mathjax 2022-03-03 20:37:04 -08:00
c2dd4143ff Ensure font size changes are persisted 2022-03-01 12:04:19 -08:00
84fbc9cd27 Add code highlighting using highlight.js 2022-02-26 14:57:59 -08:00
81324c128d update selected labels once close the modal 2022-02-24 14:47:47 +08:00
6482d280f7 add loading and set labels ui 2022-02-24 14:47:33 +08:00
8f68b60f18 Add basic UI for editing labels 2022-02-24 14:44:49 +08:00
4b06e52128 Tweak the line height for reader text and titles
We still aren't using the degular font, so I kept the font sizes
the same as they are now. We will need to update if we change
the font.
2022-02-18 00:45:40 -08:00
84f32935f5 Open source omnivore 2022-02-11 09:24:33 -08:00