Commit Graph

52 Commits

Author SHA1 Message Date
541e4ebe37 feat: Show drafts to author in collections (#1134) 2020-01-02 21:17:29 -08:00
76365e8560 fix: Double scrollbars on search filter dropdowns
closes #1125
2019-12-23 18:08:40 -08:00
595cb9cda5 fixes: Document menu on search results is empty if not previously loaded
closes #1124
2019-12-23 17:59:15 -08:00
c20282de06 feat: Add child document preloading 2019-12-22 17:06:39 -08:00
5731ff34a4 fix: Archived and then deleted documents appear in archived tab after loading trash 2019-12-07 12:39:49 -08:00
e404955394 feat: Trash (#1082)
* wip: trash

* Enable restoration of deleted documents

* update Trash icon

* Add endpoint to trigger garbage collection

* fix: account for drafts

* fix: Archived documents should be deletable

* fix: Missing delete cascade

* bump: upgrade rich-markdown-editor
2019-11-18 18:51:32 -08:00
b42e9737b6 feat: Memberships (#1032)
* WIP

* feat: Add collection.memberships endpoint

* feat: Add ability to filter collection.memberships with query

* WIP

* Merge stashed work

* feat: Add ability to filter memberships by permission

* continued refactoring

* paginated list component

* Collection member management

* fix: Incorrect policy data sent down after collection.update

* Reduce duplication, add empty state

* cleanup

* fix: Modal close should be a real button

* fix: Allow opening edit from modal

* fix: remove unused methods

* test: fix

* Passing test suite

* Refactor

* fix: Flow UI errors

* test: Add collections.update tests

* lint

* test: moar tests

* fix: Missing scopes, more missing tests

* fix: Handle collection privacy change over socket

* fix: More membership scopes

* fix: view endpoint permissions

* fix: respond to privacy change on socket event

* policy driven menus

* fix: share endpoint policies

* chore: Use policies to drive documents UI

* alignment

* fix: Header height

* fix: Correct behavior when collection becomes private

* fix: Header height for read-only collection

* send id's over socket instead of serialized objects

* fix: Remote policy change

* fix: reduce collection fetching

* More websocket efficiencies

* fix: Document collection pinning

* fix: Restored ability to edit drafts
fix: Removed ability to star drafts

* fix: Require write permissions to pin doc to collection

* fix: Header title overlaying document actions at small screen sizes

* fix: Jank on load caused by previous commit

* fix: Double collection fetch post-publish

* fix: Hide publish button if draft is in no longer accessible collection

* fix: Always allow deleting drafts
fix: Improved handling of deleted documents

* feat: Show collections in drafts view
feat: Show more obvious 'draft' badge on documents

* fix: incorrect policies after publish to private collection

* fix: Duplicating a draft publishes it
2019-10-05 18:42:03 -07:00
e2b28dfeb7 refactor: Policies Architecture (#1016)
* add policy serialize method

* Add policies to collection responses

* wip

* test: remove .only

* refactor: Return policies with team and document requests

* store policies on the client

* refactor: drive admin UI from policies
2019-08-21 21:41:37 -07:00
d024d31f66 refactor: flow typing (#1012)
* fix: padding

* fix: Minor button alignment issues

* feat: Add icon to invite people button

* WIP
2019-08-08 23:09:09 -07:00
c9b86ec2e7 Fix document duplicate command (#1003) 2019-07-27 10:33:38 -07:00
091e542406 feat: Backlinks (#979)
* feat: backlinks

* feat: add backlinkDocumentId to documents.list

* chore: refactor
fix: create and delete backlink handling

* fix: guard against self links

* feat: basic frontend
fix: race condition

* styling

* test: fix parse ids

* self review

* linting

* feat: Improved link styling

* fix: Increase clickable area at bottom of doc / between references

* perf: global styles are SLOW
2019-07-07 19:25:45 -07:00
5a6b9caabc fix: bring local and remote delete inline 2019-06-26 22:18:18 -07:00
ce675a7fe2 fix: Remove collections/document when removed elsewhere 2019-06-26 22:10:24 -07:00
da7fdfef0a Improved search filtering (#940)
* Filter search by collectionId

* Improve spec, remove recursive import

* Add userId filter for documents.search

* 💚

* Search filter UI

* WIP UI

* Date filtering
Prevent dupe menu

* Refactor

* button

* Added year option, improved hover states

* Add new indexes

* Remove manual string interpolation in SQL construction

* Move dateFilter validation to controller

* Fixes: Double query when changing filter
Fixes: Visual jump between filters in dropdown

* Add option to clear filters

* More clearly define dropdowns in dark mode

* Checkbox -> Checkmark
2019-04-23 07:31:20 -07:00
07a941a65d Websocket Support (#937)
* Atom / RSS meta link

* Spike

* Feeling good about this spike now

* Remove document.collection

* Remove koa.ctx from all presenters to make them portable outside requests

* Remove full serialized model from events
Move events.add to controllers for now, will eventually be in commands

* collections.create event
parentDocument -> parentDocumentId

* Fix up deprecated tests

* Fixed: Doc creation

* documents.move

* Handle collection deleted

* 💚

* Authorize room join requests

* Move starred data structure
Account for documents with no context on sockets

* Add socket.io-redis

* Add WEBSOCKETS_ENABLED env variable to disable websockets entirely for self hosted
New installations will default to true, existing installations to false

* 💚 No need for promise response here

* Reload notice
2019-04-17 19:11:23 -07:00
763f57a3dc Move document improvements (#927)
* Show all collections in UI

* Introduce command pattern

* Actually remove from previous collection

* Stash

* Fixes: Promises resolved outside of response lifecycle

* 💚

* 💚

* documentMover tests

* Transaction

* Perf. More in transactions
2019-04-08 21:25:13 -07:00
642c11ff7d Document Archive (#921)
* WIP: Archive

* WIP

* Finishing up archive endpoints

* WIP

* Update docs

* Flow

* Stash

* Add toast message confirmations

* Redirect handling, fixed publishhing info for archived docs

* Redirect to collection instead of home, remove unused pub info

* Account for deleted parent

* Trash -> Archive
Allow reading of archived docs

* Dont overload deletedAt

* Fixes

* 💚

* ParentDocumentId wipe for unarchived sub docs

* Fix: CMD+S exits editing
Fix: Duplicate user name on published but unedited docs

* Improve jank on paginated lists

* Prevent editing when archived

* 💚
Separate lint / flow steps
2019-04-06 16:20:27 -07:00
4f4e55d120 Fixes: New document creation 2019-01-19 18:14:10 -08:00
4ba10fc5f7 Implements local search cache
Results no longer disappear when searching something previously searched
Navigating from a document back to results is now instant
Search item in left nav no longer unhighlights
2019-01-09 21:57:17 -08:00
c78bf3c4bf Display document views (#849)
* Display who has viewed a document in the header

* Add overflow, display of WHEN last viewed
Cleanup old document attributes
Add firstViewedAt, lastViewedAt to API response

* Cleanup

* Added: API documentation for views endpoints

* Include views for deleted users
2019-01-08 22:49:20 -08:00
70c93fcc86 Refactor, add alphabetical sort 2019-01-07 23:42:55 -08:00
e6e89dc243 Added: Recently published view to collection
Added: Infinite scroll to collection
2019-01-07 23:14:43 -08:00
8cbcb77486 Base model refactor (#810)
* Big upgrades

* WIP: Stash

* Stash, 30 flow errors left

* Downgrade mobx

* WIP

* When I understand the difference between class and instance methods

* 💚

* Fixes: File import
Model saving edge cases
pinning and starring docs
Collection editing
Upgrade mobx devtools

* Notification settings saving works

* Disabled settings

* Document mailer

* Working notifications

* Colletion created notification
Ensure not notified for own actions

* Tidy up

* Document updated event only for document creation
Add indexes
Notification setting on user creation

* Commentary

* Fixed: Notification setting on signup

* Fix document move / duplicate stale data
Add BaseModel.refresh method

* Fixes: Title in sidebar not updated after editing document

* 💚

* Improve / restore error handling
Better handle offline errors

* 👕
2018-12-04 22:24:30 -08:00
76924e70f5 Fix ordering of recently updated documents
Edited -> Updated
2018-11-20 20:18:24 -08:00
ecc7ba0e9d Added: Collection to starred view
Alphabetical sort to starred view
2018-11-19 23:01:49 -08:00
54a04dd8cc Linting [ci skip] 2018-08-26 15:27:32 -07:00
6cd7d5ca5b Fixes: Homepage pagination 2018-08-11 14:02:37 -07:00
63f6d61ac0 Linting
Pagination of edited / viewed responses
2018-08-11 00:46:10 -07:00
d308442fef Refactor, paginate on scroll
New PaginatedDocumentList component
2018-08-10 23:03:47 -07:00
266b4d735c Tidy, tidy 2018-08-10 00:11:58 -07:00
2f681b1ce8 WIP: Dashboard tabs 2018-08-09 23:14:51 -07:00
e192bcbaee Improves ordering of search results
Modifies documents.search to return a context snippet and search ranking
Displays context snipped on search results screen
2018-08-04 18:32:56 -07:00
3874fc9b3d Closes #673 - Redirect to new document after duplicating 2018-07-21 12:55:40 -07:00
458d9b5d99 Fixes: Issue saving after draft 2018-07-04 13:00:53 -07:00
f8cd3bf8c4 Improved offline handling 2018-06-07 21:35:40 -07:00
2d02093f48 Added 'duplicate' menu option
For now duplicates next to original document in the same collection
2018-06-05 06:57:26 -07:00
f633f63a61 Merge ErrorsStore into UiStore 2018-05-31 11:42:39 -07:00
187c2dcb27 Working share link loading (plenty of restrictions still to put in place) 2018-05-16 23:52:26 -07:00
500d039856 Retrieve documents using shareId 2018-05-13 13:26:06 -07:00
dded458582 Setup for unauthenticated doc viewing 2018-05-12 21:01:17 -07:00
18b0338736 Pinned documents (#608)
* Migrations and API for pinned documents

* Documentation

* Add pin icon

* Fin.

* v0.2.0

* Remove pin from DocumentPreview, add general menu
Add Pinned documents header

* Tidy

* Fixed: Drafts appearing on collection home
2018-02-28 23:28:36 -08:00
9142d975df Draft Documents (#518)
* Mostly there

* Fix up specs

* Working scope, updated tests

* Don't record view on draft

* PR feedback

* Highlight drafts nav item

* Bugaboos

* Styling

* Refactoring, gradually addressing Jori feedback

* Show collection in drafts list
Flow fixes

* Ensure menu actions are hidden when draft
2018-02-27 22:41:12 -08:00
47da3f2b9b Increase collections pagination limit (#561)
* I think this is the pragmatic solution for now. We can readdress later.
Also renamed fetchAll, to the more accurate fetchPage

* 💚
2018-02-04 12:30:35 -08:00
5ab423108a Fixed collection deletion 2018-01-28 17:04:53 -08:00
2d70618f01 Tweaks for seamless save of new doc 2017-12-28 12:35:59 +00:00
98124a1c4b linting 2017-12-03 19:48:50 -08:00
5df2983ef6 Search improvements 2017-12-03 16:50:50 -08:00
37ed61d9c8 Fixes: Issue with missing collection id 2017-11-28 08:55:15 -08:00
33fea77a86 PR feedback, remove collectionId 2017-11-26 18:18:41 -08:00
81edb55d56 Working recently edited list 2017-11-26 18:18:40 -08:00