Commit Graph

25 Commits

Author SHA1 Message Date
1784edefaf Remove unused imports, use a single Label fragment 2022-03-25 14:17:02 -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
0a459a20c4 Show success/error toasts for archiving and removing 2022-03-25 10:35:19 -07:00
45d4a99d17 Fix Highlight type attributes 2022-03-24 13:52:38 -07:00
5392265a5e Bridge response values from highlight mutations back to JS in the format it expects 2022-03-24 10:52:26 -07:00
f3edb9ca7a Reduce the data fetched when creating highlights
This reduces the fields on the highlight type, and reduces what
we fetch. We are doing this so its easier to bind from Swift and
pass back simpler types for create/update/merge highlight
operations
2022-03-24 10:50:46 -07:00
1ff66da756 Merge commit '6e36bb271f595d6dfe02ddee320980d433917d35' into OMN-189 2022-03-23 21:15:19 +00: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
1f517104ae [OMN-189] : Settings View - Emails 2022-03-22 02:15:04 +00:00
7650a12be3 fix reading progress not updated after reading by updating cache (#258) 2022-03-18 09:58:08 +08: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
9e82b1c8a7 Dont fetch labels until we switch to elastic 2022-03-12 21:03:10 -08:00
f9af4ec2d8 Remove unused shareInfo from GQL queries 2022-03-11 13:12:34 -08:00
38a6ee9394 Remove unused attributes from article queries 2022-03-11 12:59:50 -08:00
cd90d3a402 Add typing on the error filter query 2022-03-01 14:40:36 -08:00
1557136e81 Use the outer query value in gqlFetcher call
The inner query value never changes, so no need to worry
with type casting this here, it will always be a string.
2022-03-01 14:28:21 -08:00
ecb44c4c80 Add labels to library items query, improve design of labels 2022-03-01 08:54:19 -08:00
7bf454ae91 use dataloader to fetch all labels of a list of linkIds in a single q… (#133)
* use dataloader to fetch all labels of a list of linkIds in a single query and cached

* add labels in GQL query in frontend
2022-02-28 12:13:26 +08:00
42511a5439 Remove the labels query from GetArticle 2022-02-24 20:54:22 -08:00
3d98604d97 remove labels in getArticles query 2022-02-25 11:44:05 +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
4d770399bd add labels testing page 2022-02-24 14:44:49 +08:00
84f32935f5 Open source omnivore 2022-02-11 09:24:33 -08:00