Compare commits

...

1343 Commits

Author SHA1 Message Date
Tom Moor 2aaad03270 refactor 2020-08-20 19:05:48 -07:00
Tom Moor 9252683260 fix: SocketPresence account for socket changing 2020-08-20 00:06:51 -07:00
Tom Moor f5748eb5e7 check connection on page visibility change 2020-08-19 22:51:18 -07:00
Tom Moor 0555fd2caa pref: JS bundling improvements (#1461)
* perf: Split only initial vendors
2020-08-17 22:09:12 -07:00
Tom Moor d885252fb0 fix: Mobile style fixes and improvements (#1459)
* fixes #1457 – check for matchMedia function before using it

* fixes: Depth issues
closes #1458

* fixes: Long breadcrumbs cause horizontal overflow

* fix: Improve tabs and overflow on mobile
2020-08-17 00:08:22 -07:00
Tom Moor df9b0bcf91 fix: Websocket reconnect when navigating from settings -> home 2020-08-14 17:47:12 -07:00
Tom Moor 31910f1628 Remove auto reconnect, increase reconnectionDelayMax 2020-08-14 17:25:55 -07:00
Tom Moor 14cb3a36c1 perf: Reduce initial bundle size / async bundle loading (#1456)
* feat: Move to React.lazy

* perf: Remove duplicate babel/runtime

* fix: Run yarn-deduplicate

* Further attempts to remove rich-markdown-editor from initial chunk

* perf: Lazy loading of authenticated routes

* perf: Move color picker to async loading
fix: Display placeholder when loading rich editor

* fix: Cache bust on auto reload
2020-08-14 17:23:58 -07:00
Tom Moor d3350c20b6 perf: Attempt websocket connection before polling 2020-08-14 13:37:11 -07:00
Tom Moor 174acfac32 fix: Unnecessary shares.info request when loading public share (#1453)
closes #1450
2020-08-13 16:48:03 -07:00
Tom Moor 9ef4e2b437 Update LICENSE 2020-08-12 20:04:48 -07:00
Tom Moor 8088da8cf3 0.46.0 2020-08-12 20:03:57 -07:00
Tom Moor 221ee48429 fix: Don't mangle class names in production 2020-08-12 19:28:15 -07:00
Tom Moor ffe8c046ef fix: Bump RME – Improves floating toolbar behavior 2020-08-12 17:01:27 -07:00
Tom Moor dbe8a10702 fix: Login to X should be centered when team name wraps to newline 2020-08-12 14:05:32 -07:00
Tom Moor 11f7e3a060 chore: Bundle Stats / Webpack v4 (#1448)
* chore: Experiment with bundle size monitoring service

* chore: Ensure build runs on CI, move lint and flow before test

* chore: Upgrade Webpack v3 -> v4

* chore: Add webpack-cli
Remove unused dep
Move deps to dev

* Move babel deps to production

* Move babel deps to production
2020-08-12 13:16:10 -07:00
Tom Moor 0f41a04e49 refactor: Remove centralized Modal management (#1444)
* refactor: Finally remove centralized Modals component

* chore: Cleanup related unused methods in UiStore
2020-08-12 10:49:15 -07:00
Tom Moor d055021ad4 chore: Remove all usage of collection.type (#1445)
* chore: Remove all usage of collection.type

* migration: Remove type column
2020-08-12 10:49:02 -07:00
Tom Moor 810dc5a061 feat: Clicking the last updated time should open document history sidebar
Ref #1285
2020-08-11 21:01:03 -07:00
ktfth 7abe375b3e refactor: Removed unusued index on the onSearchLink (#1420)
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-08-11 19:59:11 -07:00
Tom Moor 63371d8f5b flow 2020-08-11 18:59:57 -07:00
Tom Moor 6e61df0729 fix: Improved loading jank fix, new DelayedMount component 2020-08-10 21:30:12 -07:00
Tom Moor 5ddc4000d0 fixes: Strange scroll behavior on long collection descriptions
closes #1391
2020-08-10 16:23:55 -07:00
Tom Moor 48b61559cc fixes: JS error when attempting to show toast messages from collection description editor 2020-08-10 16:04:23 -07:00
Tom Moor 0cac5cfe51 fix: Prevent reload loop with error on editor load 2020-08-10 15:52:45 -07:00
Tom Moor e9ce80a3aa fixes: Case where websocket will not reconnect
closes #1384
2020-08-09 23:25:27 -07:00
Tom Moor 07d488c826 fix: GitHub Gist embed reliability, closes #1400 2020-08-09 21:53:57 -07:00
Tom Moor e2bd03494d chore: Update syntax, improve more typing (#1439)
* chore: <React.Fragment> to <>

* flow types
2020-08-09 09:48:04 -07:00
Tom Moor ead55442e0 flow: Restore lesser flowtype for styled-components
The current flow-typed def requires an insane amount of manual typing that just doesnt
make any sense. Restoring the old definition for now:
https://github.com/flow-typed/flow-typed/issues/3766
2020-08-08 23:41:02 -07:00
Tom Moor 449dc55aaa chore: Upgrade Babel, Jest, Eslint (#1437)
* chore: Upgrade Prettier 1.8 -> 2.0

* chore: Upgrade Babel 6 -> 7

* chore: Upgrade eslint plugins

* chore: Add eslint import/order rules

* chore: Update flow-typed deps
2020-08-08 22:53:59 -07:00
Tom Moor e312b264a6 chore: Upgrade Prettier 1.8 -> 2.0 (#1436) 2020-08-08 18:53:11 -07:00
Tom Moor 68dcb4de5f fix: Catch expected error when shares.info returns 404 2020-08-08 17:55:21 -07:00
Tom Moor d2b9a5c03f fix: Various React errors in console 2020-08-08 17:51:40 -07:00
Tom Moor 1b023fb6d7 fix: Remove flash of loading state for document lists 2020-08-08 17:39:30 -07:00
Tom Moor afe4553a7e chore: Resolve 2 open security alerts 2020-08-08 17:35:42 -07:00
Tom Moor 139e2e29d7 flow 2020-08-08 17:12:36 -07:00
Tom Moor 638418432a test 2020-08-08 16:32:12 -07:00
Tom Moor c6d2467fae chore: Upgrade Flow to v0.104.0 2020-08-08 16:26:20 -07:00
Tom Moor e9387db895 chore: Remove unused flow-typed 2020-08-08 16:05:32 -07:00
Tom Moor 065d04ec98 chore: Missing flow types 2020-08-08 15:58:34 -07:00
Tom Moor 869fc086d6 feat: Templates (#1399)
* Migrations
* New from template
* fix: Don't allow public share of template
* chore: Template badges
* fix: Collection active
* feat: New doc button on template list item
* feat: New template menu
* fix: Sorting
* feat: Templates onboarding notice
* fix: New doc button showing on archived/deleted templates
2020-08-08 15:18:37 -07:00
dependabot[bot] 59c24aba7c chore(deps): bump elliptic from 6.5.2 to 6.5.3 (#1406)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-30 19:23:44 -07:00
Tom Moor bc4806ac30 feat: Allow checkboxes to be toggled without going into 'edit' mode (#1349) 2020-07-28 20:43:34 -07:00
Tom Moor 169ad5b025 feat: Sharing improvements (#1388)
* add migrations

* first pass at API

* feat: Updated share dialog UI

* tests

* test

* styling tweaks

* feat: Show share state on document

* fix: Allow publishing share links for draft docs

* test: shares.info
2020-07-28 19:14:32 -07:00
Tom Moor 0b33b5bc05 company -> team 2020-07-25 11:33:04 -07:00
Tom Moor 109efcaa27 chore: Remove WEBSOCKETS_ENABLED flag (#1383)
* chore: Remove WEBSOCKETS_ENALBED flag

* lint
2020-07-22 22:44:24 -07:00
Nan Yu 2cc6d7add8 fix: added missing call to onOpen (#1378) 2020-07-21 21:35:27 -07:00
Joona Heikkilä 003d82fe8a refactor: Fix updater's use of UPDATES_KEY (#1376) 2020-07-21 15:05:09 -07:00
Tom Moor f75a07cb0d fix: Remove ugly blue cross 2020-07-20 19:53:13 -07:00
Tom Moor 0d6720e499 fix: Heading style regressions 2020-07-20 19:43:30 -07:00
Tom Moor a97a1df5f1 fix: Extra active outline around editor toolbar buttons 2020-07-20 19:37:50 -07:00
Tom Moor 822395c265 chore: Remove emojis from welcome docs 2020-07-20 19:14:15 -07:00
Tom Moor 96d6e9b85e fix: Breadcrumb spacing 2020-07-20 19:09:51 -07:00
Tom Moor 70e1194f90 feat: Notice blocks available as new editor options (#1371)
* feat: Notice blocks available as new editor options

* fix: styling tweak
feat: Add shortcut to keyboard modal

* add notices to welcome docs

* styling tweaks

* styling tweaks

* styling tweaks
2020-07-20 19:03:14 -07:00
Tom Moor 710fcc697c feat: Add login link to /create page, closes OLN-63 2020-07-19 10:58:35 -07:00
Nan Yu 58f9e95d2f feat: nicer gradient mask for hover previews (#1367)
* feat: nicer gradient mask for hover previews

* tweak the stops on gradient mask
2020-07-18 18:25:54 -07:00
Tom Moor bc128359ab chore: Remove Spectrum references (#1366)
* fix: knowledgebase -> knowledge base

* chore: Remove links and mentions to Spectrum community
2020-07-18 17:19:13 -07:00
Tom Moor af09713c8c fix: knowledgebase -> knowledge base 2020-07-18 13:17:10 -07:00
Tom Moor 35052ef38f 0.45.0 2020-07-18 11:52:32 -07:00
Tom Moor ec3adc6d1c fix: 2 missed process.env spots on frontend 2020-07-18 11:33:34 -07:00
Tom Moor 67981a351e chore: Remove env variables in webpack bundle (#1353)
* chore: Remove env variables in webpack bundle

* remove unused globals

* refactor: consolidate window.env calls to single file

* fix: Slack client side integration auth

* fix: developers url
2020-07-18 11:02:40 -07:00
Necmettin Karakaya 24448c7504 fix: common misspelling errors
https://github.com/outline/outline/blob/master/app/scenes/UserDelete.js#L40: corrected "destory" to "destroy"
https://github.com/outline/outline/blob/master/app/components/ScrollToTop.js#L16: corrected "postion" to "position"
https://github.com/outline/outline/blob/master/server/policies/document.js#L11: corrected "existance" to "existence"
https://github.com/outline/outline/blob/master/server/policies/document.js#L23: corrected "existance" to "existence"
https://github.com/outline/outline/blob/master/server/models/Document.js#L493: corrected "permanantly" to "permanently"
https://github.com/outline/outline/blob/master/shared/utils/domains.js#L12: corrected "unneccessarily" to "unnecessarily"
https://github.com/outline/outline/blob/master/server/api/documents.js#L34: corrected "compatablity" to "compatibility"
2020-07-18 09:33:27 -07:00
Tom Moor d5b5d4fc27 feat: Document hover cards (#1346)
* stash

* refactor

* refactor, styling

* tweaks

* pointer

* styling

* fi: Hide when printing

* fix: No hover cards on shared links

* remove suppressions no longer needed

* fix: Don't show hover cards when editing, they get in the way

* fix: Prevent hover card from going off rhs edge of screen

* fix: Remount hover card when changing between links

* fix: allow one part domains in links (#1350)

* allow one part domains in links

* no TLD when only one part domain

* return null for parseDomain of empty string

* fix fiddly hover preview behavior

* WIP

* refactor hover preview

* fix: Non-rounded bottom corners

* fix: Fixes an edgecase where mounting the nested editor in hovercard causesdocument to scroll if there is a hash in the url

* fix: Incorrect document preview rendering

* lint

Co-authored-by: Nan Yu <thenanyu@gmail.com>
Co-authored-by: Nan Yu <nan@getoutline.com>
2020-07-16 21:26:23 -07:00
dependabot[bot] d8603cc961 chore(deps): bump lodash from 4.17.15 to 4.17.19 (#1361)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-16 17:30:56 -07:00
Tom Moor 943a290b83 chore: Update flow just far enough to get hooks libdefs (#1348) 2020-07-13 20:23:15 -07:00
Tom Moor f4a4f034cf Merge branch 'MatheusRV-feat/change-title-based-on-teamName' into develop 2020-07-13 19:42:57 -07:00
Tom Moor a53934a5c9 fix 2020-07-13 19:41:42 -07:00
Tom Moor e859e3b9e0 Merge branch 'feat/change-title-based-on-teamName' of https://github.com/MatheusRV/outline into MatheusRV-feat/change-title-based-on-teamName 2020-07-13 19:13:59 -07:00
Tom Moor b51d818db3 feat: Adds documents.export endpoint to return cleaned up Markdown (#1343) 2020-07-13 18:23:15 -07:00
Tom Moor bfea742650 fix: Makefile test runner 2020-07-11 12:41:48 -07:00
Tom Moor 9951cbf194 fix: Unneccessary redirect to /home 2020-07-11 09:51:10 -07:00
Tom Moor 5cb04d7ac1 New login screen (#1331)
* wip

* feat: first draft of auth.config

* chore: auth methodS

* chore: styling

* styling, styling, styling

* feat: Auth notices

* chore: Remove server-rendered pages, move shared/components -> components

* lint

* cleanup

* cleanup

* fix: Remove unused component

* fix: Ensure env variables in prod too

* style tweaks

* fix: Entering SSO email into login form fails
fix: Tweak language around guest signin
2020-07-09 22:33:07 -07:00
Tom Moor 75561079eb closes: Lucidchart embed does not work for app subdomain
closes #1340
2020-07-09 21:07:35 -07:00
Matheus Rocha Vieira d2c7f3f166 Update app/components/PageTitle.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-07-08 14:48:14 -03:00
Matheus Rocha Vieira a077766bff Update app/components/Layout.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-07-08 14:48:05 -03:00
Matheus Breguêz a25e03d7cd Fix Name Mistake & Lint 2020-07-07 09:11:19 -03:00
Tom Moor 2953d09ee1 fix: Bump RME 2020-07-05 20:44:37 -07:00
Tom Moor 28d15b1573 Update LICENSE 2020-07-03 21:14:21 -07:00
Tom Moor 18108cb359 0.44.0 2020-07-03 13:11:01 -07:00
Tom Moor 5dfa6a71a4 chore: Remove Lato
closes #1295
2020-07-01 21:40:34 -07:00
Matheus Breguêz 35270cd104 add mobx observer and inject 2020-07-01 09:14:21 -03:00
Matheus Breguêz 19d01ed575 Add Outline in Title 2020-07-01 09:09:21 -03:00
Matheus Breguêz 2b7639c903 Improve Title when TeamName is empty 2020-07-01 08:56:49 -03:00
Matheus Breguêz c8269ca134 Remove Polices 2020-06-29 17:06:47 -03:00
Matheus Breguêz da9fc5bfdf New title based on TeamName 2020-06-29 17:01:34 -03:00
Tom Moor efcfda8398 fix: Port from hosted 2020-06-22 22:11:39 -07:00
Tom Moor ce2f69342c Fix: Port fix from hosted 2020-06-22 22:00:40 -07:00
Tom Moor 9be5597f4b chore: Lint shared directory 2020-06-22 21:29:21 -07:00
Tom Moor 26f6961c82 chore: Include new brand colors in icon color suggestions 2020-06-22 21:24:42 -07:00
Tom Moor bf5f83e97d Subtle styling adjustments to dropdown menus 2020-06-22 21:18:43 -07:00
Tom Moor 8db0260a1a Bump RME 2020-06-22 21:10:24 -07:00
Tom Moor edbae275ae Bump RME 2020-06-22 20:55:29 -07:00
Tom Moor f43deb7940 chore: Move to prettier standard double quotes (#1309) 2020-06-20 13:59:15 -07:00
Tom Moor 2a3b9e2104 chore: Make editor version comparison more lenient to reduce forced reloads 2020-06-20 12:35:32 -07:00
Tom Moor 64c3ff8d6b chore: Remove 'DEPLOYMENT' env option
Add 'Installation' section
2020-06-19 19:11:02 -07:00
Tom Moor 4f7e7ec853 Update package.json to match reality
This will be kept up to date from now on
2020-06-19 17:34:59 -07:00
Tom Moor d864e228e7 feat: Collection Icons (#1281)
* wip: Working for creation, and display

* feat: IconPicker

* fix

* feat: Invert collection icon color when dark in dark mode

* Improve readability of dropdown menus in dark mode
Suggest icon based on collection name

* Add additional icons
Tweaks and final polish

* fix: Write default icon as empty icon column

* feat: Improve icon selection logic
add more keywords
Improve icon coloring when selected and in dark mode

* lint

* lint
2020-06-19 17:18:03 -07:00
Tom Moor f3ea02fdd0 Bump RME, closes #1305 2020-06-18 23:54:02 -07:00
Tom Moor ed096013e4 fix: Cleanup print display 2020-06-18 22:10:20 -07:00
Tom Moor 2e376b32ec fix: sp mistake 2020-06-18 08:49:10 -07:00
Tom Moor f352b35e13 Bump RME 2020-06-16 21:11:01 -07:00
Tom Moor 0f8d503df8 chore: API Consistency (#1304)
* chore: Addressing API inconsistencies

* lint

* add: Missing sort to groups.list
fix: Documention issues

* test: fix

* feat: Add missing shares.info endpoint

* feat: Add sorting to users.list endpoint

* fix: Incorrect pagination parameters listed on user endpoints

* users.s3Upload -> attachments.create

* chore: exportAll -> export_all
2020-06-16 20:56:17 -07:00
Tom Moor 5010b08e83 Bump RME 2020-06-12 22:15:48 -07:00
Tom Moor 933bbdfb84 feat: Add ability to create docs from link editor (#1303)
* feat: Add ability to create docs from link editor

* fix: Handling of paste and click events

* fix: Filter untitled documents from search results

* refactor: Move onCreateLink to DataLoader

* bump rme
2020-06-12 00:19:03 -07:00
Tom Moor d25a9d56dc fix: updatedBy incorrect in documents.update response 2020-06-12 00:18:38 -07:00
Tom Moor 1d8c3f3faf fix: Suspended users showing in group and collection member management (#1302)
* fix: Suspended users showing in group and collection member management

* test
2020-06-11 08:48:47 -07:00
Tom Moor d7766280a9 fix: Possible fix for intermittent CI failures
https://github.com/facebook/flow/issues/8058
2020-06-09 21:50:25 -07:00
moekhalil ae5eff2914 Make MenuItem Links work (#1299)
Menu items pointed to anchors links that were non-existent. 
Adding id's to proper sections for anchor links in menu to work.
2020-06-09 20:39:22 -07:00
Tom Moor b444874944 fix: Shared documents with system in dark mode display partially on light background
closes #1300
2020-06-09 20:38:34 -07:00
Tom Moor 20efa82ad9 Add additional restricted subdomains 2020-06-05 23:46:32 -07:00
Tom Moor bd9d4b3d0d fix: backslash in search query not escaped 2020-06-03 23:59:59 -07:00
Tom Moor 4b4f4fd188 flow 2020-06-02 23:17:54 -07:00
Tom Moor 33815639f2 fix: Improved handling of simultaneous edits 2020-06-02 23:16:15 -07:00
Tom Moor 05e24df226 fix: Update value when saved elsewhere and viewing doc
closes #1103
2020-05-31 22:46:55 -07:00
Tom Moor d2d9164fa1 chore: Remove unused component 2020-05-31 21:19:44 -07:00
Tom Moor f2eb395e8d fix: regex -> startsWith 2020-05-31 16:43:51 -07:00
Tom Moor 133cb56cca fix: Use real icon on settings back arrow 2020-05-30 18:26:40 -07:00
Tom Moor e752dba566 fix: User profile should say 'invited' instead of 'joined' when user has yet to signin 2020-05-30 18:26:40 -07:00
Tom Moor c1a141d99f fix: Make it possible to downgrade permissions of suspended user
closes #1291
2020-05-30 18:26:40 -07:00
Tom Moor ccedea55d6 chore: Reduce loading jank in sidebar (#1294) 2020-05-30 12:50:08 -07:00
Tom Moor c929f83813 feat: Improved error filtering and reporting (#1293) 2020-05-29 07:22:09 -07:00
Tom Moor 1b25d12e2e fix: Regression with upgrade to styled-components@5 – new ServerStyleSheet needed per render 2020-05-28 20:49:07 -07:00
Tom Moor 0c254285a1 fix: Improved readability of input placeholders in dark mode 2020-05-28 20:08:02 -07:00
Tom Moor 8b274c3713 fix: Keyboard shortcuts dialog shortcut should not be active when editing a document
closes #1292
2020-05-28 19:44:52 -07:00
Tom Moor 5a20a35c8b Bump RME 2020-05-28 08:25:25 -07:00
Tom Moor 72635e98e6 Remove precommit hook 2020-05-28 08:25:25 -07:00
Tom Moor 7d55b7f69b fix: Server error when listing memberships for group with deleted user (#1288)
* fix: Server error when listing memberships for group with deleted user

* PR feedback: Filter before slice
2020-05-28 08:21:22 -07:00
Tom Moor ca1ba277ad fix: Gist embed error on load 2020-05-27 23:04:34 -07:00
Tom Moor 32562886aa fix: Bump RME, closes #1286 2020-05-26 20:18:07 -07:00
Tom Moor 7f07cb57a2 chore: Capture event data to error tracker when background jobs fail 2020-05-25 13:48:50 -07:00
Tom Moor 62dd1e41f9 fix: Invariant violation reported to error tracker when client is reloading due to editor update 2020-05-25 13:10:18 -07:00
Tom Moor 446a9ade8c fix: Imported documents should get a best-guess title 2020-05-24 23:10:55 -07:00
Tom Moor a281b1e5be fix: Documents with empty titles (hey, it can happen) are invisible in the sidebar) 2020-05-24 22:43:54 -07:00
Tom Moor 1b5600b025 chore: Cleaner Markdown output when exporting docs 2020-05-24 22:22:06 -07:00
Tom Moor f0e513542d fix: auto focus search input when adding users to a collection 2020-05-24 22:17:11 -07:00
Tom Moor 4797a5fc77 fix: Invalid regex error on Safari when filtering users with certain characters 2020-05-24 22:14:09 -07:00
Tom Moor f05035c0b7 fix: Incorrect overlay background when zooming images 2020-05-23 22:22:19 -07:00
Tom Moor 75cfbd8970 fix: More migration tweaks 2020-05-23 19:23:31 -07:00
Tom Moor c4837f1943 fix: Potential corruption migrating v1 docs to v2 when a mark is adjacent the same mark. This was a quirk of the old editor 2020-05-23 12:26:26 -07:00
Tom Moor 0b3166dab5 Bump yarn.lock 2020-05-23 11:06:37 -07:00
Tom Moor 603f7962a2 fix: An unknown language annotation in code fences will no longer throw an error. It was only possible to hit this if you imported markdown from another source.
closes #1284
2020-05-23 11:01:07 -07:00
Tom Moor 69d16dd1d4 fix: Tables with empty cells are corrupted when converted to v2 documents
fix: Marks with trailing or leading empty spaces are corrupted when converted to v2 documents
2020-05-23 10:58:46 -07:00
Tom Moor e2ffe06221 fix: Document title not centered once scrolled 2020-05-22 14:19:26 -07:00
Tom Moor 6e2ea3ac4b fix: overflow menu on history revision is incorrect color when selected
closes #1140
2020-05-21 22:22:04 -07:00
Tom Moor f4c4a11277 fix: Only transfer accessToken if matches root token 2020-05-21 21:42:46 -07:00
Tom Moor c28dc08f6a fix: Alignment of bullet list
closes #1277
2020-05-21 21:22:33 -07:00
Tom Moor 4ef82d5476 test 2020-05-20 23:48:37 -07:00
Tom Moor 3487eb7857 fix: Submenu auto close 2020-05-20 23:40:54 -07:00
Tom Moor 87020348ce lint 2020-05-20 23:20:05 -07:00
Tom Moor 672ffacc5b feat: Have theme follow system pref 2020-05-20 23:19:07 -07:00
Tom Moor 218b0ea76a fix: Unable to edit starred documents
closes #1275
2020-05-20 21:42:26 -07:00
Tom Moor 47ff6feaee fix: JS error on server 2020-05-20 21:03:53 -07:00
Tom Moor 8ac5a574f3 Merge branch 'master' of github.com:outline/outline 2020-05-20 21:01:10 -07:00
Ante Primorac aed76c7bcb fix revisions backup data type (#1274) 2020-05-20 10:50:52 -07:00
Tom Moor 7f9cd51f37 Update bug template to account for self hosted 2020-05-20 08:30:05 -07:00
Tom Moor 092b29ee63 fix: Breadcrumb separator color in dark mode 2020-05-19 22:34:04 -07:00
Tom Moor ee7e1959c9 fix: Toast color in dark mode 2020-05-19 21:55:26 -07:00
Tom Moor 092d9dce18 fix: Don't set cookie domain when not using multiple subdomains (#1145)
* fix: Don't set cookie domain when not using multiple subdomains

* wip logging domain

* wip logging domain

* wip logging domain

* wip logging domain

* Revert "wip logging domain"

This reverts commit 325907e749.

* Revert "wip logging domain"

This reverts commit 6ee095a49e.

* Revert "wip logging domain"

This reverts commit 813d8eb960.

* Revert "wip logging domain"

This reverts commit f1ca819276.

* Remove SUBDOMAINS_ENABLED from documented env variables, no-one self hosting should need this – it just adds confusion to those looking to host on a single subdomain
fix: Account for server/client process.env parsing

Co-authored-by: Nan Yu <nanyu@Nans-MBP-2.lan>
Co-authored-by: Nan Yu <nan@getoutline.com>
2020-05-19 21:05:57 -07:00
Tom Moor 9274005cbb feat: Upgrade editor (#1227)
* WIP

* document migration

* fix: Handle clashing keyboard events

* fix: convert getSummary

* fix: parseDocumentIds

* lint

* fix: Remove unused plugin

* Move editor version to header
Add editor version check for API endpoints

* fix: Editor update auto-reload
Bump RME

* test

* bump rme

* Remove slate flow types, improve themeing, bump rme

* bump rme

* fix: parseDocumentIds returning duplicate ID's, improved regression tests

* test

* fix: Missing code styles

* lint

* chore: Upgrade v2 migration to use AST

* Bump RME

* Update welcome doc

* add highlight to keyboard shortcuts ref

* theming improvements

* fix: Code comments show as headings, closes #1255

* loop

* fix: TOC highlighting

* lint

* add: Automated backup of docs before migration

* Update embeds to new format

* fix: React warning

* bump to final editor version 10.0.0

* test
2020-05-19 20:39:34 -07:00
Tom Moor 400a1c87bb lint 2020-05-18 20:22:58 -07:00
Tom Moor 93abbab44a feat: Show different icon in theme menu to switch to light mode 2020-05-17 19:15:55 -07:00
Tom Moor 18cf148bd1 chore: Improve performance in dev by running Node/Yarn outside of docker (#1271)
* Improve performance in dev by running Node/Yarn outside of docker

* Transpose exposed port numbers by 100, so less likely conflict with host processes
2020-05-17 18:12:48 -07:00
Tom Moor e0b33ee576 chore: Auto reload frontend of client is out of date (#1270)
* Move editor version to header
Add editor version check for API endpoints

* fix: Editor update auto-reload
Bump RME

* fix: Only redirect if editor header exists

* lint
2020-05-16 14:05:51 -07:00
Tom Moor 82749ffbd8 Remove Spectrum badge 2020-05-12 08:27:17 -07:00
Tom Moor 231aab6ef8 lint 2020-05-12 08:26:31 -07:00
Tom Moor f8077e2125 Add github template chooser 2020-05-12 08:25:11 -07:00
Tom Moor 9d9435cce5 fix: Server error in hooks.slack endpoint if team has no public collections 2020-05-10 18:49:57 -07:00
Tom Moor 5deec264bc chore: Add request-id to error tracking 2020-05-10 16:24:34 -07:00
Tom Moor 48c87a1902 fix: Long titles should wrap
closes #1249
2020-05-07 21:21:58 -07:00
Tom Moor 06a3258b99 fix: Allow empty document body to be saved
closes #1258
2020-05-07 20:52:02 -07:00
Tom Moor bd2837250b fix: Guard missing attachment, closes #1262 2020-05-07 20:37:36 -07:00
Tom Moor e1adb16c43 fix: Incompatible with node 14 2020-05-07 20:33:33 -07:00
Tom Moor d914ecb603 chore: Remove max listener warning in console 2020-04-26 14:08:39 -07:00
Tom Moor 187be4737e fix: Log errors to console when Sentry not installed 2020-04-25 19:53:24 -07:00
Tom Moor 870b91f17a fix: Various extra scrollbars when not using mac-style overlaying scrollbars (#1242)
* fix: Various extra scrollbars when not using mac-style overlaying scrollbars

* Sidebar z-index
2020-04-24 18:44:21 -07:00
Tom Moor 6db92c9f49 remove unused images 2020-04-24 05:33:13 -07:00
Tom Moor c41e6e0423 fix: Minor fixes in backlinks service (#1240) 2020-04-24 05:29:48 -07:00
Tom Moor 9f8e7be755 fix: Restore ability to disable embeds on a document (#1238)
closes #1237
2020-04-21 21:43:01 -07:00
Tom Moor cead37051e fix: test prevents server loading, add logs 2020-04-19 22:14:31 -07:00
Tom Moor fd99da96af chore: upgrade deps 2020-04-19 22:07:17 -07:00
Tom Moor c526adf292 feat: Auto update titles in linked documents (#1233)
* feat: Auto update titles in linked documents

* Add spec
2020-04-19 21:58:42 -07:00
Tom Moor ee5ae140c3 fix: Improve neutral button styling in dark mode 2020-04-11 09:47:52 -07:00
Tom Moor 083ac0d840 fix: Image cropper in dark mode
closes #1229
2020-04-11 09:34:33 -07:00
Tom Moor fbaaa08ec7 closes #1230 2020-04-11 09:27:14 -07:00
Tom Moor b536c682a2 fix: Escape characters visible in TOC
closes #1226
2020-04-06 09:01:03 -07:00
Tom Moor c94823dd59 fix: Failed editor chunk load should refresh page 2020-04-06 08:50:43 -07:00
Tom Moor 1a60f51460 fix: Attempt to focus readonly editor
fix: Non-grow clickable padding beneath editor regression
2020-04-05 22:48:48 -07:00
Tom Moor abf91a3a51 fix: Share link rendering 2020-04-05 22:42:55 -07:00
Tom Moor 383806d155 fix: Document shrinks if only content is embed 2020-04-05 18:44:05 -07:00
Tom Moor 7413e8bf7a Update LICENSE 2020-04-05 18:18:01 -07:00
Tom Moor 7c1aa7622a Update README screenshot 2020-04-05 17:01:54 -07:00
Tom Moor f94efaada8 Update README screenshot 2020-04-05 17:00:30 -07:00
Tom Moor 283a762a9c fix: Title index 2020-04-05 16:46:03 -07:00
Tom Moor cef687464a chore: Improved onboarding docs 2020-04-05 16:32:12 -07:00
Tom Moor 8287355261 CI 2020-04-05 16:11:16 -07:00
Tom Moor 02d33267cc fix: Document updated email does include team subdomain in url
fix: Send document updated emails to any collaborators
fix: Correct quotation marks in email subjects
2020-04-05 16:04:46 -07:00
Tom Moor b964bdbe90 lint 2020-04-05 15:53:27 -07:00
Tom Moor c832265e8a fix: Account for emoji-offset title 2020-04-05 15:50:37 -07:00
Tom Moor 8819a0836e fix: Initial welcome docs account for new title field 2020-04-05 15:41:29 -07:00
Tom Moor 9338a54fe0 feat: Separate title from body (#1216)
* first pass at updating all Time components each second

* fix a couple date variable typos

* use class style state management instead of hooks

* wip: Separate title from body

* address feedback

* test: Remove unused test

* feat: You in publishing info language
fix: Removal of secondary headings

* After much deliberation… a migration is needed for this to be reliable

* fix: Export to work with new title structure

* fix: Untitled

* fix: Consistent spacing of first editor node

* fix: Emoji in title handling

* fix: Time component not updating for new props

* chore: Add createdAt case

* fix: Conflict after merging new TOC

* PR feedback

* lint

* fix: Heading level adjustment

Co-authored-by: Taylor Lapeyre <taylorlapeyre@gmail.com>
2020-04-05 15:07:34 -07:00
Tom Moor a0e73bf4c2 fix: Add shortcut for toggling document contents to help 2020-04-05 13:33:50 -07:00
Tom Moor 8a0263093b fix: Back button on modals should not scroll off screen 2020-04-05 13:33:21 -07:00
Tom Moor 9d8e99400f fix: Various React errors in console 2020-04-05 13:27:11 -07:00
Tom Moor 98b5350c65 lint 2020-04-05 13:21:03 -07:00
Tom Moor 3bd1c1f047 fix: Doc history does not load when linked to directly (race condition) 2020-04-05 13:20:47 -07:00
Tom Moor 9712b8d205 fix: Document history should scroll separate to page content
closes #1225
2020-04-05 13:07:16 -07:00
Tom Moor 597c09d2bc fix: Non-toc horizontal heading alignment 2020-04-05 12:50:38 -07:00
Tom Moor d0606a72c3 feat: Improved table of contents (#1223)
* feat: New table of contents

* fix: Hide TOC in edit mode

* feat: Highlight follows scroll position

* scroll tracking

* UI

* fix: Unrelated css fix with long doc titles

* Improve responsiveness

* feat: Add keyboard shortcut access to TOC

* fix: Headings should reflect content correctly when viewing old document revision

* flow

* fix: Persist TOC choice between sessions
2020-04-05 12:22:26 -07:00
Nan Yu 0deecfac44 make the team logo a little friendlier for first timers (#1222) 2020-04-04 15:34:11 -07:00
Nan Yu f534203cbd Merge pull request #1218 from outline/thenanyu-patch-1
docs: minor ergonomic updates to readme
2020-03-30 16:43:27 -07:00
Nan Yu f521543b0a Update README.md 2020-03-30 08:57:21 -07:00
Nan Yu 7da0d7589e minor ergonomic updates to readme 2020-03-30 08:26:37 -07:00
Tom Moor 09dea295a2 fix: Cleanup S3 Attachments (#1217)
* fix: Server error if attempting to load an unknown attachment

* fix: Migration should cascade delete to document attachments

* fix: Delete S3 attachments along with documents
2020-03-28 15:56:01 -07:00
Taylor Lapeyre d3773dc943 fix: Update all Time components each second (#1214)
* first pass at updating all Time components each second

* fix a couple date variable typos

* use class style state management instead of hooks

* address feedback

* lint

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-03-23 22:31:17 -07:00
Tom Moor 5db43f2607 lint 2020-03-23 22:26:17 -07:00
Tom Moor 4b3ddf8769 fix: Account for no text param passed to hooks.slack
This will never happen in production, Slack always provides the param but prevents a possible 500 server error when messing with the API manually.
2020-03-22 16:41:15 -07:00
Tom Moor 7a6ed86c95 Update LICENSE 2020-03-16 23:19:16 -07:00
Tom Moor f0be9beeb4 feat: Ensure that editorVersion is saved with document/revisions (#1212) 2020-03-16 08:30:23 -07:00
Tom Moor 4851f51d8b docs: Add documentation for groups API endpoints (#1211)
* docs: Add documentation for groups API endpoints
fix: Remove useless permission query param

* restore permission filter on collections.group_memberships

* tweak language
2020-03-16 08:30:15 -07:00
David Miranda e611979a8d Absolute routes won't work when users have subdomains (#1208) 2020-03-15 21:04:46 -07:00
Bryan Joseph 05af318a1d feat: Split up check for Slack environment variables (#1207)
* Split up check for Slack environment variables

This allows for the Slack slash command to be used without
needing Slack sign in enabled.

* Remove conditional checking for slack app id

Co-authored-by: Bryan Joseph <bryanjos@users.noreply.github.com>
2020-03-15 20:53:15 -07:00
Nan Yu 142303b3de feat: Add groups and group permissions (#1204)
* WIP - got one API test to pass yay

* adds group update endpoint

* added group policies

* adds groups.list API

* adds groups.info

* remove comment

* WIP

* tests for delete

* adds group membership list

* adds tests for groups list

* add and remove user endpoints for group

* ask some questions

* fix up some issues around primary keys

* remove export from group permissions

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* remove random file

* only create events on actual updates, add tests to ensure

* adds uniqueness validation to group name

* throw validation errors on model and let it pass through the controller

* fix linting

* WIP

* WIP

* WIP

* WIP

* WIP basic edit and delete

* basic CRUD for groups and memberships in place

* got member counts working

* add member count and limit the number of users sent over teh wire to 6

* factor avatar with AvatarWithPresence into its own class

* wip

* WIP avatars in group lists

* WIP collection groups

* add and remove group endpoints

* wip add collection groups

* wip get group adding to collections to work

* wip get updating collection group memberships to work

* wip get new group modal working

* add tests for collection index

* include collection groups in the withmemberships scope

* tie permissions to group memberships

* remove unused import

* Update app/components/GroupListItem.js

update title copy

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update server/migrations/20191211044318-create-groups.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update server/api/groups.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update server/api/groups.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/menus/CollectionMenu.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update server/models/Group.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* minor fixes

* Update app/scenes/CollectionMembers/AddGroupsToCollection.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/menus/GroupMenu.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/menus/GroupMenu.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/menus/GroupMenu.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/Collection.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/CollectionMembers/CollectionMembers.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/GroupNew.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/GroupNew.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/Settings/Groups.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update server/api/documents.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/CollectionMembers/components/CollectionGroupMemberListItem.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* address comments

* WIP - getting websocket stuff up and running

* socket event for group deletion

* wrapped up cascading deletes

* lint

* flow

* fix: UI feedback

* fix: Facepile size

* fix: Lots of missing await's

* Allow clicking facepile on group list item to open members

* remove unused route push, grammar

* fix: Remove bad analytics events
feat: Add group events to audit log

* collection. -> collections.

* Add groups to entity websocket events (sync create/update/delete) between clients

* fix: Users should not be able to see groups they are not a member of

* fix: Not caching errors in UI when changing group memberships

* fix: Hide unusable UI

* test

* fix: Tweak language

* feat: Automatically open 'add member' modal after creating group

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-03-14 20:48:32 -07:00
Tom Moor 6c451a34d4 Update README.md 2020-03-13 20:15:57 -07:00
Tom Moor fa4f1846ec Update LICENSE (#1197) 2020-03-07 10:10:42 -08:00
Tom Moor 4baf5ce99a test: Google embeds (#1202)
Update slides to only embed pub links
2020-03-07 10:10:26 -08:00
Tom Moor 533ec3bd9c add: Support for published google docs / sheets 2020-03-06 22:45:32 -08:00
Tom Moor 572127b830 fix: Point changelog link to public site
Related to #1195
2020-02-28 19:07:25 -08:00
Tom Moor f0afa67012 fix: Focus on empty document after creation
fix: Clicking in whitespace below document should focus
Remove unused component
2020-02-26 22:29:22 -08:00
Tom Moor dac2d43f55 dashboard -> home (#1194) 2020-02-26 21:10:20 -08:00
Tom Moor d06ec5ce0c fix: Nested document menu item appears where it shouldnt (#1193) 2020-02-26 21:10:10 -08:00
Tom Moor 148affb52e fix: Editing with document history open attempts to edit old revision
fix: Document history sidebar missing background
fix: 'Publish' action should not appear when viewing history of drafts
closes #1184
2020-02-26 21:08:36 -08:00
Tom Moor afba1edae4 feat: Adds visual stacking to nested modals (#1189)
Fixes various mobile styling/layout issues
2020-02-26 19:36:23 -08:00
Tom Moor f8c53f8a88 fix: Pagination of people list items (#1192) 2020-02-25 22:50:18 -08:00
Tom Moor 0b86714984 fix: Newly created private collections do not return correct policies (#1188)
closes #1185
2020-02-24 23:16:24 -08:00
Tom Moor 3e7acc377e fix: Rich embeds should work on public share links
closes #1182
2020-02-22 17:19:16 -08:00
Tom Moor 4cb48e7310 fix: Document gets 'stuck' when navigating between docs with similar slugs
closes #1175
2020-02-18 20:13:01 -08:00
Tom Moor 8daef8ebce fix: Reload app if error loading editor chunk 2020-02-17 11:29:58 -08:00
Tom Moor 760e2b2ce9 fix: Attempt to loadRevision with empty revisionId 2020-02-17 10:23:02 -08:00
Tom Moor 902e7a4772 fix: Handle private attachments without documentId (migration process) 2020-02-17 09:38:34 -08:00
Tom Moor 3b0b37628e fix: document.updated slack service hook 2020-02-17 09:29:48 -08:00
Tom Moor c973436870 chore: Disable Sentry breadcrumbs 2020-02-17 08:15:46 -08:00
Tom Moor 41fb2826b3 fix: Sentry CSP 2020-02-16 23:45:00 -08:00
Tom Moor c15cbd06a4 chore: Bugsnag -> Sentry (#1178)
* Bugsnag -> Sentry

* fix: Import style
2020-02-16 22:58:50 -08:00
Tom Moor 8fbd4a7463 fix: Tweak branding, OSS landing page 2020-02-16 19:49:24 -08:00
Tom Moor e18d0fdc77 fix: import 2020-02-16 19:27:40 -08:00
Tom Moor 5a20f6322f remove changelog from OSS 2020-02-16 19:25:12 -08:00
Tom Moor 0556e2a32c add: AWS_S3_ACL to app.json 2020-02-16 19:15:04 -08:00
Tom Moor 908b457dec fix: Use alternative redirect method (#1176) 2020-02-16 17:28:24 -08:00
Tom Moor 71ed0844b9 fix: Pass github authorization via header instead of query string 2020-02-12 21:12:14 -08:00
Tom Moor 394be7ba74 fix: remove unused files 2020-02-12 21:12:00 -08:00
Tom Moor 8225a924c1 fix: CSP for development AWS assets 2020-02-12 19:42:29 -08:00
Huss 8e2b19dc7a feat: private content (#1137)
* save images as private and serve via signed url from images.info api

* download private images to directory on export

* fix lint errors

* private s3 default, AWS.s3 module level scope, default s3 url expiry

* combine regex to one, and only replace when there are matches

* fix lint

* code not needed anymore, remove

* updates after pulling master

* revert the uploadToS3FromUrl url return

* use model gettr to compact code, rename to attachments api

* basic checking of document read permission to allow attachment viewing

* fix: Continue to upload avatars as public
fix: Allow redirect for non-private attachments

* add support for publicly shared documents

* catch errors which crash the app during zip export and user creation

* add tests

* enable AWS signature v4 for s3

* switch to use factories to build models for testing

* add isDocker flag for local serving of attachment redirect url

* fix redirect tests

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-02-12 19:40:44 -08:00
Tom Moor 064d8cea44 fix #1174 – Allow _~ in url slugs 2020-02-12 09:14:42 -08:00
Mark Cabanero 241d557c90 fix: Add UTILS_SECRET to .env.sample (#1166) 2020-01-23 18:38:50 -08:00
Tom Moor 8e5a5a57a9 feat: Store image uploads as attachments in database (#1144)
* First pass

* Documentation

* Added optional documentId relationship

* name -> key

* cleanup: No need for separate documentId prop
2020-01-16 09:42:42 -08:00
Tom Moor 22230c25e5 perf: Use progressive rendering on PaginatedList component (#1156)
* Use progressive rendering on PaginatedList component
Move drafts and starred views to paginated

* heading
2020-01-13 18:17:56 -08:00
Tom Moor 5b78cb8963 perf: Reuse redis connections where possible (#1157)
* reuse redis connections where possible

* redis -> ioredis
2020-01-13 18:17:41 -08:00
Tom Moor f231c664e6 fix: ColorPicker preview height 2020-01-11 19:36:52 -08:00
Tom Moor 6d14dd5028 fix: missing autoComplete values, input types 2020-01-11 19:35:26 -08:00
Tom Moor f776741e77 Update copyright 2020-01-11 15:54:47 -08:00
Tom Moor aa61c37442 fix: View does not appear for first ever view
closes #1152
2020-01-11 13:54:49 -08:00
Tom Moor e38f4996ae feat: Return view model from views.create (#1153)
* feat: Return view model from views.create
Towards #1152

* fix: presenter data
2020-01-11 13:46:13 -08:00
Tom Moor cd3035a692 feat: Add search input to collection and home (#1149)
* feat: Add search input to collection and home

* Tweak spacing

* Add input to drafts/starred too
2020-01-09 19:14:34 -08:00
Tom Moor 0ccbc6126b fix: Drafts appear in document insert search (#1148)
* fix: Drafts appear in document insert search

* test
2020-01-05 17:24:57 -08:00
Tom Moor 9214be5645 fix: Documents not removed from local store when collection is deleted 2020-01-04 17:31:26 -08:00
Tom Moor c1c316b379 fix: Error loading share link view.
closes #1143
2020-01-04 14:02:54 -08:00
Tom Moor 7bbddcaebf fix: Unable to focus into description in collection edit 2020-01-02 22:49:40 -08:00
Tom Moor 9c66a14fec fix: API key create/delete should create audit events
closes #1101
2020-01-02 22:20:13 -08:00
Tom Moor 321e5c9cbd Update LICENSE 2020-01-02 21:46:16 -08:00
Tom Moor 146e4da73b feat: Document presence indicator (#1114)
* Update websockets to allow joining document-based rooms

* dynamic websocket joining

* emit user.join/leave events when entering and exiting document rooms

* presence storage

* feat: frontend presence store

* lint

* UI updates

* First pass editing state

* refactoring

* Timeout per user/doc
lint

* Document data loading refactor to keep Socket mounted

* restore: Mark as viewed functionality
Add display of 'you' to collaborators

* fix: Socket/document remount when document slug changes due to title change

* Revert unneccessary package update

* Move editing ping interval to a shared constant

* fix: Flash of sidebar when loading page directly on editing mode

* separate document and revision loading

* add comments for socket events

* fix: Socket events getting bound multiple times on reconnect

* fix: Clear client side presence state on disconnect

* fix: Don't ignore server side error
Improved documentation

* More comments / why comments

* rename Socket -> SocketPresence

* fix: Handle redis is down
remove unneccessary join

* fix: PR feedback
2020-01-02 21:17:59 -08:00
Tom Moor 541e4ebe37 feat: Show drafts to author in collections (#1134) 2020-01-02 21:17:29 -08:00
Tom Moor c7aa261863 chore: Upgrade react-router-dom dep 2020-01-01 20:54:05 -08:00
Tom Moor c484d15de6 chore: Upgrade react-waypoint dep 2020-01-01 20:36:42 -08:00
Tom Moor 93e4ad8c5e fix: Account for migrations ran on old versions of Sequelize (#1130) 2019-12-30 22:35:29 -08:00
Ezra Free 85e70e579a remove transparency from dark theme sidebar background (#1127) 2019-12-29 09:49:31 -08:00
Tom Moor 10e038be5b lint 2019-12-23 18:12:16 -08:00
Tom Moor 76365e8560 fix: Double scrollbars on search filter dropdowns
closes #1125
2019-12-23 18:08:40 -08:00
Tom Moor 595cb9cda5 fixes: Document menu on search results is empty if not previously loaded
closes #1124
2019-12-23 17:59:15 -08:00
Tom Moor b6fd9f4211 fix: Invites appearing in search author filter
closes #1123
2019-12-23 17:39:25 -08:00
Tom Moor 98dda567c2 fix: User records not written correctly on signin (#1119)
* Initial fix for #1116

* clarify logic
2019-12-22 20:14:06 -08:00
Tom Moor c20282de06 feat: Add child document preloading 2019-12-22 17:06:39 -08:00
Tom Moor d995f27736 feat: Add parentDocumentId option to documents.list endpoint 2019-12-22 17:06:29 -08:00
Tom Moor 6bf2069fa7 fixes #1115 (#1118) 2019-12-22 14:54:12 -08:00
Tom Moor adf323713e fix: Documentation spelling 2019-12-18 21:02:32 -08:00
Tom Moor 293c3b7b9c fix: Move references spacing directly below content (#1113)
* fix: Move references spacing directly below content

* Child document -> Nested document
2019-12-18 21:00:36 -08:00
Tom Moor 949dd296b4 fix: 1px heading misalignment 2019-12-17 23:16:16 -08:00
Tom Moor ca0de9fb5a fix: Incorrect sidebar positioning on mobile in edit mode
closes #1108
2019-12-17 19:55:23 -08:00
Tom Moor 89b87c5268 fix: Emails should be stored and processed in lowercase (#1109) 2019-12-17 19:44:50 -08:00
Tom Moor 4511fb7259 bump: RME 2019-12-16 22:44:15 -08:00
Tom Moor 6b378bf78f Remove link to old roadmap [ci skip] 2019-12-15 21:21:27 -08:00
Tom Moor 671fa9cc84 fix: Para floating on signin page when guest signin not enabled 2019-12-15 20:59:36 -08:00
Tom Moor c360d7cd8c fix: SocketProvider throws error when websockets disabled 2019-12-15 19:49:47 -08:00
Tom Moor 6d8216c54e feat: Guest email authentication (#1088)
* feat: API endpoints for email signin

* fix: After testing

* Initial signin flow working

* move shared middleware

* feat: Add guest signin toggle, obey on endpoints

* feat: Basic email signin when enabled

* Improve guest signin email
Disable double signin with JWT

* fix: Simple rate limiting

* create placeholder users in db

* fix: Give invited users default avatar
add invited users to people settings

* test

* add transaction

* tmp: test CI

* derp

* md5

* urgh

* again

* test: pass

* test

* fix: Remove usage of data values

* guest signin page

* Visually separator 'Invited' from other people tabs

* fix: Edge case attempting SSO signin for guest email account

* fix: Correctly set email auth method to cookie

* Improve rate limit error display

* lint: cleanup / comments

* Improve invalid token error display

* style tweaks

* pass guest value to subdomain

* Restore copy link option

* feat: Allow invite revoke from people management

* fix: Incorrect users email schema does not allow for user deletion

* lint

* fix: avatarUrl for deleted user failure

* change default to off for guest invites

* fix: Changing security settings wipes subdomain

* fix: user delete permissioning

* test: Add user.invite specs
2019-12-15 18:46:08 -08:00
Tom Moor 5731ff34a4 fix: Archived and then deleted documents appear in archived tab after loading trash 2019-12-07 12:39:49 -08:00
Tom Moor cbd9ff2dd9 fixes #1093 – account for no previous revision in backlinks service 2019-12-07 11:40:15 -08:00
Tom Moor 504aa9f7bb Add AWS_REGION to heroku install 2019-12-06 16:48:36 -08:00
Tom Moor a2a7f5ef5c Update docs to recommend against using .env in prod [ci skip] 2019-12-05 16:57:17 -08:00
Tom Moor 9427f06031 Added minimum Redis version. [ci skip] 2019-12-05 16:52:32 -08:00
Tom Moor dd11bb9079 feat: Add warning for self-hosted installations that don't auth auth method configured 2019-12-05 13:22:06 -08:00
Tom Moor 828ce086cc fix: Account for unset S3 url when starting application 2019-12-05 12:55:46 -08:00
Tom Moor 682151554b fix: Additional SQL cascades required 2019-11-18 20:14:55 -08:00
Tom Moor 3ea79dd31a fix: Additional SQL cascades required 2019-11-18 19:49:33 -08:00
Tom Moor 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
Tom Moor 14f6e6abad feat: Add support for InVision live images
closes #946
2019-11-03 15:32:43 -08:00
Himanshu Agarwal f06097d9e8 chore: Remove marketing material from OSS project (#941)
* changes to support Plainhome

* changes to env sample

* changes to env variable names

* formatter fixes

* remove the content pages

* test fix

* lint fixes

* minor fixes

* removed unnesscary routes

* Apply suggestions from code review

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* removed team name from env
2019-11-03 15:01:46 -08:00
Tom Moor dce0c4ac73 yarn upgrade
closes #1066
2019-11-03 12:46:47 -08:00
Tom Moor ae6d24c343 upgrade: set-value 2019-11-03 12:26:43 -08:00
Tom Moor 3c794ec5b6 fix: Bump RME, closes #1077 2019-10-30 19:33:57 -07:00
Tom Moor f7a9152ee3 fix: Refreshing search page with special character in query does not reflect
fix: Search query that looks like regex causes JS error
2019-10-27 22:34:11 -07:00
Tom Moor 77153a2529 fix: More space for new empty search state 2019-10-27 22:12:18 -07:00
Tom Moor 2e61bb7d88 feat: Add publish shortcut to keyboard shortcuts overlay 2019-10-27 22:07:01 -07:00
Tom Moor 9ef9c75c6b feat: Add keyboard shortcut to publish document
closes #1073
2019-10-27 18:04:45 -07:00
Tom Moor 98cd93c99c Delete yarn-error.log 2019-10-27 17:02:13 -07:00
Tom Moor 3a8cd2bb35 fix: File upload input must stopPropagation of click events otherwise click event is triggered on sidebar menu item and file choose dialog never appears
closes #1065
2019-10-27 16:59:36 -07:00
Tom Moor e72608938a chore: upgrade flow-typed 2019-10-26 23:50:02 -07:00
Tom Moor e024b1b042 Create SECURITY.md 2019-10-26 22:14:46 -07:00
Tom Moor 3099eaaf12 chore: upgrade micromatch 2019-10-26 21:59:07 -07:00
Tom Moor b4d6c70b29 chore: upgrade google-auth-library 2019-10-26 21:44:45 -07:00
Tom Moor 4080216fe3 chore: upgrade koa-x 2019-10-26 21:35:50 -07:00
Tom Moor 1b415ac19a chore: upgrade html-webpack-plugin 2019-10-26 21:25:09 -07:00
Tom Moor a9f851897d chore: upgrade sequelize 2019-10-26 21:16:36 -07:00
Tom Moor db94a95001 chore: upgrade nodemon 2019-10-26 20:41:50 -07:00
Tom Moor 2d2ad83469 fix: Cannot move a document to nested child in private collection 2019-10-16 08:45:21 -07:00
Tom Moor b95e1cdef3 fix: Keep document menu open when toggling starred status to provide better feedback 2019-10-15 23:14:14 -07:00
Tom Moor 66197a967a fix: Document history menu item should toggle history sidebar 2019-10-15 21:42:07 -07:00
Tom Moor 5263d8a315 fix: Collaborator avatars should overlap 2019-10-15 21:30:33 -07:00
Tom Moor 97c8bfc27f fix: Protect against redirecting back to the same doc
closes #975
2019-10-15 20:59:00 -07:00
Tom Moor b093acd94f fix: closes #1064 – only show active users in collection members 2019-10-15 20:19:08 -07:00
Tom Moor 21af0bd8be fix: Sidebar links unexpand
closes #1044
2019-10-13 16:15:42 -07:00
Tom Moor 766a52f10e flow 2019-10-13 09:32:58 -07:00
Tom Moor 84c1cfea14 lint 2019-10-12 23:08:14 -07:00
Tom Moor 01f672fac9 fix: Drop to import 2019-10-12 23:03:58 -07:00
Tom Moor 5eb384b2c8 refactor, aria props 2019-10-12 21:08:04 -07:00
Mateusz Sapielak 8ea1323a7c fix: Ensure menus are always kept on the screen (#1036)
* ensuring dropdowns fit on the screen

* refactoring

* fix flow types

* no longer fixing the elements which should resolve scrolling issues

* fix menus that should be fixed

* styled-components syntax was wrong

* account for fixed dropdowns when handling overflowing menus

* Update app/components/DropdownMenu/DropdownMenu.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>
2019-10-12 20:21:48 -07:00
Tom Moor 00d5b58850 fix: Collection membership list does not update after change to private
closes #1059
2019-10-12 20:14:18 -07:00
Tom Moor 65b8fb40f3 fix: Empty collection causes export failure
closes #1043
2019-10-12 19:31:15 -07:00
Tom Moor ec4d4fb20f fix: Show error message when signing in to suspended account
closes #1056
2019-10-12 19:16:17 -07:00
Tom Moor fc201663c6 fix: closes #1058 – orphaned archived headig 2019-10-12 13:40:05 -07:00
Tom Moor d4347b6f4b fix: Restore option missing in archived documents 2019-10-12 13:24:48 -07:00
Tom Moor 2d913e3766 fix: Event activity endpoint with deleted actor
closes #1061
2019-10-12 13:03:50 -07:00
Tom Moor e33aaec469 fix: Remove nonsense relationship 2019-10-10 08:25:23 -07:00
Tom Moor 24231053af feat: Child document references (#1054)
* feat: Child document references

* refactor: naming

* lint: flow
2019-10-08 08:01:30 -07:00
Tom Moor 927e0b3fb8 Update LICENSE 2019-10-07 20:45:45 -07:00
Tom Moor b0ceae5af0 fix: Restore 'Publish' action in drafts 2019-10-06 21:09:49 -07:00
Tom Moor 6fde4e2ec5 feat: Add new doc button when search results are empty
closes #1022
2019-10-05 20:06:48 -07:00
Tom Moor 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
Tom Moor 4164fc178c fix: First auto-save unfocuses document (#1046)
* fix: Autosave unfocuses document

* Revert unneeded change

* test: le fix

* fix: Handle offline state
fix: Untitled documents appear with empty titles

* fix: Draft bubble roundness (yes, it doesnt belong here but see it, fix it)
2019-09-22 17:09:11 -07:00
Tom Moor b1a1d24f9c fix: Unknown Slack users should be able to search team accessible docs (#1049)
* fix: Unknown Slack users should be able to search team accessible docs

* test: fix flaky test

* test: remove obsolete snapshot

* lint

* flow

* fix: Spelling mistake
2019-09-22 11:52:15 -07:00
Tom Moor d46530a4a0 Merge branch 'rylxes-master' 2019-09-21 13:27:18 -07:00
Tom Moor 3f7d4f7873 fix: tweak wording 2019-09-21 13:27:00 -07:00
Tom Moor b20d41a047 test: Update snapshots 2019-09-21 13:26:28 -07:00
Tom Moor 1797a0e90c Merge branch 'master' of https://github.com/rylxes/outline into rylxes-master 2019-09-21 13:11:31 -07:00
Tom Moor dd5e30f414 fix: Account for missing localStorage (browser security settings?) 2019-09-21 12:42:28 -07:00
Tom Moor 690299ac6b Redirect unknown integration to integrations home, rather than 404 2019-09-21 12:28:34 -07:00
Tom Moor 7ff0a1d820 tidy env sample 2019-09-21 12:23:47 -07:00
Juncheol Cho 3292d95d8b chore: add env parameter for enforce https (#1042)
* env parameter for enforce https

* Update app.js

fix format for multi-line condition

* Update app.js

fix code format

* Update app.js
2019-09-18 23:26:27 -07:00
Tom Moor 18658e354a Update Editor.js 2019-09-15 21:18:31 -07:00
Sherriff Agboola 02f2868d06 re-added the .env.sample 2019-09-15 23:30:41 +01:00
Sherriff Agboola 4ea4bd41cd changed lastActiveAt boolean to string 2019-09-15 23:28:11 +01:00
Sherriff Agboola 593aa80abf Show last active date on people list instead of joined date 2019-09-15 23:07:43 +01:00
Tom Moor f43643f43b fix: Image and horizontal highlight on selected 2019-09-15 14:53:27 -07:00
Tom Moor e2453b5b2a fix: Editor headings offset 2019-09-15 14:42:32 -07:00
Tom Moor 439ae1e832 fix: CSP for client-side editor uploads 2019-09-15 14:41:34 -07:00
Agboola Sherriff 228c0c45e7 Merge pull request #1 from outline/master
merge
2019-09-14 21:43:17 +01:00
Tom Moor 6520a501e3 fix: accessiblity improvements, focus states, real buttons 2019-08-30 00:27:40 -07:00
Tom Moor 140f009b4d fix: Improve accessibility of buttons / tab indexes with tooltips 2019-08-29 00:06:21 -07:00
Tom Moor 579eaf325b feat: Add keyboard shortcuts to tooltips 2019-08-28 23:30:27 -07:00
Tom Moor b56f8e7870 feat: add padlock next to private collections in lists 2019-08-28 21:41:40 -07:00
Tom Moor 79f8a41b5b fix: Loading state interrupts infinite scrolling 2019-08-28 21:01:35 -07:00
dependabot[bot] abf5b79de6 chore(deps): bump mixin-deep from 1.3.1 to 1.3.2 (#1031)
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-28 16:53:05 -07:00
Tom Moor c60295fcca fix: Slack notification not sent on publish, reported via Spectrum 2019-08-28 00:22:22 -07:00
Tom Moor 5bd2409e39 Revert "WIP"
This reverts commit ccfad1d800.
2019-08-28 00:03:11 -07:00
Tom Moor 780c5c1129 fix: Add github gist styles to CSP 2019-08-27 23:26:32 -07:00
Tom Moor b98c908568 fix: Add github gist to CSP
closes #1028
2019-08-27 23:12:09 -07:00
Tom Moor f1e8633623 fix: Add blob protocol to imgSrc 2019-08-27 09:21:53 -07:00
Tom Moor 39de7c0aee Merge branch 'master' of github.com:outline/outline 2019-08-27 09:19:07 -07:00
dependabot[bot] 8b942cf202 chore(deps): bump eslint-utils from 1.3.1 to 1.4.2 (#1026)
Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.2.
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](https://github.com/mysticatea/eslint-utils/compare/v1.3.1...v1.4.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-26 13:11:43 -07:00
Tom Moor ccfad1d800 WIP 2019-08-25 15:20:49 -07:00
Tom Moor 347015cf86 feat: improve physicality of draft bubble (it's the little details) 2019-08-24 17:43:23 -07:00
Tom Moor d96afad6c0 fix: Document heading vertical alignment 2019-08-24 10:22:58 -07:00
Tom Moor d066468bc0 chore: Add additional env variable checks for self-hosted installations 2019-08-24 10:19:21 -07:00
Tom Moor b6dd55fbea chore: Add additional env variable checks for self-hosted installations 2019-08-23 22:43:41 -07:00
Tom Moor 8f2d31876d feat: Port new color picker from Journals branch 2019-08-23 22:24:06 -07:00
Tom Moor 8e76c4e8f1 fix: Add missing audit log events UI 2019-08-23 21:51:05 -07:00
Tom Moor 468fd792ed fix: Allow iframes in CSP 2019-08-23 19:39:40 -07:00
Tom Moor c1bef2db59 fix: additional domains in CSP, dont send headers with API responses 2019-08-23 19:21:16 -07:00
Tom Moor 53cc69a413 fix: additional security headers by default 2019-08-23 19:00:38 -07:00
Tom Moor 7e62b3b9aa chore: Upgrade Node to v12 (#1023)
* chore: Upgrade Node to v12

* test: Upgrade test node image
2019-08-23 18:14:51 -07:00
Tom Moor 54565fff74 fix: Handle doc not found / no permission
closes #1021
2019-08-21 22:11:54 -07:00
Tom Moor 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
Tom Moor cf18b952a4 chore: Move Dockerfile to Alpine
closes #1020
2019-08-21 08:19:27 -07:00
Tom Moor 929722e1c1 fix: double load on mount. closes #1015 2019-08-20 22:13:36 -07:00
Tom Moor c0ec349ad2 bump RME 2019-08-18 20:16:49 -07:00
Tom Moor 4d2eda6750 fix: Embed does not show selected highlight 2019-08-18 12:45:54 +01:00
Tom Moor db08263e5c fix: Nested lists 2019-08-15 14:05:15 +02:00
Tom Moor 33320ba13d perf: Improve speed of rendering tables
fix: Issue rendering tables with certain cells empty of content
2019-08-14 19:17:10 +01:00
Tom Moor 4dad3f3287 fix: Bump RME, more editor fixes 2019-08-12 20:17:55 -07:00
Tom Moor f87b561685 feat: Allow export of collections as sync zip (#1013)
* feat: Allow export of collections as sync zip

* test: Add spec
2019-08-09 20:37:51 -07:00
Tom Moor 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
Tom Moor 7b2eea0009 feat: Add icon to invite people button 2019-08-08 22:10:11 -07:00
Tom Moor 2ce11365ab fix: Minor button alignment issues 2019-08-08 22:07:29 -07:00
Tom Moor e936aa82c9 fix: padding 2019-08-08 21:25:51 -07:00
Tom Moor a26ae119fe feat: Keyboard shortcut reference inside editor 2019-08-08 21:13:58 -07:00
Tom Moor 789a1acea1 feat: Add 'edit' item to document menu 2019-08-08 20:00:56 -07:00
Tom Moor dd95c9cba9 feat: Opensearch tags / descriptor 2019-08-08 19:52:29 -07:00
Tom Moor ae1cf2d00c fix: Upgrade RME (fix link toolbar blur) 2019-08-07 23:22:06 -07:00
Tom Moor 978eda3ad2 fix: Deleted collections not showing in audit log
feat: Show titles of objects in audit log
fix: modelId not saved with share events
fix: List item squashes avatar at small screen sizes
2019-08-07 20:52:59 -07:00
Tom Moor 0f028812e1 fix: Flash of documents on home if drafts load before main request
fix: Drafts loading placeholder misplaced
2019-08-06 23:46:27 -07:00
Tom Moor c18e4cd43e feat: separate draft count and icon in sidebar 2019-08-05 23:17:41 -07:00
Tom Moor 7f10fe728f fix: Logout -> Log out 2019-08-05 22:43:24 -07:00
Tom Moor 5c99116898 feat: redirect to requested doc after authentication 2019-08-05 22:25:19 -07:00
Tom Moor 38a67b1f9e fix: Avatars should overlap in document header 2019-08-05 21:10:44 -07:00
Tom Moor fb4f6822a4 feat: Events / audit log (#1008)
* feat: Record events in DB

* feat: events API

* First pass, hacky activity feed

* WIP

* Reset dashboard

* feat: audit log UI
feat: store ip address

* chore: Document events.list api

* fix: command specs

* await event create

* fix: backlinks service

* tidy

* fix: Hide audit log menu item if not admin
2019-08-05 20:38:31 -07:00
Tom Moor 75b03fdba2 Bump RME 2019-08-04 12:59:14 -07:00
Tom Moor 60a31992d0 chore: disable typescript detection in VSCode 2019-08-01 21:34:17 -07:00
Tom Moor be09b6a3bd Merge pull request #1004 from shyim/patch-1
chore: add missing EXPOSE rule
2019-07-30 08:08:09 -07:00
Tom Moor 92a18159b5 feat: Export collection as direct download instead of emailing (#1001)
* feat: Export collection as zip instead of emailing

* Flow typing download.js
2019-07-29 22:35:34 -07:00
Shyim 7c01904cec Add missing expose 2019-07-29 20:48:26 +02:00
Douglas Gadêlha c9b86ec2e7 Fix document duplicate command (#1003) 2019-07-27 10:33:38 -07:00
Tom Moor 466ba6ec1f fix: don't echo request back for unknown endpoints
closes #998
2019-07-25 23:17:45 -07:00
Tom Moor 9cbc9aaad6 chore: RealtimeBoard -> Miro
closes #996
2019-07-25 22:56:20 -07:00
Tom Moor 5ec2c3c7a0 fix: Add support for mm.tt mindmeister links 2019-07-25 22:42:23 -07:00
Tom Moor a8d8fecd15 Update DropdownMenu.js 2019-07-13 12:56:04 -07:00
Tom Moor be09ffea7b feat: sharing drafts (#991)
closes #988
2019-07-13 12:40:25 -07:00
Tom Moor 18d104218e fix: public share links attempting to load backlinks 2019-07-13 11:33:32 -07:00
Tom Moor a515631e21 feat: document menu available in sidebar (#986)
* feat: document menu available in sidebar

* fix: more accessible blue

* feat: accessible blue
feat: clearer new doc button
closes #983

* lint
2019-07-13 10:15:38 -07:00
dependabot[bot] 28954a19af chore(deps): bump lodash from 4.17.11 to 4.17.13 (#987)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.13.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.13)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-12 13:32:56 -07:00
Tom Moor b3f847a371 fix: User profiles dont open from document collaborator facepile 2019-07-11 22:32:37 -07:00
Tom Moor c9da515d4c fix: force resolution of js-yaml (WS-2019-0063) 2019-07-09 21:32:42 -07:00
Tom Moor 3d805d5fe7 chore: tooltip update / remove css loader (#985)
* fix: Add suspended filter to people management #984

* chore: removing css loader

* pui-react-tooltip -> tippy
closes #980

* remove extract-text-plugin
2019-07-09 21:17:25 -07:00
Tom Moor 7db0be0a6a fix: 2px misalignment
feat: Improved readability of tabs and subheadings
2019-07-07 21:40:34 -07:00
Tom Moor 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
Tom Moor 599e5c8f5d Merge branch 'thenanyu-refactor-doc-dirty-logic' 2019-07-07 19:20:04 -07:00
Tom Moor 14b746c676 Update documentation 2019-07-07 19:19:21 -07:00
Tom Moor 3e3db7435f lint 2019-07-07 19:18:51 -07:00
Tom Moor 2ef1d3f95c fix: email link in onboarding support doc 2019-07-07 16:13:56 -07:00
Tom Moor 2cfdf7043b fix: zIndex of toolbar buttons 2019-07-07 11:30:15 -07:00
Tom Moor 8ac47074fe Update README.md 2019-07-07 09:29:56 -07:00
Nan Yu beb3a80d3d fix up the readme and sample .env to smooth out first dev experience (#976)
* chore: fix up the readme and sample .env to smooth out first dev experience

* fix indentation
2019-07-07 09:14:27 -07:00
thenanyu dea6085a11 refactor document dirty and empty logic 2019-07-06 21:45:50 -07:00
Tom Moor ccc0906b0a feat: Improved onboarding documents (#970)
* feat: New onboarding documents

* Images -> blocks

* Add tips

* test: removes assumptions of welcome documents

this actually results in the tests being much more understandable too

* add db flag when document was created from welcome flow
2019-07-04 10:33:00 -07:00
dependabot[bot] eb3a1dd673 Bump axios from 0.18.0 to 0.18.1 (#974)
Bumps [axios](https://github.com/axios/axios) from 0.18.0 to 0.18.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.18.1/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.18.0...v0.18.1)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-04 00:09:30 -07:00
dependabot[bot] b12f15de52 Bump handlebars from 4.1.0 to 4.1.2 (#973)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.0 to 4.1.2.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.1.0...v4.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-04 00:04:43 -07:00
dependabot[bot] e1e4c006d2 Bump fstream from 1.0.11 to 1.0.12 (#972)
Bumps [fstream](https://github.com/npm/fstream) from 1.0.11 to 1.0.12.
- [Release notes](https://github.com/npm/fstream/releases)
- [Commits](https://github.com/npm/fstream/compare/v1.0.11...v1.0.12)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-04 00:00:41 -07:00
Tom Moor d3abbcf9d5 feat: Added tooltips to editor controls 2019-07-03 21:32:21 -07:00
Tom Moor 34f011d99f Bump RME (fixes special chars in code blocks) 2019-06-29 00:04:26 -07:00
Tom Moor 232216193f fix: Correctly detect Slack team 2019-06-27 22:35:49 -07:00
Tom Moor 5a6b9caabc fix: bring local and remote delete inline 2019-06-26 22:18:18 -07:00
Tom Moor ce675a7fe2 fix: Remove collections/document when removed elsewhere 2019-06-26 22:10:24 -07:00
Tom Moor 3d7eb11a49 fix: react warning with DropToImport 2019-06-26 22:10:07 -07:00
Tom Moor 8200e36b89 fix: Accessibility warning with react-modal 2019-06-26 22:09:52 -07:00
Tom Moor 1ed257de62 fix: Race condition fetching collection after doc create 2019-06-26 20:24:20 -07:00
Tom Moor f0de382367 fix: Deeply nested document breadcrumb menu 2019-06-25 23:21:04 -07:00
Tom Moor 5f8956e5c6 fix: more language cleanup 2019-06-25 22:06:20 -07:00
Tom Moor b93824915d fix: Settings screen cleanup 2019-06-25 21:53:23 -07:00
Tom Moor 7aea6458ce fix: Update email in auth service should update email in Outline 2019-06-25 21:44:46 -07:00
Tom Moor 424af9e72c feat: Show account email address on notification settings 2019-06-25 21:38:23 -07:00
Tom Moor c9c5e43389 fix: add support for help slack command 2019-06-25 20:43:59 -07:00
Tom Moor 46ad1feb96 chore: Remove welcome email for Slack users (against TOS) 2019-06-25 20:28:45 -07:00
Tom Moor 8faed5de6f chore: update about page 2019-06-25 00:22:27 -07:00
Tom Moor 5c39287a59 Merge branch 'mogita-update-installation-guide' 2019-06-24 23:08:06 -07:00
Tom Moor b9e48e86c1 Remove ap- from AWS_REGION example 2019-06-24 23:07:54 -07:00
Tom Moor d39260c5c7 Merge branch 'update-installation-guide' of https://github.com/mogita/outline into mogita-update-installation-guide 2019-06-24 22:59:43 -07:00
Tom Moor d5192acabf feat: invites (#967)
* stub invite endpoint

* feat: First pass invite UI

* feat: allow removing invite rows

* First pass: sending logic

* fix: label accessibility

* fix: add button submits
incorrect permissions
middleware flow error

* 💚

* Error handling, email filtering, tests

* Flow

* Add Invite to people page
Remove old Tip

* Add copy link to subdomain
2019-06-24 22:14:59 -07:00
mogita 1c8e074662 fix: remove redundant line breaks 2019-06-24 13:27:22 +08:00
mogita 4bea33eae0 Add port number to test db 2019-06-24 11:31:14 +08:00
mogita c278172290 Merge from upstream master 2019-06-24 11:29:21 +08:00
mogita fefb9d0c13 Prefer yarn for building 2019-06-24 11:22:56 +08:00
mogita c865c57f92 Add port number 2019-06-24 11:22:16 +08:00
Tom Moor f406faf08e chore: remove asyncLock
closes #928
2019-06-23 17:57:37 -07:00
Tom Moor 0a8a685c12 fix: improved pagination validation 2019-06-23 16:11:15 -07:00
Tom Moor 32f83311f6 chore: upgrade sequelize (#965)
* 0.18.0

* chore: Upgrade sequelize 4 -> 5

* fix: migrations v5 support

* fix: Majority of test failures

* fix: the rest of v5 tests
2019-06-23 15:49:45 -07:00
Tom Moor 595adeb55f 0.18.0 2019-06-19 00:35:13 -07:00
Himanshu Agarwal 0079593446 Fix: Now supports AWS signature version 4. (#949)
* intial commiy

* cleaning code

* added makeCredential to s3.js and removed extra module dependecy

* lint fixes

* minor fix

* minor fixes

* changed encoding type from string to any

* added new env var to env.sample
2019-06-19 00:33:38 -07:00
Tom Moor ebd9535cb4 Flow 2019-06-19 00:06:24 -07:00
Tom Moor 318ad18894 closes #944 2019-06-18 23:45:29 -07:00
Tom Moor e9e21f280e closes #964 2019-06-18 23:39:29 -07:00
Tom Moor 86b2dbf5c8 docs: Add append flag to documentation 2019-06-13 23:38:57 -07:00
arpitsingh94 7dfe8785a2 Added ability to append to documents. Added test cases for the same (#963)
* added ability to append to documents. Added test cases for the same

* made changes required for lint test

* updated snapshot for document.test.js to reflect new test cases added

* append should not enforce newline character
2019-06-13 23:36:24 -07:00
mogita 4448ea8e4b Update placeholders 2019-05-31 11:27:01 +08:00
mogita cb0da79be3 Update installation guide 2019-05-31 11:26:26 +08:00
Tom Moor 18a5cd8765 Bump RME 2019-05-25 22:30:03 -07:00
Tom Moor ad51ac28b1 Table editing (#955)
* WIP

* Up deps
2019-05-25 11:26:51 -07:00
Tom Moor c6ae18503a Closes #903 - Added more syntax highlighters 2019-05-19 18:45:42 -07:00
Tom Moor 2db8cdc7d1 Fixes #952 – Page jump 2019-05-19 17:49:51 -07:00
Tom Moor 8942c7afe8 Add integration pages for Abstract integration 2019-05-07 20:02:23 -07:00
Tom Moor 402638ca54 Added: Abstract public share embed support 2019-05-07 19:46:02 -07:00
Tom Moor d5f6311bbc Fixed: Added support for new loom domain name 2019-05-07 19:32:03 -07:00
Tom Moor 3eb67eaecf Fixes: Calm notifications when hitting CMD+S while editing 2019-04-23 20:54:24 -07:00
Tom Moor bc918b7bf5 Fixes: Search filter dropdown should close on selection 2019-04-23 20:30:40 -07:00
Tom Moor 6d03257cc1 Bump RME – More editor fixes 2019-04-23 20:22:49 -07:00
Tom Moor a35a047cc2 Fixes: Loading indicator on search screen load
Fixes: Unscrollable dropdowns with large datasets
2019-04-23 07:51:02 -07:00
Tom Moor 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
Tom Moor a256eba856 Fixes #936 2019-04-20 15:31:51 -07:00
Tom Moor 8f276731ed Fixes: Socket reconnecting when changing theme 2019-04-20 15:19:35 -07:00
Tom Moor eb638ba68d Fixed: Page component naming 2019-04-20 15:07:25 -07:00
Tom Moor b54583f438 👕 2019-04-20 12:01:09 -07:00
Tom Moor 8ba27762d1 Fix: Race condition in websocket emit 2019-04-20 11:40:14 -07:00
Tom Moor d552d1e34d Prefix socket names 2019-04-18 20:37:46 -07:00
Tom Moor 56a6db7d2a Cleanup 2019-04-18 18:51:16 -07:00
Tom Moor f491029c21 Missing divider on document header 2019-04-17 23:13:25 -07:00
Tom Moor 0bc6662366 Update RME: Fixes horizontal rules being interpreted as headings 2019-04-17 23:09:43 -07:00
Tom Moor 5b34a4f076 Fix: Don't send notifications for autosave events 2019-04-17 21:55:11 -07:00
Tom Moor 77f28584d4 Merge branch 'master' of github.com:outline/outline 2019-04-17 21:49:25 -07:00
Tom Moor 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
Tom Moor 2ab35e23f3 Atom / RSS meta link 2019-04-11 19:53:26 -07:00
Tom Moor 4a571a088e Closes #930 – Don't allow launch of move dialog from drafts 2019-04-10 21:13:21 -07:00
Tom Moor 0c1bf1586d Closes outline/issues#926
Closes outline/issues#888
Added native lazy loading in prep for Chrome release
2019-04-10 21:06:53 -07:00
Tom Moor c1256c61aa Search archived documents (#932)
* POC

* Improved styling

* Test
2019-04-09 09:20:30 -07:00
Tom Moor 57e051d62b Clarify available options in document move
closes #852
2019-04-08 22:27:10 -07:00
Tom Moor a3ca3447d1 Closes #929 – Clarify pin feature 2019-04-08 21:47:27 -07:00
Tom Moor 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
Tom Moor 16066c0b24 Add websocket reserved domains 2019-04-07 17:05:05 -07:00
Tom Moor 705938e622 Bump RME, fix tab to indent lists 2019-04-07 15:57:05 -07:00
Tom Moor d668bd5646 Remove duplicate save in archive
Improve documents.archive test
2019-04-07 09:56:09 -07:00
Tom Moor 135d035eb5 Fixes: Unneccessary refresh navigating to settings 2019-04-06 17:59:15 -07:00
Tom Moor ea3e81acc4 Closes #922 - Dark mode fixes 2019-04-06 17:07:14 -07:00
Tom Moor 1fc5578349 Fixes: Ensure publishing info does not wrap 2019-04-06 16:46:20 -07:00
André Glatzl e33d447a0d Issue #919 : Show DocumentPath in Breadcrumbs at Publishing Info, instead of only showing collection's name (#920)
closes https://github.com/outline/outline/issues/919
2019-04-06 16:45:08 -07:00
Tom Moor bf685c7703 Update routeHelpers.js 2019-04-06 16:29:23 -07:00
Tom Moor 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
Tom Moor 76957865bb Ensure normalize on load, imported documents arent safe 2019-03-31 14:39:55 -07:00
Tom Moor 1883e77d5c Bump RME, improve perf 2019-03-30 23:36:02 -07:00
Tom Moor 20a54bd2e9 Don't publish by default 2019-03-30 23:35:53 -07:00
Tom Moor 76bb6c4341 Change dev ports to reduce clashes 2019-03-30 23:35:09 -07:00
Tom Moor 49e5748a4f Change dev ports to reduce clashes 2019-03-30 23:34:56 -07:00
Tom Moor 52a029a657 👕 2019-03-13 23:50:52 -07:00
Tom Moor 1ef528bbd7 Bump RME - closes #915 2019-03-13 23:49:54 -07:00
Tom Moor f80c3c6877 Fixed: Return error when Slack auth fails to help with debugging 2019-03-13 23:22:12 -07:00
Tom Moor a7d49e9042 Bump production dependencies with open CVEs
closes #916
2019-03-13 23:11:03 -07:00
Tom Moor 3fcfae257f Small flow issues 2019-03-13 23:00:41 -07:00
Tom Moor 3ef507c137 Fixes #918 - Add extra at bottom of document 2019-03-13 22:59:25 -07:00
Tom Moor 12ea37e71e Fixes: Text color on disabled buttons 2019-03-13 22:45:49 -07:00
Tom Moor aba3d25700 logger.warn does not exist 2019-03-13 09:03:51 -07:00
Tom Moor 7b7ec52eee Bump production dependencies with open CVEs 2019-03-12 23:54:35 -07:00
Tom Moor 680a9245bd More text color tweaking 2019-03-12 22:33:24 -07:00
Tom Moor 0c2d9f2f9c Tweak subheading colors 2019-03-12 22:11:33 -07:00
Tom Moor 59c82f1f06 Dark Mode (#912)
closes #704
2019-03-12 21:35:35 -07:00
Tom Moor 6445da33db Update Flex.js 2019-03-10 14:32:42 -07:00
Tom Moor a2749a752a ESC key should go back when editing a document 2019-03-09 20:12:43 -08:00
Tom Moor 38f4e6b9a2 Closes #909 2019-03-09 20:02:46 -08:00
Tom Moor fc7c485ba9 Add 'n' shortcut for new doc
Fixed cmd+enter shortcut to publish doc
Fixed keyboard shortcut display on non-mac
Fixed heading alignment
Fixed documents smaller than page should not scroll
2019-03-09 20:00:45 -08:00
Tom Moor f75783c2f1 Added empty state on user profiles when no documents edited 2019-03-09 18:55:54 -08:00
Tom Moor f11bba6b63 Remove logging 2019-03-09 18:43:40 -08:00
Tom Moor 24bf3766bf Add shortcut tip when searching 2019-03-09 16:10:53 -08:00
Tom Moor e3cb7f9055 Update index.js 2019-03-07 20:47:37 -08:00
Tom Moor 3db1a6679a Bump RME 2019-03-07 08:44:57 -08:00
Tom Moor 222f164247 Fixes: Don't send client connection issues to error tracker 2019-03-02 21:57:26 -08:00
Tom Moor d91f4045c9 Add favicon to serverside html 2019-03-02 21:43:07 -08:00
Tom Moor 8b639682ff Guard against empty error messages 2019-03-02 21:17:26 -08:00
Tom Moor 67ed017122 Fixes: toString of undefined 2019-03-02 21:11:36 -08:00
Tom Moor f1c14f943e Bump RME 2019-03-02 20:35:28 -08:00
Tom Moor 18aa3f3787 Fix specs, thanks for the breaking minor change jest 2019-03-02 16:16:46 -08:00
Tom Moor 4a90c57dfe More dependency upgrades 2019-03-02 16:02:44 -08:00
Tom Moor 565a0006c9 Remove lint-staged dependency 2019-03-02 15:56:41 -08:00
Tom Moor 78ee921244 Upgrade slug dependency 2019-03-02 15:51:02 -08:00
Tom Moor 78606e892a Merge master 2019-03-02 15:41:46 -08:00
Tom Moor f705da4f3b Update dependencies 2019-03-02 15:39:18 -08:00
Tom Moor fa38ab60eb Fixes: Unexpected token parsing sessions cookie (#905) 2019-03-02 14:58:56 -08:00
Tom Moor ad2e869dea 👕 2019-03-02 14:55:39 -08:00
Tom Moor b4796e5b35 Fixes: Cookie encoding issues 2019-02-28 23:23:44 -08:00
Tom Moor e3b105d1c0 Update Slack logo, closes #866 2019-02-20 21:08:54 -08:00
Tom Moor 1d93acefeb Bump RME – Fixes scroll to anchor
closes #902
2019-02-20 21:00:40 -08:00
Tom Moor 19fc99944a Adds 'post to channel' functionality. (#901)
* Adds 'post to channel' functionality. Closes #613

* Add specs
Update Slack integration marketing page

* Fix specs

* 💚
2019-02-19 22:42:13 -08:00
Tom Moor e283d15d7e Add mindmeister content pages 2019-02-18 11:40:26 -08:00
Tom Moor fbd311d352 Add mindmeister support 2019-02-18 11:32:21 -08:00
Tom Moor 15bc0e7629 Bump RME – Improves keyboard behavior around deleting inline code 2019-02-17 00:39:06 -08:00
Tom Moor 8af7c3c264 Closes #894 - Sidebar jumping regression 2019-02-17 00:38:35 -08:00
Tom Moor 0b1a4c6184 Fixes: Server error when validating UUID against empty value 2019-02-15 21:52:34 -08:00
Tom Moor 346ea4df89 Fixes: Error when user is suspended by deleted user
Fixes: Suspended user interface never displayed
2019-02-15 21:49:48 -08:00
Tom Moor fdb49cf153 Bump RME: Includes fix for addition marks disappearing 2019-02-15 21:48:54 -08:00
Tom Moor 188f70b676 Fixes #893 – Allow links to different subdomains on same domain as wiki 2019-02-09 16:17:54 +07:00
Tom Moor 721332e87a Update RME – Fixes: Individual code lines are scrollable 2019-02-09 16:09:02 +07:00
Tom Moor be85e8a6e0 Closes #895 - Chrome 72 changed flexbox behavior 2019-02-08 10:29:19 +07:00
Tom Moor 945e7ffb7b Fixes: Imported tables are normalized out of document 2019-02-08 10:23:02 +07:00
Tom Moor b597226eeb Merge pull request #887 from outline/issue-726
Fixes: Multiline blockquotes collapse
2019-01-27 22:59:05 +00:00
Tom Moor c2e58898d8 Fixes: Multiline blockquotes collapse 2019-01-27 22:43:40 +00:00
Tom Moor 476bab9333 Fixes: Welcome email dashboard location (#886)
* Fixes: Welcome email dashboard location
Updated logo in email

* 💚
2019-01-27 12:30:53 +00:00
Tom Moor 1a6a7d04e5 Closes #866 - Updated Slack Icons 2019-01-27 00:21:22 +00:00
Tom Moor a2434988b4 Fixes: Overflow of long titles in move dialog 2019-01-26 18:05:58 +00:00
Tom Moor 70d30e31b9 Fixes: Quick fix for document move not working 2019-01-26 18:01:13 +00:00
Tom Moor b46db25553 Fixes: No redirect after doc import 2019-01-26 17:28:08 +00:00
Tom Moor e7e94cdef2 Bump RME 2019-01-26 17:08:00 +00:00
Tom Moor 0ce50781d7 Fixes: Redirects do not push into history stack 2019-01-26 13:01:33 +00:00
Tom Moor 1768a1921d Fixes: Issue with embeds disappearing 🙈 2019-01-22 12:43:54 +00:00
Tom Moor 39a61d8559 Upgrade Dependencies (#873)
* Loading placeholder

* Upgrade dependencies, reduce warnings

* 👕

* Remove more unused deps

* Bump RME
2019-01-21 11:06:44 -08:00
Tom Moor 4f4e55d120 Fixes: New document creation 2019-01-19 18:14:10 -08:00
Tom Moor 5525730272 Refactor history sidebar, reduce thrashing on doc render 2019-01-19 17:28:32 -08:00
Tom Moor babcf4a3f3 More withRouter removal 2019-01-19 15:25:46 -08:00
Tom Moor 9360cd0014 Merge pull request #871 from outline/less-with-router
Reduce withRouter usage
2019-01-19 13:33:12 -08:00
Tom Moor 2d48eb46a9 Closes #868 2019-01-19 13:11:11 -08:00
Tom Moor 258b5464a2 Boop 2019-01-19 01:52:43 -08:00
Tom Moor bfd32843ff Added caching of loaded editor instance 2019-01-19 01:31:34 -08:00
Tom Moor 72d8abe069 Canonical check 2019-01-19 00:51:25 -08:00
Tom Moor 77a8f54973 Even less history passing, fix global styles warning in dev 2019-01-19 00:44:16 -08:00
Tom Moor 13501b6d76 Moving redirects to declarative method 2019-01-19 00:23:39 -08:00
Tom Moor d21dd710bb Upgrade Editor – Slate 0.44 / RME 8.0.0 (#863)
* Upgrade Slate

* Normalization

* Remove dupe dep

* Fixes placeholders

* Image uploading fixed

* Verbose but solid placeholder handling

* RME 8.0.0

* Fixes: Ability to delete embeds
2019-01-18 22:44:31 -08:00
Tom Moor 0be5aef1c6 Merge pull request #865 from satyadeepk/patch-3
Fixed broken License link in Readme
2019-01-16 09:33:15 -08:00
Satyadeep 4015b19484 Fixed broken License link in Readme
The previous link was giving 404. Changed the relative URL to absolute URL.
2019-01-16 15:47:18 +05:30
Boris Mann d081b64ce2 Heroku deploy support (#861)
* Adding app.json for Heroku -- Procfile already exists

* Removed required false and changed values to strings

* Required is required!

* Tested and working install

* Apply suggestions from code review

Thanks to @tommoor for updating the descriptions for items I wasn't sure about. Added!

Co-Authored-By: bmann <boris@bmannconsulting.com>

* missing coma
2019-01-15 19:04:03 -08:00
Tom Moor 8d3dc3a92e User Profile (#858)
* First pass user profile

* 💚

* More collaborator tooltip improvements
2019-01-12 19:41:45 -08:00
Tom Moor ef583314e0 Remove parse-domain dependency (#856)
* Remove parse-domain dependency

* Remove only, add commentary

* Update lockfile
2019-01-12 13:50:30 -08:00
Tom Moor 394adf97f8 Minor grammar and mobile style fixes 2019-01-11 21:46:58 -08:00
Tom Moor 5ba1522ada Add Prezi to integrations page 2019-01-11 21:40:01 -08:00
Tom Moor 6c055810ad Merge pull request #855 from outline/issue-854
Fixes: Regex-like search queries error
2019-01-11 21:16:03 -08:00
Tom Moor 3a260037cd Regex-like search queries from Slack should not cause a server error 2019-01-11 19:41:19 -08:00
Tom Moor a7c669f90b Hide pricing page on self hosted installations 2019-01-10 19:15:36 -08:00
Tom Moor 449f4f7a26 Fixes: Realtimeboard and Vimeo embed should be secure 2019-01-10 19:12:36 -08:00
Tom Moor 6d769a738d Merge pull request #853 from rylxes/slack-document-update-fix
document update fix for slack
2019-01-10 09:29:05 -08:00
sherriff f82a3fa32b document update fix for slack 2019-01-10 14:24:10 +01:00
Tom Moor 6fb51eb7bb 💚 2019-01-09 22:59:39 -08:00
Tom Moor 23b227c352 Closes #842 - Toast messages hanging 2019-01-09 22:41:06 -08:00
Tom Moor c54c3d963e Increase accessibility of search input 2019-01-09 22:15:09 -08:00
Tom Moor 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
Tom Moor e6fd7276fc Fixed: Viewers for current doc 2019-01-08 23:06:02 -08:00
Tom Moor 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
Tom Moor 11b0ac0c66 Fix new document creation 2019-01-08 09:41:03 -08:00
Tom Moor 4ddd7d4dfe Merge pull request #843 from outline/collection-sort
Add new document sort options to collections
2019-01-08 09:19:51 -08:00
Tom Moor 70c93fcc86 Refactor, add alphabetical sort 2019-01-07 23:42:55 -08:00
Tom Moor 4cd482c80e Merge branch 'master' of github.com:outline/outline into collection-sort 2019-01-07 23:14:50 -08:00
Tom Moor e6e89dc243 Added: Recently published view to collection
Added: Infinite scroll to collection
2019-01-07 23:14:43 -08:00
Tom Moor 3bca0ed9c2 Merge pull request #839 from outline/wildcard-search
Improve partial word matching
2019-01-07 21:53:35 -08:00
Tom Moor 74515e0b19 Improve partial word matching 2019-01-07 21:44:33 -08:00
Tom Moor a68ad856a3 Move draft bubble inline with menu icons 2019-01-06 16:25:05 -08:00
Tom Moor b9765fb59e Improved sidebar selected styling, simplified logic and css 2019-01-06 16:12:07 -08:00
Tom Moor 12e324d34c Fixed: React warning 2019-01-06 14:19:08 -08:00
Tom Moor c970cddd14 Consistent page titles 2019-01-06 14:14:44 -08:00
Tom Moor 56bda12192 WIP: Pricing page 2019-01-06 13:09:22 -08:00
Tom Moor 58e31a9d3d Fixes #831 - Link from Slack notification does not work for teams with subdomains 2019-01-06 00:05:50 -08:00
Tom Moor 44e04c57a9 Add Prezi embed support
Increase size of video embeds
2019-01-05 23:43:51 -08:00
Tom Moor accba7614c Add Google Slides embed support 2019-01-05 23:29:14 -08:00
Tom Moor 028160d9ad Fixes: Share links in private collections visible in share listing 2019-01-05 23:13:58 -08:00
Tom Moor 70287de6d7 Fixes: Cannot load document in private collection from share link when signed in with user that cannot access 2019-01-05 23:04:09 -08:00
Tom Moor 18859bec3d Add real buttons to document header
Fixed: Incorrect page title when starting a new doc
Fixed: Linting error
2019-01-05 18:45:19 -08:00
Tom Moor f80e4ab04c Improved button styling
Added toast when collection permissions are saved
Removed usage of setState (old habits die hard)
2019-01-05 18:23:57 -08:00
Tom Moor 713473b7d2 Revert node version due to sequelize incompat 2019-01-05 13:55:24 -08:00
Tom Moor 8c02b0028c Collection Permissions (#829)
see https://github.com/outline/outline/issues/668
2019-01-05 13:37:33 -08:00
Tom Moor 8978915423 Fix Lucidchart embeds
closes https://github.com/outline/outline/issues/836
2019-01-01 11:58:57 -08:00
Tom Moor d045b8975c Only for admins 2018-12-25 17:18:20 -08:00
Tom Moor 96b1d6257e Added: Dashboard help tip 2018-12-25 17:12:37 -08:00
Tom Moor e08cb10b7f Closes #827 – Add optional github access token 2018-12-24 10:36:17 -08:00
Tom Moor 80a16c8af2 Closes #825 2018-12-23 10:42:34 -08:00
Tom Moor b654ba37f5 Add non-mac typeface fallbacks for headings 2018-12-23 09:45:31 -08:00
Tom Moor b673ec88b2 Merge pull request #824 from outline/content-pages
Content pages
2018-12-22 20:08:48 -08:00
Tom Moor ab82d76332 Optimize images 2018-12-22 19:57:01 -08:00
Tom Moor 4599e03121 Update API docs to new layout 2018-12-22 18:24:49 -08:00
Tom Moor 122fdfa34b Minimal developer page improves to bring inline 2018-12-21 00:35:40 -08:00
Tom Moor 47ea3c343c Figma, framer, invision, marvel pages 2018-12-20 23:53:28 -08:00
Tom Moor ac814abda4 Fixes: Oauth error on subdomains authenticating slack post 2018-12-20 20:25:13 -08:00
Tom Moor b7bea4941e Content pages 2018-12-20 20:00:58 -08:00
Tom Moor d1b352963f Optimize images 2018-12-20 07:19:48 -08:00
Tom Moor 6ebb652481 Adding content pages [wip] 2018-12-20 07:19:05 -08:00
Tom Moor 3a9a5f5ed3 Closes #819 2018-12-17 22:52:06 -08:00
Tom Moor 29630e68d2 Closes #815 2018-12-16 17:57:41 -08:00
Tom Moor 3330359c4c Fixes: Misalignment of signin buttons on mobile 2018-12-16 17:26:38 -08:00
Tom Moor 3c51b38672 Upgrade RME, fixes block insert menu appearing on embeds and block toolbar not hiding correctly on outside click 2018-12-16 14:18:56 -08:00
Tom Moor 8653338f4e Fixes: Connecting slack commands from subdomain 2018-12-15 19:05:22 -08:00
Tom Moor 044b4f16bc Editor embeds (#680)
- [x] Make deleting an embed easier
- [x] Add document level ability to disable embeds
- [x] Add team level ability to disable embeds
- [x] GitHub
- [x] Numeracy
- [x] Mode Analytics
- [x] Figma
- [x] Airtable
- [x] Vimeo
- [x] RealtimeBoard
- [x] Loom
- [x] Lucidcharts
- [x] Framer
- [x] InVision
- [x] Typeform
- [x] Marvel
- [x] Spotify
- [x] Codepen
- [x] Trello
2018-12-15 14:06:29 -08:00
Tom Moor 836f9a88a2 Fixes: Teams with non-latin characters annot signin 2018-12-12 10:31:08 -08:00
Tom Moor 05fe573974 Remove duplicate documents.update hook 2018-12-08 08:59:15 -08:00
Tom Moor b068ba9f02 Customize route for first signin for tracking 2018-12-08 08:57:34 -08:00
Tom Moor d3911b9e20 Fixes: Slack integrations page needs to ensure collections are loaded 2018-12-06 19:18:34 -08:00
Tom Moor 06e7ab84cd Cascade notification setting deletion on user account deletion 2018-12-06 19:14:43 -08:00
Tom Moor 9ca0038d39 Fixes: Collection creation notification email
Added: Unsubscribe option to notification email footers
Added: Two new notification types (emails not written yet)
Fixed: Validation added to notification setting events
2018-12-05 23:44:41 -08:00
Tom Moor cc8dacba32 Preserve function names in production code 2018-12-04 22:36:13 -08:00
Tom Moor 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
Tom Moor 67cd250316 Remove diff summary from document history sidebar.
Cause of occassional memory leaks and downtime :(
2018-11-23 11:12:14 -08:00
Tom Moor 36fd81d190 Improve styling of images in Changelog 2018-11-22 21:40:17 -08:00
Tom Moor c5cd2223f7 Bump RME: Fixes deleting images now smoother
Adds code language selection to code blocks
2018-11-22 14:57:03 -08:00
Tom Moor 085c452d77 Add subtle branding to shared documents 2018-11-20 21:12:17 -08:00
Tom Moor 76924e70f5 Fix ordering of recently updated documents
Edited -> Updated
2018-11-20 20:18:24 -08:00
Tom Moor f20f197930 Add ability to create description on collection create 2018-11-19 23:04:55 -08:00
Tom Moor ecc7ba0e9d Added: Collection to starred view
Alphabetical sort to starred view
2018-11-19 23:01:49 -08:00
Tom Moor 2c55f94d39 Move session tracking 2018-11-19 21:28:15 -08:00
Tom Moor 8aaab2fc76 Add ga dimension 2018-11-19 21:05:43 -08:00
Tom Moor 85da275b06 Merge branch 'collection-descriptions' 2018-11-18 22:03:27 -08:00
Tom Moor e251c77f3c Fixes: Error loading new document in Editor 2018-11-18 22:03:10 -08:00
Tom Moor 4845331d70 Merge pull request #807 from outline/collection-descriptions
Collection descriptions
2018-11-18 21:34:05 -08:00
Tom Moor 45445606b4 Improve loading state 2018-11-18 21:27:50 -08:00
Tom Moor 8208a6128a Upgrade RME - z-index fix 2018-11-18 18:59:09 -08:00
Tom Moor 032d843f5b Fix isInternalUrl for subdomain support
Refactor / reduce plumbing
2018-11-18 18:43:11 -08:00
Tom Moor cd1956b971 Split editor 2018-11-18 18:28:22 -08:00
Tom Moor c308a2378f stash 2018-11-18 13:12:46 -08:00
Tom Moor 919bca6769 Collections got descriptions now 2018-11-18 13:12:46 -08:00
Tom Moor 3718a9609d Closes #805 - Unable to signin on self-hosted installations with non-www subdomain 2018-11-18 12:07:11 -08:00
Tom Moor 3c563e3001 Ensure team authentication matches subdomain 2018-11-17 23:30:05 -08:00
Tom Moor 5d6dca0faa Fixes: SPA page tracking 2018-11-17 19:44:57 -08:00
Tom Moor 1b0ac340c2 Best practice for DefinePlugin 2018-11-17 19:09:48 -08:00
Tom Moor 6e32f292c2 Allow filtering of people in admin 2018-11-17 18:43:46 -08:00
Tom Moor d74b99635e Fixes: Save profile picture automatically after upload
Fix jank when cropping large photos
2018-11-17 18:25:10 -08:00
Tom Moor d3834d2dc5 Fixes: Redis keys related to queue jobs should be removed after completion 2018-11-17 16:09:42 -08:00
Tom Moor 11a411447c Bump RME - closes #803 2018-11-17 14:06:21 -08:00
Tom Moor 0a73048f0f Fixed height for keyboard shortcuts UI
closes #792
2018-11-15 00:28:59 -08:00
Tom Moor e3b0b55065 CRUSH pngs on homepage 2018-11-15 00:21:24 -08:00
Tom Moor e73c25e3e3 Include missing doctype (lighthouse feedback) 2018-11-15 00:16:15 -08:00
Tom Moor 26036ad92c Fixes: handling of www subdomain in production
Hanging sessions when subdomain changes
2018-11-13 23:08:27 -08:00
Tom Moor 400d0f264e Closes #801 2018-11-13 20:54:18 -08:00
Tom Moor ac21d4b6e8 v0.17.0 2018-11-12 23:33:03 -08:00
Tom Moor 414cb1d79c Fix specs 2018-11-12 23:17:50 -08:00
Tom Moor a95632b9de Fix infinite redirect on www subdomain
Add first route tests
2018-11-12 22:45:51 -08:00
Tom Moor 1d906c7f68 Merge pull request #791 from outline/subdomains
Custom Subdomains
2018-11-12 22:01:49 -08:00
Tom Moor 2e3737c6f5 Cleanup, fix header links on subdomains 2018-11-12 20:22:01 -08:00
Tom Moor bad8718a6b 💚 2018-11-12 14:53:32 -08:00
Tom Moor c60bd4260f Provision subdomain for ALL new teams, add tests 2018-11-12 14:00:23 -08:00
Tom Moor b3a8d34af3 Add support for SUBDOMAINS_ENABLED=false 2018-11-11 22:06:50 -08:00
Tom Moor 61138ff4fa Cleanup 2018-11-11 21:17:03 -08:00
Tom Moor c81135c09e animations 2018-11-11 21:08:28 -08:00
Tom Moor cc9f32cdc9 Team switcher 2018-11-11 16:24:05 -08:00
Tom Moor 10e1f0231c Iterate, iterate 2018-11-11 14:23:31 -08:00
Tom Moor e24a187699 accessToken per subdomain 2018-11-09 23:40:33 -08:00
Tom Moor c323de4807 Attempt to provision subdomain on team create 2018-11-08 21:05:07 -08:00
Tom Moor 6391474d14 getUrl -> url consistency
test improvements
2018-11-08 21:05:07 -08:00
Tom Moor 8de074b275 Allow removing subdomain 2018-11-08 21:05:07 -08:00
Tom Moor 1be8e13828 Fix localhost
Handle automatic subdomain redirect
2018-11-08 21:05:07 -08:00
Tom Moor 6418712c47 Improve error handling 2018-11-08 21:05:07 -08:00
Tom Moor 21b1c0747c Basic functionality in place, need improved errors and logged in redirect 2018-11-08 21:05:07 -08:00
Tom Moor 07e61bd347 First pass, can create and update 2018-11-08 21:02:36 -08:00
Tom Moor 4260b5e664 datetime -> dateTime [ci skip] 2018-11-06 23:07:07 -08:00
Tom Moor ebc0346ff9 Merge pull request #798 from outline/upgrade-deps
Upgrade dependencies
2018-11-06 22:27:51 -08:00
Tom Moor 8d569fd46d Upgrade dependencies 2018-11-06 21:58:32 -08:00
Tom Moor 690feb6040 Fixes: Opening document history menu 2018-11-05 23:39:10 -08:00
Tom Moor 5f97897418 SSLify 2018-11-04 10:15:37 -08:00
Tom Moor 5f2d4e416c Upgrade RME 2018-10-29 21:05:07 -07:00
Tom Moor 464eda1d82 Merge pull request #785 from JonathanUsername/master
Make isHistory regex slightly more specific
2018-10-19 20:07:54 -07:00
Tom Moor ffe7b5a41c Merge pull request #788 from Polychain/roman/s3-content-length-range
server: fix content-length-range s3 uplaod policy
2018-10-19 20:06:54 -07:00
Roman Shtylman aadea856c3 server: fix content-length-range s3 uplaod policy
The max size should be an integer rather than a string (environment variables
are strings). More strict s3 implementations reject the upload because they do
not consider the policy valid if a string is used rather than an integer.
2018-10-19 18:09:44 -07:00
Jonathan King 91d79491f4 Make isHistory regex slightly more specific 2018-10-16 13:01:17 +01:00
Tom Moor 61cce88ef8 Add note on Google Auth to README [ci skip] 2018-09-30 23:32:06 -07:00
Tom Moor 1356e35ad1 Closes #686 - null does not trigger default param 2018-09-30 18:42:27 -07:00
Tom Moor d54750ef19 Closes #769 2018-09-30 18:31:42 -07:00
Tom Moor 283fad5f87 Merge pull request #781 from outline/zapier
Zapier
2018-09-30 18:11:22 -07:00
Tom Moor b02e5184fd Closes #764 - Visual feedback that avatar is uploading 2018-09-30 18:09:35 -07:00
Tom Moor e8ef1145a1 Add integration icons
Add link to public zapier invite
2018-09-30 17:56:20 -07:00
Tom Moor f284dd1ebf Merge branch 'master' of github.com:outline/outline into zapier 2018-09-30 17:37:35 -07:00
Tom Moor 3f0202f660 Closes #780 2018-09-30 08:58:27 -07:00
Tom Moor b36977cf80 Stash 2018-09-30 08:51:14 -07:00
Tom Moor 7515bd2275 Upgrade styled-components
Upgrade styled-components-grid
2018-09-29 23:19:46 -07:00
Tom Moor ed4013e7ee Fixes #772 - Cursor jumps in search field 2018-09-29 23:10:07 -07:00
Tom Moor f78d9cb072 Link CI status correctly [ci skip] 2018-09-29 22:28:28 -07:00
Tom Moor 2504d48a09 👕 2018-09-29 22:24:52 -07:00
Tom Moor 9cc3264807 💚 2018-09-29 22:14:55 -07:00
Tom Moor d0bee23432 Version History (#768)
* Stash. Super rough progress

* Stash

* 'h' how toggles history panel
Add documents.restore endpoint

* Add tests for documents.restore endpoint

* Document restore endpoint

* Tiding, RevisionMenu, remove scroll dep

* Add history menu item

* Paginate loading

* Fixed: Error boundary styling
Select first revision faster

* Diff summary, styling

* Add history loading placeholder
Fix move modal not opening

* Fixes: Refreshing page on specific revision

* documentation for document.revision

* Better handle versions with no text changes (will no longer be created)
2018-09-29 21:24:07 -07:00
Tom Moor 7973bfeca2 Typo in welcome email
Thanks @belindapreno for spotting
2018-09-27 21:22:29 -07:00
Tom Moor 717e26a7a9 Fixes #778 2018-09-25 22:09:12 -07:00
Tom Moor 2a8b47cab5 Types in onboarding doc 🙈 2018-09-19 15:33:58 -07:00
Tom Moor d4d4907901 Bump RME. Closes #771 2018-09-10 22:21:51 -07:00
Tom Moor 7550e03b22 Fixes: Editor content written between image upload start and finish is lost
Fixes: Image lost after upload if document is immediately closed without further edits
2018-09-03 13:58:24 -07:00
Tom Moor 59277d2c6c Merge pull request #762 from satyadeepk/patch-2
`showCollection` option in Dashboard documents list
2018-08-26 23:51:57 -07:00
Satyadeep eb3e4b2d33 showCollection option in Dashboard documents list
It was added in #718, but seems to have gone after the new tabs in the dashboard
2018-08-27 12:19:29 +05:30
Tom Moor 54a04dd8cc Linting [ci skip] 2018-08-26 15:27:32 -07:00
Tom Moor 328f731541 Share Permissions (#761)
* Share restrictions

* Tweak language, add spec
2018-08-19 16:06:39 -07:00
Tom Moor e704a86e36 Merge pull request #760 from outline/rme-5
Update to rich-markdown-editor 5.0
2018-08-18 17:58:14 -07:00
Tom Moor 61872373ec Remove nolonger neccessary editCache 2018-08-18 17:48:56 -07:00
Tom Moor f401b6f2e0 Tidying, possible fix for excessive view count 2018-08-18 17:45:56 -07:00
Tom Moor 3da078e98b Move isDirty to view concern. Document model is not updated until save 2018-08-18 17:41:09 -07:00
Tom Moor e58da006d0 👕 2018-08-16 22:53:58 -07:00
Tom Moor be09b290b7 RME upgrade, fix autoFocus logic 2018-08-16 22:51:51 -07:00
Tom Moor c140c64346 Use new RME callback to reduce amount of document serialization
Account for new RME autoFocus prop in 5.0
2018-08-16 21:19:31 -07:00
Tom Moor 059cccd36f Merge pull request #757 from egetin/path_modification
Fix PATH in modified shell environment
2018-08-14 00:14:06 -07:00
Erkka Makinen 006c6f137c Move PATH and NODE_ENV under Dockerfile. Fixes problem with PATH in
modified shell environment.
2018-08-14 08:04:52 +03:00
Tom Moor 4c1e33110e Upgrade to rich-markdown-editor 4.0 2018-08-13 21:20:44 -07:00
Tom Moor ff41aa4a17 Update debug dependency. Low severity CVE-2017-16137 2018-08-11 14:09:59 -07:00
Tom Moor 6cd7d5ca5b Fixes: Homepage pagination 2018-08-11 14:02:37 -07:00
Tom Moor 63f6d61ac0 Linting
Pagination of edited / viewed responses
2018-08-11 00:46:10 -07:00
Tom Moor 6b2211f135 Pass offset to pagination 2018-08-10 23:17:19 -07:00
Tom Moor 2de9fedcc0 Merge pull request #747 from outline/dashboard-tabs
Dashboard Tabs
2018-08-10 23:10:12 -07:00
Tom Moor d308442fef Refactor, paginate on scroll
New PaginatedDocumentList component
2018-08-10 23:03:47 -07:00
Tom Moor 71775460c7 Bump RME - Fixes block toolbar coloring 2018-08-10 12:04:58 -07:00
Tom Moor 266b4d735c Tidy, tidy 2018-08-10 00:11:58 -07:00
Tom Moor 2f681b1ce8 WIP: Dashboard tabs 2018-08-09 23:14:51 -07:00
Tom Moor d222a311ad Merge pull request #744 from outline/atlas-id-collection-id
Migrate atlasId -> collectionId
2018-08-08 09:36:46 -07:00
Tom Moor 18cfe26e83 Migrate atlasId -> collectionId 2018-08-07 23:23:26 -07:00
Tom Moor f49c495a9a Merge pull request #742 from outline/issue-625
Clarify where new document will be created from document header
2018-08-07 22:16:30 -07:00
Tom Moor 738dce8c06 Clarify where new document will be created from document header 2018-08-07 22:08:44 -07:00
Tom Moor 2238d1a7fd 👕 2018-08-07 08:30:48 -07:00
Tom Moor 9a440e4321 Merge branch 'issue-739' of github.com:outline/outline 2018-08-07 00:04:31 -07:00
Tom Moor 8e3ae07daf Bump RME - Heading anchor offset 2018-08-07 00:04:08 -07:00
Tom Moor f7bde4a5fc Add 'share' option to document header 2018-08-06 23:58:34 -07:00
Tom Moor 4674c10203 Empty state language improvemnts 2018-08-06 23:22:20 -07:00
Tom Moor 1c9c2d8e26 Add 'new document' menu to starred and drafts screens 2018-08-06 22:49:41 -07:00
Tom Moor 3334d783f3 Closes #724 2018-08-06 22:22:15 -07:00
Tom Moor d863ab3271 Hash navigation improvements 2018-08-05 22:08:46 -07:00
Tom Moor cad83f4e7b Tighten context snippet in slash command results 2018-08-05 11:12:59 -07:00
Tom Moor 61b6b18148 💚 2018-08-05 00:51:47 -07:00
Tom Moor fc7373a6f5 Return relevant context in search results returned to slack slash command 2018-08-05 00:34:08 -07:00
Tom Moor 71830d7c77 Further improved search result snippets 2018-08-04 22:46:55 -07:00
Tom Moor ad2d1a15bb Merge branch 'search-improves' 2018-08-04 21:28:52 -07:00
Tom Moor f5a1f59290 Fix search result ordering
Add support for returning your own drafts in results
Added regression tests
2018-08-04 21:28:37 -07:00
Tom Moor 9464967598 Merge pull request #740 from outline/search-improves
Search Improvements
2018-08-04 18:36:05 -07:00
Tom Moor 7ebbab7634 Merge branch 'master' of github.com:outline/outline into search-improves 2018-08-04 18:33:04 -07:00
Tom Moor 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
Tom Moor 32528749f0 Merge pull request #738 from outline/issue-735
Adds a new Slack message when connecting a channel for posting
2018-08-04 15:29:08 -07:00
Tom Moor 96348ced38 Adds a new Slack message when connecting a channel for posting 2018-08-04 15:10:16 -07:00
Tom Moor 89ee67606f Merge pull request #737 from outline/issue-732
Catch errors around document rendering
2018-08-04 11:02:07 -07:00
Tom Moor d3aeff833d Added ability to show more error details for reporting issue 2018-08-04 10:56:36 -07:00
Tom Moor 892ce64712 Catch errors around document rendering 2018-08-04 10:48:07 -07:00
Tom Moor 43bf47fa62 Merge pull request #734 from outline/issue-730
Allow Slack integration setup for Google Auth accounts
2018-08-02 23:29:09 -07:00
Tom Moor 662f908c76 Allow Slack integration setup for Google Auth accounts 2018-08-02 23:26:44 -07:00
Tom Moor cdd1fc4fb7 Fixes: Can't reshre a link once revoked
closes #733
2018-08-02 22:17:41 -07:00
Tom Moor 8acb60f4c7 Fixes: Link to developer documentation from token settings page 2018-08-02 00:41:51 -07:00
Tom Moor fc5a6127a5 Closes #731 - Potential URL parse error 2018-08-02 00:18:19 -07:00
Tom Moor 4faccbcb4e Fixes: Slack integration creation 2018-08-01 21:55:30 -07:00
Tom Moor 7a0466f9fd Move to CircleCI 2.0
closes #727
2018-07-27 20:26:30 -07:00
Tom Moor a75140b08c Fixes various overflow issues, #724 2018-07-24 21:13:54 -07:00
Tom Moor 9fa1ad55ce Upgrade RME. Potential fix for #723 2018-07-24 00:08:46 -07:00
Tom Moor 3874fc9b3d Closes #673 - Redirect to new document after duplicating 2018-07-21 12:55:40 -07:00
Tom Moor 28690be77c Fixes #709 - Share links fail when logged into another Outline account 2018-07-21 12:42:00 -07:00
Tom Moor 03411ead09 Upgrade RME - Slate deps and bugfixes 2018-07-21 10:53:17 -07:00
Tom Moor b3662cc35c Bring mobile styling of shared documents inline with regular documents 2018-07-21 10:18:39 -07:00
Tom Moor e20232a869 Closes #692 - Fixes download files in Firefox 2018-07-20 23:51:05 -07:00
Tom Moor 1bb4583b3f Upgrade RME - Adds markdown shortcuts to headings, fixes several FF issues 2018-07-20 00:17:59 -07:00
Tom Moor 2c0802372b Update RME - Text loss fix 2018-07-18 23:06:35 -07:00
Tom Moor 7efff83410 Update RME - Moar fixes 2018-07-18 00:32:41 -07:00
Tom Moor 6cd4e3069f Fixes: Scrolling issues in FF
#692
2018-07-15 23:11:49 -07:00
Tom Moor 5884e07c1f Merge master, small refactor 2018-07-15 07:58:58 -07:00
Tom Moor 06953acfdf Merge pull request #721 from outline/rme-2
Upgrade to RME 2
2018-07-14 22:53:20 -07:00
Tom Moor f048c4ab0c Clean up ClickablePadding
Remove log
2018-07-14 22:35:40 -07:00
Tom Moor 7f8a59ae2f Upgrade to RME 2, restores functionality removed from that module 2018-07-14 22:26:26 -07:00
Tom Moor ab6259b162 👕 2018-07-11 21:12:26 -07:00
Tom Moor 8f08f8dabf Update content pages 2018-07-11 21:01:08 -07:00
Tom Moor 19a328ebeb Improved homepage 🙏 2018-07-11 21:01:08 -07:00
Tom Moor 95c4574549 Update Navigation.js 2018-07-11 12:51:18 -07:00
Tom Moor 2735c67ed9 Closes #717 2018-07-10 21:05:45 -07:00
Tom Moor 802496aacb Merge branch 'master' of github.com:outline/outline into signin-link 2018-07-10 21:05:25 -07:00
Tom Moor 2d6f906b83 Account Deletion (#716)
Adds ability to remove user account, wipes personal information and soft-deletes record.
2018-07-10 21:05:01 -07:00
Tom Moor edbf5d754d Merge branch 'master' of github.com:outline/outline into account-delete 2018-07-10 20:51:09 -07:00
Tom Moor 257061011c Remove onCascade as it doesn't work with paranoid 2018-07-10 20:51:06 -07:00
Tom Moor bda4bd6313 Tweak UI 2018-07-10 20:49:58 -07:00
Tom Moor 69677b31e4 Allow more than one user to be deleted 😂 2018-07-10 20:44:59 -07:00
Tom Moor 22d02da2f9 Wiping more information
Ensuring documents and collections created by user still load
2018-07-10 19:47:15 -07:00
Tom Moor 068f199bb0 💚 2018-07-10 18:38:39 -07:00
Tom Moor f15ac0ee2a Merge pull request #718 from satyadeepk/patch-1
`showCollection` option in Dashboard documents list
2018-07-10 08:04:15 -07:00
Satyadeep 34c0e6b24b showCollection option in Dashboard documents list 2018-07-10 12:42:40 +05:30
Tom Moor f0c192cdc0 💚 2018-07-08 13:29:06 -07:00
Tom Moor 5f6236dd65 Merge master 2018-07-08 13:03:36 -07:00
Tom Moor 14f9038419 Merge pull request #714 from outline/remove-password
Remove old code
2018-07-08 15:01:20 -05:00
Tom Moor 2a743dcce6 Merge pull request #715 from outline/issue-draft-save
Fixes initial draft save issue
2018-07-08 15:01:06 -05:00
Tom Moor 8fe7d8e4be Update yarn.lock 2018-07-08 12:42:44 -07:00
Tom Moor 12a63396ab Remove flow type 2018-07-07 18:22:17 -05:00
Tom Moor 4976d53ed8 Remove password field 2018-07-07 18:19:13 -05:00
Tom Moor 08cac861ae Done. Needs testing once back online 2018-07-07 18:09:39 -05:00
Tom Moor dd52f4d82a Delete modal 2018-07-07 17:51:43 -05:00
Tom Moor f9cbd425cb Cleanup unneccessary folders.
Add delete account modal
2018-07-07 17:45:24 -05:00
Tom Moor 465f819c45 Account deletion endpoint 2018-07-07 17:38:22 -05:00
Tom Moor 458d9b5d99 Fixes: Issue saving after draft 2018-07-04 13:00:53 -07:00
Tom Moor a049e0e9bc SlackButton does not need to be connected 2018-07-02 22:37:07 -07:00
Tom Moor 2fd8b35ca9 Fixed: Modified time display on dashboard
New Time component for relative time formatting with accessibility
2018-07-01 19:56:58 -07:00
Tom Moor 933fa9732c CSS tweaks 2018-07-01 12:42:21 -07:00
Tom Moor 73d6238b4c Merge pull request #710 from outline/breadcrumb
Parent Breadcrumb
2018-07-01 12:08:56 -07:00
Tom Moor f41e186da3 👕 2018-07-01 11:57:17 -07:00
Tom Moor 0e940741f6 Mobile styling 2018-07-01 11:54:24 -07:00
Tom Moor dc33cc9734 position sticky 2018-07-01 10:20:57 -07:00
Tom Moor 899b637979 wip 2018-07-01 09:16:38 -07:00
Tom Moor 7780efce0e Update favicon 2018-06-30 19:22:28 -07:00
Tom Moor e50c6488d3 Sidebar styling tweak 2018-06-30 19:19:37 -07:00
Tom Moor 5c7a182897 Added: New document icon / menu to Dashboard screen 2018-06-30 14:01:21 -07:00
Tom Moor c599bb70ca Closes #666 2018-06-30 13:18:18 -07:00
Tom Moor 2f839c75f7 Handle relative urls 2018-06-26 23:43:19 -07:00
Tom Moor 6bd53b72b2 Fixes #707
Improved clickable area around editor content
2018-06-25 22:45:43 -07:00
Tom Moor 657d0775f5 Closes #706 - internal links incorrectly redirecting 2018-06-25 20:45:26 -07:00
Tom Moor 614b08311f Updated FAQ
Improved homepage mobile styling
Minor fixes elsewhere
closes #690
2018-06-24 10:41:49 -07:00
Tom Moor 4ed2b4b475 Adds warning when attempting to leave edit mode with images uploading 2018-06-23 18:58:44 -07:00
Tom Moor d529c98983 Fixes #697 2018-06-23 18:11:17 -07:00
Tom Moor 891c6f1c0a Merge pull request #705 from outline/draft-counter
Added bubble to side of drafts in sidebar with count of pending drafts
2018-06-23 15:40:08 -07:00
Tom Moor 55ddd3137d Added bubble to side of drafts in sidebar with count of pending drafts
Based on feedback that its not clear on initial use
2018-06-23 15:27:16 -07:00
Tom Moor 9de4ed89e1 [ci skip] Added roadmap 2018-06-23 13:52:20 -07:00
Tom Moor 31ba1789f1 Improved document download
Correctly unescapes documents and downloads latest version
2018-06-23 13:35:42 -07:00
Tom Moor 238c6ee653 Upgrade editor, inline code styling 2018-06-23 00:25:17 -07:00
Tom Moor b9f1832578 Closes #671 2018-06-23 00:12:24 -07:00
Tom Moor b8dda3bd65 Update editor, speed up sidebar
closes #694
2018-06-23 00:10:52 -07:00
Tom Moor fa4453a476 Fixes #687
Tidied people list, now displaying joined at date
2018-06-20 22:10:03 -07:00
Tom Moor b9e0668d7d Bulk export (#684)
* First pass (working) collection export to zip

* Add export confirmation screen

* 👕

* Refactor

* Job for team export, move to tmp file, settings UI

* Export all collections job

* 👕

* Add specs

* Clarify UI
2018-06-20 21:33:21 -07:00
Tom Moor cedd31c9ea Upgrade editor, closes #685 2018-06-19 22:30:39 -07:00
Tom Moor 7375e95bf5 Allow manifest discovery 2018-06-16 14:43:34 -07:00
Tom Moor a2c06f5599 👕 2018-06-16 14:37:32 -07:00
Tom Moor 89f75d497c Add manifest.json, required images, remove unused fonts 2018-06-16 14:19:49 -07:00
Tom Moor 42478785fc Bump icons, add theme-color 2018-06-16 14:12:15 -07:00
Tom Moor 87c1d610d1 Add missing alt, add missing lang property 2018-06-16 14:00:24 -07:00
Tom Moor adc78fd408 Closes #679 2018-06-16 13:10:14 -07:00
Tom Moor ae502c10c9 Revoked share links (#664)
* Move to revokation API for share links

* Respect revoked share links
Add documentation for shares endpoints

* 💚
2018-06-16 12:36:25 -07:00
Satyadeep fad5976dd2 Allowed domains env variable for Google Auth (#682)
* Allowed domains env variable for Google Auth

* Fixing lint errors

* PR comments. Use includes instead of indexOf
2018-06-16 12:36:02 -07:00
Tom Moor 19c5cafa51 Restore missing colors 2018-06-10 09:56:08 -07:00
Tom Moor 434129a434 ThemeProvider (#677)
closes #655
2018-06-09 19:10:30 -07:00
Tom Moor 0942deec38 [ci skip] Add styled components badge 2018-06-09 18:59:49 -07:00
Tom Moor aacfd42640 Fixes #676 - Newlines no longer added to nested lists on save 2018-06-09 17:22:03 -07:00
Tom Moor a95b7fc4b6 Emoji work 2018-06-09 17:17:40 -07:00
Tom Moor b929fb2bd3 Fixes TOC 2018-06-07 22:26:53 -07:00
Tom Moor f8cd3bf8c4 Improved offline handling 2018-06-07 21:35:40 -07:00
Tom Moor 21d887151d Fixes #674 - Focus in toolbar no longer lost on autosave 2018-06-07 20:48:43 -07:00
Tom Moor 27f44ae2a0 Merge pull request #672 from outline/duplicate
Duplicate Document
2018-06-05 20:13:46 -07:00
Tom Moor 2d02093f48 Added 'duplicate' menu option
For now duplicates next to original document in the same collection
2018-06-05 06:57:26 -07:00
Tom Moor 45a2c03030 Hint that share link is a two step menu item 2018-06-04 22:01:37 -07:00
Tom Moor 70a8f02564 Add changelog to account menu, make changelog headings anchors 2018-06-04 21:46:24 -07:00
Tom Moor 8c107dfe42 Added toast notifications for share menu 2018-06-04 21:37:08 -07:00
Tom Moor 97c2d8dffc Closes #667 - React warning in development 2018-06-04 21:13:42 -07:00
Tom Moor 22e823df9a Closes #665 - Correctly handle user not granting auth permissions, display friendly error 2018-06-04 21:06:47 -07:00
Tom Moor 53a0f423c3 Track recently active and signin times (#663)
* Track recently active and signin times

* Trust proxy headers in production
2018-06-04 19:07:56 -07:00
Tom Moor 1977278426 Upgrade RME - Allow pasting of Markdown syntax 2018-06-04 17:53:20 -07:00
Tom Moor a5f8d7411e Merge branch 'menu-spacing' 2018-06-04 15:02:48 -07:00
Tom Moor 5b83feefa7 Merge branch 'master' of github.com:outline/outline 2018-06-04 15:02:27 -07:00
Tom Moor 78ea35da29 Mark documents as viewed after a short delay instead of immediately. This should result in more accurate view counts 2018-06-04 15:13:58 -04:00
Tom Moor 874235eb0f User model cleanup 2018-06-04 15:08:29 -04:00
Tom Moor 9d7860feb0 Fixes menu spacing issue 2018-06-04 15:01:20 -04:00
Tom Moor 4469cb7239 Merge pull request #662 from outline/issue-660
Updated parseTitle to remove escape characters
2018-06-03 22:30:48 -04:00
Tom Moor 0adb8814dd 💚 2018-06-03 22:25:40 -04:00
Tom Moor 133aa05bd8 Correct replacement 2018-06-03 22:23:28 -04:00
Tom Moor 6a0a22a636 Updated parseTitle to remove escape characters
Tests pass, however the JS running in the browser appears to be behaving differently. Not got to the bottom of it yet
2018-06-03 22:07:41 -04:00
Tom Moor 1c081f8777 Merge pull request #659 from outline/google-auth
Google Auth
2018-06-03 15:29:02 -04:00
Tom Moor 466033964f Closes #482 2018-06-02 19:00:16 -04:00
Tom Moor 329d23828d Fallback for domain without public logo 2018-06-02 18:43:44 -04:00
Tom Moor 4c9f86c7f7 Save avatars to le cloud in beforeSave hooks
Added encryption to uploads
Updated icon for team settings
2018-06-01 18:00:48 -04:00
Tom Moor a99a804ea0 👕 2018-06-01 15:23:33 -04:00
Tom Moor 2337b9df7f service -> serviceId 2018-06-01 15:13:05 -04:00
Tom Moor b7b5bac5c3 Test team.update endpoint 2018-06-01 15:02:28 -04:00
Tom Moor 140afc8a51 👕 2018-06-01 00:27:18 -04:00
Tom Moor a7fc72e19f 💚 2018-06-01 00:01:06 -04:00
Tom Moor 9315e3f0f0 Members -> People
Update help text throughout settings area
Add details on authentication method
2018-05-31 14:49:19 -07:00
Tom Moor da9477667c user.update endpoint should send full user in response 2018-05-31 12:57:04 -07:00
Tom Moor 0b3feef47a Hide settings items for non admins
Update image uploader for use with team logo
Fix can't cancel cropping modal
2018-05-31 12:52:03 -07:00
Tom Moor 10a0ffe472 Team details settings page 2018-05-31 12:44:32 -07:00
Tom Moor fb7a8f0312 Toast type (success/warning/etc) 2018-05-31 12:07:49 -07:00
Tom Moor f633f63a61 Merge ErrorsStore into UiStore 2018-05-31 11:42:39 -07:00
Tom Moor 55e1451160 Slack commands and post working agagain with new flow 2018-05-29 23:33:30 -07:00
Tom Moor 57aaea60da Fix logout loop 2018-05-29 22:18:11 -07:00
Tom Moor 4a7f8d3895 Move slack auth handling entirely to server 2018-05-28 23:44:56 -07:00
Tom Moor 35f6255dbd Settings -> Profile 2018-05-28 22:58:57 -07:00
Tom Moor aa9ed09f08 Prevent signin without hosted domain 2018-05-28 22:32:36 -07:00
Tom Moor 25aa1f288b Renames, clear token, show signin options based on env 2018-05-28 21:14:43 -07:00
Tom Moor 72d874444e DB migrations
Google button
2018-05-28 20:31:53 -07:00
Tom Moor ddd2b82d20 WIP: Successful Google Auth, broke pretty much everything else in the process 2018-05-28 11:36:37 -07:00
Tom Moor 1ba5c1cf96 Fixes #653 2018-05-26 20:04:57 -07:00
Tom Moor 7e55ca8f39 Fixes #652 - Autosave should not trigger before anything is written 2018-05-26 18:16:07 -07:00
Tom Moor 5bebb7351d 👕 2018-05-26 17:59:34 -07:00
Tom Moor b495dce043 Update editor, fix serialization issues in code 2018-05-26 17:21:28 -07:00
Tom Moor e52d2cb254 Merge pull request #651 from outline/share-links
Public share links
2018-05-26 13:33:38 -07:00
Tom Moor 67e3431fe3 More extensive specs around documents.info endpoint now that it doesn't require auth 2018-05-26 13:29:42 -07:00
Tom Moor 8c62b6e07a Improve error screen for not found share link 2018-05-26 12:22:14 -07:00
Tom Moor 6662e2666d Handle non-existent shareId 2018-05-26 11:23:21 -07:00
Tom Moor 0d7c943bcd Add link to manage shares from modal 2018-05-26 10:38:44 -07:00
Tom Moor de54698408 👕 2018-05-24 23:50:40 -07:00
Tom Moor 511aab5d3a Layout issue 2018-05-24 23:49:46 -07:00
Tom Moor 214f2505a5 API tokens to standard list item 2018-05-24 23:39:17 -07:00
Tom Moor 6df753d962 Team users -> Team members 2018-05-24 23:23:05 -07:00
Tom Moor 54e5037aaf Cleanup user list 2018-05-24 23:07:44 -07:00
Tom Moor e2144051df Fixed returning sensitive data in documents.info 2018-05-24 22:15:36 -07:00
Tom Moor 2c719df32e Close share dialog on copy link 2018-05-24 21:21:45 -07:00
Tom Moor c060a5c798 id -> documentId 2018-05-24 21:19:38 -07:00
Tom Moor e538df0df3 Filter private info from public shares 2018-05-23 23:59:00 -07:00
Tom Moor 7eea1a90af One share link per user, per doc 2018-05-23 23:09:20 -07:00
Tom Moor aeb97ddcae Filter shares.list endpoint by admin 2018-05-23 22:55:01 -07:00
Tom Moor 47fb968009 Ability to revoke, ShareMenu 2018-05-23 22:09:14 -07:00
Tom Moor d93815ca0a Share links list WIP 2018-05-22 23:01:49 -07:00
Tom Moor b40b77b228 Merge branch 'master' into share-links 2018-05-22 21:27:45 -07:00
Tom Moor 05339441e7 Fixes: Minor layout issue in settings sidebar header 2018-05-20 20:21:39 -07:00
Tom Moor 6222d210be Upgrade editor
Prevent markdown in code blocks and headings
Improved handling of valid markdown characters in text
2018-05-20 17:13:12 -07:00
Tom Moor d557ef96ac Fixes #649 – cant delete a draft document that has had its collection previously removed 2018-05-19 15:38:08 -07:00
Tom Moor a4b5d6cabe Fixes #648 2018-05-19 15:12:19 -07:00
Tom Moor bc9d75fcae Updated note on editor source code 2018-05-19 14:34:54 -07:00
Tom Moor d9937b5bd4 Fix squashed image in README on mobile 2018-05-19 14:32:08 -07:00
Tom Moor 187c2dcb27 Working share link loading (plenty of restrictions still to put in place) 2018-05-16 23:52:26 -07:00
Tom Moor 4266020315 Gen and copy share link from frontend 2018-05-16 23:07:33 -07:00
Tom Moor 500d039856 Retrieve documents using shareId 2018-05-13 13:26:06 -07:00
Tom Moor 22bc5a7373 Added delete endpoint 2018-05-13 00:28:31 -07:00
Tom Moor 9000aa3aac First pass at API 2018-05-12 23:14:06 -07:00
Tom Moor dded458582 Setup for unauthenticated doc viewing 2018-05-12 21:01:17 -07:00
Tom Moor 3005da78e2 Pull changelog from Github releases - one less place to manage 2018-05-12 19:56:44 -07:00
Tom Moor 0d32ec452d More prod build fixes 2018-05-12 15:56:05 -07:00
Tom Moor 4dea755db6 Prod uses babel 2018-05-12 15:39:29 -07:00
Tom Moor e6e540cf99 Ensure node versions match everywhere (CI) 2018-05-12 15:24:55 -07:00
Tom Moor cbd4003ddb Split deps, upgrade markdown editor to version with ES5 compilation 2018-05-12 15:22:33 -07:00
Tom Moor 0d28717647 Fixes build by updating Uglify 2018-05-12 14:42:10 -07:00
Tom Moor 24d328c4b7 Merge pull request #639 from outline/refactor-editor
Extract Markdown Editor
2018-05-12 14:21:34 -07:00
Tom Moor a62ad053d7 Upgrade editor 2018-05-12 14:10:49 -07:00
Tom Moor 016bb01948 Tweak header block spacing 2018-05-12 11:09:59 -07:00
Tom Moor a30bdb91f4 Merge pull request #644 from outline/autosave
Autosave Documents
2018-05-12 10:41:52 -07:00
Tom Moor 46c52254c2 Merge pull request #646 from outline/tommoor-patch-1
Restrict engines to < node 10
2018-05-08 23:34:50 -07:00
Tom Moor ee2fc260bf Update package.json 2018-05-08 23:15:56 -07:00
Tom Moor abab370f82 Merge pull request #645 from a--hoang/master
Fix spelling: permanant->permanent
2018-05-08 10:22:08 -07:00
Andrew Hoang 5d413a2679 Fix spelling: permanant->permanent 2018-05-08 13:15:52 -04:00
Tom Moor 94e63b6171 Account for draft being published. Need to reload the collection still in this scenario 2018-05-07 22:53:13 -07:00
Tom Moor ba0a7b7f4a Update docs
Remove extra API request after document.update
Cleanup
2018-05-07 22:08:47 -07:00
Tom Moor 67f2b3cce4 API endpoint accepts autosave 2018-05-06 22:13:52 -07:00
Tom Moor f887a8383b Merge pull request #641 from outline/flow-71
Upgrade to Flow 0.71
2018-05-06 17:06:28 -07:00
Tom Moor a0f21393ee Merge pull request #643 from outline/issue-627
Clarify account dropdown
2018-05-06 17:06:16 -07:00
Tom Moor b41e608909 Merge pull request #642 from outline/sidebar-cleanup
Sidebar cleanup
2018-05-06 14:04:45 -07:00
Tom Moor 3f5a9fdb3a Add icon to clarify menu functionality 2018-05-06 14:01:28 -07:00
Tom Moor b37ed1f8d0 Move logic to Scrollable component 2018-05-06 12:46:52 -07:00
Jori Lallo fbde67d1bd Merge pull request #640 from outline/tommoor-patch-routehelper
Adds _ and ~ as allowed slug characters
2018-05-07 06:40:23 +12:00
Tom Moor c3d7f0785c Restore stickyness of … 2018-05-06 00:06:36 -07:00
Tom Moor b37241229c Remove unworkable menu 2018-05-05 23:49:03 -07:00
Tom Moor 79c9582020 Adding new doc menu to sidebar items 2018-05-05 22:45:10 -07:00
Tom Moor d55a8ad02d Update mailer snapshot (added alt text) 2018-05-05 16:33:12 -07:00
Tom Moor 518015f55b Upgrade to Flow 0.71 2018-05-05 16:16:08 -07:00
Tom Moor 4b5e3aa8f4 Adds _ and ~ as allowed slug characters
closes #636
2018-05-05 14:25:21 -07:00
Tom Moor 4a4f9f7107 Bump rich-markdown-editor 2018-05-03 00:34:28 -07:00
Tom Moor f89eabaeff Hooks 2018-05-02 23:45:14 -07:00
Tom Moor d7327fefa2 Upgrade styled-components
Restore async editor loading
2018-05-02 23:12:13 -07:00
Tom Moor 41a96e4331 Remove Icons 2018-05-02 21:51:39 -07:00
Tom Moor fb41e4fc54 Merge branch 'master' of github.com:outline/outline into refactor-editor 2018-04-28 16:12:26 -07:00
Jori Lallo e176974cfa Merge pull request #635 from outline/jori/homepage-slack
Promo slack on homepage
2018-04-03 23:51:52 -07:00
Jori Lallo 46124654dd Promo slack on homepage 2018-04-03 22:40:20 -07:00
Tom Moor 44cb509ebf Post to Slack (#603)
* Migrations

* WIP: Integration model, slack perms / hooks

* So so rough it pains me. Building this new model is revealing just how much needs to be refactored

* Working connect and post

* Cleanup UI, upating documents

* Show when slack command is connected

* stash

* 💚

* Add documents.update trigger

* Authorization, tidying

* Fixed integration policy

* pick integration presenter keys
2018-04-03 20:36:25 -07:00
Tom Moor f72fa40a0f WIP 2018-04-03 20:20:30 -07:00
Tom Moor 17900c6a11 Merge pull request #633 from outline/improved-headings
Improves rendering of headings
2018-03-26 23:17:44 -07:00
Tom Moor 8793a9dfbf Improves rendering of headings to have better spacing in the Markdown output 2018-03-26 23:12:16 -07:00
Tom Moor 6abc523621 Merge pull request #632 from outline/cache-clear
Bump cache version
2018-03-26 22:24:10 -07:00
Tom Moor c378be0144 Bump cache version 2018-03-26 22:18:53 -07:00
Tom Moor 403e504499 Merge pull request #620 from outline/paragraph-handling
Improved paragraph behavior
2018-03-26 21:23:21 -07:00
Tom Moor 0cb51f63c6 Merge pull request #631 from ganes1410/master
Update README.md
2018-03-26 09:20:18 -07:00
R.Ganesh 616f1e071a Update README.md 2018-03-26 21:24:03 +05:30
Tom Moor bdff3b716b Merge pull request #629 from outline/issue-623
Improves behavior of link toolbar
2018-03-25 16:42:58 -07:00
Tom Moor fc3ffb86de Merge pull request #630 from outline/issue-624
Increase padding at the bottom of the editable area
2018-03-25 16:04:50 -07:00
Tom Moor fcd8f07a2a Increase padding at the bottom of the editable area 2018-03-25 15:56:17 -07:00
Tom Moor a24d745870 Improves behavior of link toolbar based on user feedback 2018-03-25 15:35:59 -07:00
Tom Moor 27ad71b662 Merge pull request #628 from outline/slate-upgrades
Dep updates to Slate 32
2018-03-25 15:35:31 -07:00
Tom Moor f8ba139128 Final dep updates to Slate 32 2018-03-25 14:42:28 -07:00
Tom Moor 38494d6d3c Added migration for existing docs 2018-03-24 15:03:44 -07:00
Tom Moor 14c963ca70 Bump serializer 2018-03-24 14:42:38 -07:00
Tom Moor 48e3a93d83 Bump slate serializer 2018-03-18 01:10:53 -07:00
Tom Moor 5ad0e79a7e Merge pull request #619 from outline/tommoor-patch-1
Improve scrolling behavior
2018-03-10 22:49:34 -08:00
Tom Moor 3a78c4b66e Only show block insert on empty paragraphs 2018-03-10 22:33:13 -08:00
Tom Moor d02fc793ee Improved paragraph behavior 2018-03-10 21:25:07 -08:00
Tom Moor 8a884b446d Improve scrolling behavior
Prevent scrolling in the sidebar/ content area scrolling the other section when the boundary of a scrolling area is reached.

https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior
2018-03-10 11:26:29 -08:00
Jori Lallo c7d50c4a78 Merge pull request #614 from outline/jori/billing-suspended
Suspended accounts and settings changes
2018-03-07 00:11:17 -08:00
Jori Lallo 983b8fe9a0 Wrapped additional error data under data 2018-03-07 00:05:34 -08:00
Jori Lallo f5c1ddf8b9 added suspending admin email to error screen 2018-03-06 23:38:52 -08:00
Jori Lallo e9e4538436 Addressed feedback 2018-03-06 23:09:21 -08:00
Tom Moor 61dfd75ba3 Merge pull request #618 from outline/slate-edit-code
Upgrade slate-edit-code
2018-03-06 21:18:50 -08:00
Tom Moor b9dda35566 Bump slate-edit-code dependency 2018-03-06 21:00:44 -08:00
Tom Moor 209a1e8d35 Merge pull request #617 from outline/remove-moment
Remove moment.js
2018-03-06 20:39:56 -08:00
Tom Moor 16a6c3bffe Remove moment 2018-03-06 20:31:12 -08:00
Jori Lallo 247dbce9b0 Merge pull request #615 from outline/jori/notification-emails
Email template updates
2018-03-06 20:07:52 -08:00
Jori Lallo 0b005afdf9 More email styles 2018-03-06 19:34:13 -08:00
Jori Lallo 189c592a44 Tweaked email layout 2018-03-04 23:18:39 -08:00
Jori Lallo 2f972668f4 Tweaked label style 2018-03-04 22:45:55 -08:00
Jori Lallo 8e4978c638 Cleanup 2018-03-04 22:38:14 -08:00
Jori Lallo 71270bcb93 Members -> Users 2018-03-04 22:34:06 -08:00
Jori Lallo 7ef3110a6d Renamed ApiKeys store 2018-03-04 22:26:02 -08:00
Jori Lallo 1a8ca20fce UI to prevent suspended users viewing the application 2018-03-04 22:18:23 -08:00
Jori Lallo 1c2b3e992e Prevent API access from suspended user 2018-03-04 17:08:18 -08:00
Jori Lallo a0f58583b5 UI work 2018-03-04 16:53:57 -08:00
Jori Lallo 06a6573feb Initial work on the frontend 2018-03-04 15:39:17 -08:00
Jori Lallo 3d6b9466fb Backend support 2018-03-04 15:38:51 -08:00
Tom Moor 7272b24eaf Merge pull request #610 from outline/jori/natural-sort
Added natural sorting for documents and collections
2018-02-28 23:28:47 -08:00
Tom Moor 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
Tom Moor 1722b3f3d9 Merge pull request #611 from outline/issue-drafts
Drafts Fixes
2018-02-28 23:27:56 -08:00
Tom Moor c80ae1bdd6 Fixes: Document not added to structure
Cache key bump
2018-02-28 23:21:29 -08:00
Jori Lallo 3505ed3ad0 Removed quite useless store test 2018-02-28 23:21:17 -08:00
Jori Lallo 4bc8a152c1 Added natural sorting for documents and collections 2018-02-28 23:00:41 -08:00
Tom Moor 871e6918e8 v0.2.0 2018-02-27 23:59:54 -08:00
Tom Moor 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
Tom Moor 79a0272230 Merge pull request #607 from outline/menu-improves
Menu Improvements
2018-02-25 18:39:39 -08:00
Jori Lallo 11e674f387 Merge pull request #606 from outline/validation-improves
Validation Improvements
2018-02-25 16:40:19 -08:00
Tom Moor 752f7c6e2f Remove left property. 2018-02-24 21:47:36 -08:00
Tom Moor 2e37bb2c22 menu-improves 2018-02-24 21:21:05 -08:00
Tom Moor f8bdadfd9a Final direct BadRequest removals 2018-02-24 20:52:56 -08:00
Tom Moor f3c7fb8bc6 Fixes #593 2018-02-24 20:44:13 -08:00
Jori Lallo fb19075d0e Merge pull request #602 from outline/authorization-improves
Authorization Improvements
2018-02-20 22:30:41 -08:00
Tom Moor 5b6c908215 More granular error responses 2018-02-19 23:31:18 -08:00
Tom Moor 9c2f85c296 Merge pull request #601 from outline/slate-32-compat
Slate 32 compatibility
2018-02-19 19:03:12 -08:00
Tom Moor 051acfd36d Merge pull request #604 from outline/add-code-of-conduct-1
Create CODE_OF_CONDUCT.md
2018-02-18 19:23:12 -08:00
Tom Moor 1d8e994850 Create CODE_OF_CONDUCT.md 2018-02-18 19:18:44 -08:00
Tom Moor d73196594d Correct ApiKey delete auth check 2018-02-18 13:10:17 -08:00
Tom Moor 7a0aa0ecf8 Add additional future-proofing auth checks for creation 2018-02-18 11:08:43 -08:00
Tom Moor e3e084130c Add missing snap 2018-02-18 10:58:54 -08:00
Tom Moor 83f32be6f7 Add missing authorization on views endpoints
Updated ApiKeys authorization to match elsewhere
2018-02-18 10:56:56 -08:00
Tom Moor 3ea5573813 Merge pull request #600 from outline/jori/fix-590
Handle Safari paranoid mode
2018-02-18 10:20:47 -08:00
Tom Moor e84fb5e6ba Update team and collection authorization 2018-02-18 01:14:51 -08:00
Tom Moor 2f81eb5e87 Added more structure and tests to our authorization code 2018-02-18 00:11:48 -08:00
Tom Moor 925f1b8799 Updates mode dependencies for Slate 32 compatability
(remove deprecation warnings)
2018-02-17 17:02:19 -08:00
Jori Lallo 8bfecaeb96 Fix #590 2018-02-13 23:30:56 -08:00
Jori Lallo b53749c95c Merge pull request #599 from outline/jori/document-move-fix
Fixed document move
2018-02-13 22:19:10 -08:00
Jori Lallo 143f8b508d Fixed document move 2018-02-13 22:09:27 -08:00
Jori Lallo 82bf9ba039 Merge pull request #597 from outline/slate-32
Upgrade to Slate 32
2018-02-13 21:31:41 -08:00
Tom Moor e8b10176eb Upgrade to Slate 32
closes #588
2018-02-13 21:03:38 -08:00
Tom Moor 3788b87150 Merge pull request #595 from outline/issue-logout-loop
Fix logout redirect loop
2018-02-13 09:11:06 -08:00
Tom Moor ea471b2a19 In my testing this fixes the redirect loop on logout 2018-02-12 22:44:43 -08:00
Tom Moor 94fd58032e Merge pull request #594 from outline/tommoor-patch-1
Update Analytics.js
2018-02-12 22:30:42 -08:00
Tom Moor 1e0bc67298 Merge pull request #593 from outline/issue-592
Remove delete restriction
2018-02-12 22:16:16 -08:00
Tom Moor 8208157b99 Update Analytics.js 2018-02-12 21:57:46 -08:00
Tom Moor f211cb1fbf Remove bad delete restriction 2018-02-12 20:02:27 -08:00
Jori Lallo 8ebf748cf6 Merge pull request #585 from outline/jori/koa-onerror
Catch server errors with koa-onerror
2018-02-11 11:19:08 -08:00
Tom Moor f3318b9b2e Merge pull request #587 from outline/fix-static-page-tracking
Restore static pageview tracking
2018-02-11 10:54:29 -08:00
Tom Moor 4d97e1aa2a Accidentally removed tracking from static pages by moving the pageview call into the SPA 2018-02-11 10:40:28 -08:00
Tom Moor e4459691cd Merge pull request #586 from outline/fix-webpack-autotrack
Fix autotrack not building correctly in prod
2018-02-10 23:59:35 -08:00
Tom Moor 378bfaeafe Fix autotrack not building correctly in prod 2018-02-10 23:54:54 -08:00
Tom Moor 6caba86751 Mobile Responsive Styles (#580)
* WIP: Responsive styles

* Flip breakpoints, ensure doc doesn't spread

* Add MenuIcon

* Refactor Sidebar to share mobile responsive styles

* Fix accidental find/replace

* Tweak padding to take into account icon spacing
2018-02-10 23:24:12 -08:00
Tom Moor 4cc7338534 Analytics (#582)
* gtm > ga

* Record pageviews in SPA

* Remove home-rolled tracking in favor of autotrack

* cleanup
2018-02-10 23:23:50 -08:00
Tom Moor bd84a73b20 Merge pull request #583 from outline/bots
Added Probot Config
2018-02-10 23:05:24 -08:00
Jori Lallo 81f95b198d Up Node version 2018-02-10 23:03:13 -08:00
Jori Lallo 5758c0d6ba Catch server errors with koa-onerror 2018-02-10 22:58:22 -08:00
Jori Lallo d87c33e50b Merge pull request #572 from outline/jori/alphabetical-documents
Order document structure alphabetically
2018-02-10 22:05:58 -08:00
Tom Moor 90eeeb4cc3 Added welcome bot too :) 2018-02-10 16:38:42 -08:00
Tom Moor f4cab58aee Added probot's config 2018-02-10 16:31:30 -08:00
Tom Moor f64f7a0f8e Merge pull request #578 from outline/issue-571
Fixes: Possible to create blocks inside document title
2018-02-10 14:13:33 -08:00
Tom Moor 78410268cc Merge pull request #579 from outline/upgrade-slate
Upgrade Slate
2018-02-07 23:34:06 -08:00
Tom Moor 2f06db0b87 Upgrade Slate 3 point releases, fixes a number of the editor JS issues we've seen 2018-02-07 23:19:41 -08:00
Tom Moor b0db7f29d3 Fixes: Possible to create blocks inside document title 2018-02-07 22:29:33 -08:00
Jori Lallo 872ca56d99 Merge pull request #577 from outline/revert-573-jori/rename-atlasid
Revert "Renamed Document#atlasId finally"
2018-02-07 11:36:36 -08:00
Jori Lallo c92697a8a8 Revert "Renamed Document#atlasId finally" 2018-02-07 11:32:18 -08:00
Jori Lallo 1e05189bc9 Merge pull request #573 from outline/jori/rename-atlasid
Renamed Document#atlasId finally
2018-02-07 09:56:07 -08:00
Jori Lallo f08b3e0ac5 Renamed Document#atlasId finally 2018-02-07 00:04:39 -08:00
Jori Lallo b47771c56f Order document structure alphabetically 2018-02-06 23:26:14 -08:00
Jori Lallo 3b785dcd59 Merge pull request #570 from outline/jori/fix-toc
Fix TOC
2018-02-06 22:53:47 -08:00
Jori Lallo abcab12b97 Fix TOC 2018-02-06 22:40:13 -08:00
Jori Lallo 5588897271 Merge pull request #564 from outline/jori/route-fixes
Search and routing fixes
2018-02-06 21:56:24 -08:00
Jori Lallo 9fad61c4b4 Fix code overflow. Fixes #563 (#565) 2018-02-04 23:43:57 -08:00
Jori Lallo b93ccf5fcc Check for parent document existance (#567) 2018-02-04 23:43:43 -08:00
Tom Moor ff286b2eb5 Update favicon (#556) 2018-02-04 22:51:33 -08:00
Jori Lallo 8f53755258 Filter headers (#566) 2018-02-04 22:32:13 -08:00
Jori Lallo bfb5e8e6b6 Exhaustive types 2018-02-04 17:31:12 -08:00
Jori Lallo a941e04d08 Removed useless catch 2018-02-04 17:28:14 -08:00
Jori Lallo 2b81cea277 Search fixes 2018-02-04 17:27:57 -08:00
Tom Moor 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
Tom Moor f076582ce4 Fixes code blocks (#554)
* Fixes code blocks

* Flow ignore uncompiled files

* 💚

* big > bug
2018-02-04 12:30:22 -08:00
Tom Moor ba602861af Merge pull request #551 from outline/tommoor-patch-1
Update CHANGELOG
2018-01-31 20:41:45 -08:00
Tom Moor ae4aed6fe0 Move title validation to server (#552)
closes issue-546
2018-01-31 19:23:33 -08:00
Tom Moor 53c2e62d7c Update CHANGELOG.md 2018-01-31 00:00:49 -08:00
Tom Moor c24ef20a24 Merge pull request #549 from lex111/empty-collection-actions
Add actions for empty collections
2018-01-30 23:47:31 -08:00
Tom Moor a7e4710315 Merge branch 'master' into empty-collection-actions 2018-01-30 23:39:43 -08:00
Tom Moor b1ef4ef7b9 Merge pull request #541 from outline/issue-537
Fixes Collection ... menu not working
2018-01-30 22:56:35 -08:00
Tom Moor 48793a4cef callback > promise 2018-01-30 22:49:48 -08:00
Tom Moor 0cb20657e5 Merge pull request #544 from outline/issue-startblock
Fix JS error where selection has no startBlock
2018-01-30 22:18:04 -08:00
Tom Moor 7da3e1db7f Merge pull request #548 from lex111/patch-1
Fixed database urls in .env.sample file
2018-01-30 22:17:42 -08:00
Tom Moor 637aaf9702 Merge pull request #545 from outline/list-styling
Fixes: LI spacing in documents got accidentally increased
2018-01-30 22:13:03 -08:00
Alexey Pyltsyn c559b52c0a Add actions for empty collections 2018-01-31 00:16:20 +03:00
Alexey Pyltsyn 4832bfe692 Fixed database urls in .env.sample file 2018-01-30 23:55:28 +03:00
Tom Moor 66c091cfbb Closes #538
Seems simple and obvious because it is, we should check that startBlock exists before using it
2018-01-30 08:24:49 -08:00
Jori Lallo dd9d3351b8 Added social links (#535) 2018-01-29 23:41:43 -08:00
Tom Moor 85a27593e8 Fix sidebar spacing, this needs a crazy refactor soon 2018-01-29 23:09:53 -08:00
Tom Moor 29aba6bfe6 Restores file import on sidebar menu 2018-01-29 23:04:45 -08:00
Tom Moor ba72ecb0e3 issue-537 2018-01-29 22:31:49 -08:00
Tom Moor 7be5b5fa0d Merge pull request #539 from outline/tommoor-patch-1
Ensure Document remount on nav
2018-01-29 10:37:08 -08:00
Tom Moor e54e4b0d22 Update Document.js 2018-01-29 10:32:28 -08:00
Tom Moor cadf937f07 Merge pull request #534 from outline/slack-hook-improves
Slack hooks fixes and improvements
2018-01-28 19:47:39 -08:00
Tom Moor f870cd88bc Slack hooks fixes and improvements
closes #533
2018-01-28 19:37:14 -08:00
Jori Lallo 97268314fe Map keyboard shortcuts on windows (#526)
* Map keyboard shortcuts on windows

* Fixed also saving commands

* Fix keyboard shortcut for keyboard shortcuts

* Fixed guide

* Cmd -> Mod
2018-01-28 17:57:45 -08:00
Jori Lallo 2b2bc376ce Merge pull request #532 from outline/jori/collection-delete-fixes
Fixed collection deletion
2018-01-28 17:54:53 -08:00
Tom Moor 3d32bf88d3 Merge pull request #531 from outline/slack-hook-improves
Fixes 400 error response from slack hook
2018-01-28 17:51:06 -08:00
Jori Lallo 5ab423108a Fixed collection deletion 2018-01-28 17:04:53 -08:00
Tom Moor 54f1df304d Merge pull request #529 from outline/remove-error-boundary
Remove Document error boundary
2018-01-28 17:02:52 -08:00
Tom Moor 66fa88fcab Fixes 400 error response from slack hook
Split results into individual attachments
2018-01-28 17:00:20 -08:00
Tom Moor de6778fc42 Fixes: LI spacing in documents got accidentally increased 2018-01-28 16:27:19 -08:00
Tom Moor d65f7577d4 remove-error-boundary 2018-01-28 16:04:59 -08:00
Tom Moor 7bdf8d3a83 Merge pull request #528 from outline/dep-updates
Updates editor dependencies
2018-01-28 16:01:34 -08:00
Tom Moor 6e5fcbd96b Updates a couple of editor dependencies that were lagging
Move webpack manifest plugin to prod dep (failing builds)
2018-01-28 11:08:50 -08:00
Tom Moor 311a7b1a87 Merge pull request #527 from outline/stable-headings
Stable heading IDs
2018-01-28 10:02:27 -08:00
Tom Moor edcb92d223 Updated to only add numbering to slugified heading anchors when absolutely neccessary 2018-01-27 11:45:46 -08:00
Tom Moor 7647d23804 Stable heading ids 2018-01-27 00:47:48 -08:00
Jori Lallo 8cdc09339b Merge pull request #519 from outline/jori/prefetch
Added link=“prefetch” tags
2018-01-26 11:21:34 -08:00
Jori Lallo 2b861ea3d5 Merge pull request #523 from outline/jori/slack-tweaks
Slack tweaks
2018-01-24 23:24:31 -08:00
Jori Lallo df8057b82b Merge pull request #524 from outline/jori/link-toolbar
LinkToolbar changes
2018-01-24 23:24:14 -08:00
Jori Lallo 780626872b Merge pull request #522 from outline/jori/members-fixes
Fixes to members
2018-01-24 23:17:34 -08:00
Jori Lallo 891bac6d1d Autofocus on new link 2018-01-24 23:16:13 -08:00
Jori Lallo 395c022178 LinkToolbar changes 2018-01-24 00:00:58 -08:00
Jori Lallo 77a53718a3 Merge branch 'master' into jori/slack-tweaks 2018-01-23 23:02:51 -08:00
Jori Lallo 47ce9f816f a note about slack slash command 2018-01-23 23:01:57 -08:00
Jori Lallo 1dd06db566 Slack tag 2018-01-23 23:01:32 -08:00
Jori Lallo 0f790b37e3 moved to fs read 2018-01-23 22:38:18 -08:00
Jori Lallo 598477fedb Merge pull request #520 from outline/jori/about-page
About page
2018-01-23 22:37:39 -08:00
Tom Moor 78e1cebecf Merge pull request #521 from outline/tom/about-page
About page
2018-01-23 22:08:12 -08:00
Tom Moor 51409bcbc7 Update About.js 2018-01-23 22:00:19 -08:00
Jori Lallo 26948ad71a Circle env 2018-01-23 21:55:01 -08:00
Jori Lallo 11fe2d7015 Merge pull request #515 from outline/jori/metatags
Added more metatags + screenshot
2018-01-23 21:49:20 -08:00
Jori Lallo c746564ec0 Fixes to members 2018-01-23 21:48:15 -08:00
Tom Moor a4323f1ea1 Edits, grammar, correct apostrophe 2018-01-22 20:51:25 -08:00
Jori Lallo b99ed0cee3 Added about page 2018-01-21 23:59:19 -08:00
Jori Lallo bc403faa8e Added link=“prefetch” tags 2018-01-21 22:25:37 -08:00
Jori Lallo 69af7f4efe disallow robots index for self hosted deployments 2018-01-21 18:47:43 -08:00
Jori Lallo 1b5513be0c Use URL env 2018-01-21 18:47:13 -08:00
Jori Lallo 2cef493331 Default deployment should be self 2018-01-21 18:46:55 -08:00
Jori Lallo 2a716f55a9 Merge pull request #514 from outline/jori/team-admin-frontend
Team members frontend
2018-01-21 16:27:01 -08:00
Jori Lallo 46791109e3 Added user icon 2018-01-21 16:17:21 -08:00
Jori Lallo 1eb6d14298 Added more metatarsi + screenshot 2018-01-18 00:01:34 -08:00
Jori Lallo fa1b6f9b4f Merge pull request #452 from outline/jori/basic-onboarding
Improved onboarding
2018-01-17 22:52:46 -08:00
Jori Lallo eb1ba1a6be changed copy 2018-01-17 22:18:55 -08:00
Jori Lallo a6584714c3 New onboarding document 2018-01-17 22:18:55 -08:00
Jori Lallo 0121f22eed Removed unused code 2018-01-17 20:52:27 -08:00
Jori Lallo bbd1600539 Settings members UI 2018-01-17 20:49:43 -08:00
Jori Lallo d206ba0173 Merge pull request #512 from outline/tommoor-patch-1
Fixed: Loading placeholders all the same width
2018-01-15 17:36:52 -08:00
Tom Moor 3d93ce3881 Fixed: Loading placeholders all the same width 2018-01-15 14:49:32 -08:00
Jori Lallo 5460e06ffe added members view 2018-01-15 14:23:20 -08:00
Jori Lallo 44ddf6de95 Merge pull request #511 from outline/jori/fix-unfurl
Fix Slack unfurling
2018-01-15 14:13:46 -08:00
Jori Lallo bcbca3cf41 Added a simple test for unfurl enpoint 2018-01-15 14:07:29 -08:00
Jori Lallo 4c9bff478a Revert auth changes 2018-01-15 14:07:12 -08:00
Jori Lallo 1586c5c208 Merge pull request #507 from outline/jori/webpack-upgrade
Webpack 3 + dynamic Editor loading
2018-01-15 13:28:25 -08:00
Jori Lallo 0bd3c69a90 Fixed boundless webpack config 2018-01-15 13:23:45 -08:00
Tom Moor 9d441fc51a Webhook / Integration Event bus (#499)
* First bash at an event bus for webhooks and integrations

* Refactoring

* poc

* Revert too wide ranging changes
Move to two-queues
2018-01-13 10:46:29 -08:00
Tom Moor 33261ba7c7 Merge pull request #508 from outline/issue-464
Improved handling of malformed urls.
2018-01-07 09:42:42 -08:00
Tom Moor 2b71b03a96 Merge pull request #509 from outline/tommoor-patch-4
Update CHANGELOG.md
2018-01-06 16:45:22 -08:00
Tom Moor 7af062a98e Update CHANGELOG.md 2018-01-06 16:39:30 -08:00
Tom Moor 14fdebb4e5 Closes #464 2018-01-06 16:10:05 -08:00
Jori Lallo fe00e1f76d more boundless builds 2018-01-03 21:41:04 -08:00
Jori Lallo f9c24574da lint 2018-01-03 21:39:32 -08:00
Jori Lallo 2e609d7f4f derp 2018-01-03 21:38:02 -08:00
Jori Lallo 2c9e92e5b9 Fixes 2018-01-03 21:35:13 -08:00
Jori Lallo 2fd5fc2dff Dynamic loading for Editor 2018-01-03 20:08:43 -08:00
Jori Lallo c504bfdc83 Webpack stats 2018-01-03 17:35:51 -08:00
Jori Lallo 7a7f8f7c53 Moved config files to a separate folder 2018-01-03 16:58:34 -08:00
Jori Lallo 686c237e36 Moved to webpack 3 2018-01-03 16:29:01 -08:00
Jori Lallo 26bd61df1b Merge pull request #506 from outline/jori/readme-3
Update README.md
2018-01-03 13:39:41 -08:00
Jori Lallo 721958b7dc Merge pull request #505 from outline/jori/toolbar-select
Toolbar select tweaks
2018-01-01 16:17:12 -08:00
Jori Lallo a8865e5ce9 Update README.md 2018-01-01 12:26:04 -08:00
Jori Lallo 04e146993b Update README.md 2018-01-01 12:23:03 -08:00
Jori Lallo ceb36ef8c6 Update README.md 2018-01-01 12:19:09 -08:00
Jori Lallo 588afbc8b4 Merge pull request #502 from outline/jori/readme-additions
README: Updated text and added a section on testing
2018-01-01 12:10:06 -08:00
Jori Lallo 8d3a3f50d4 Merge pull request #504 from outline/jori/block-quotes
Added support for block quotes
2018-01-01 12:09:39 -08:00
Jori Lallo 1e38e70987 Delay toolbar visibility a bit 2018-01-01 11:58:35 -08:00
Jori Lallo 4d8df6e951 Only show inline toolbar on mouseup if pointer selected 2018-01-01 11:58:23 -08:00
Jori Lallo 8bd640676f Added block quote icon 2018-01-01 11:25:07 -08:00
Jori Lallo 330f0eb41d Added support for block quotes 2017-12-30 13:46:21 -08:00
Jori Lallo 1502f59a43 Merge pull request #496 from outline/jori/team-admin
Backend support for team admins
2017-12-30 22:55:52 +02:00
Jori Lallo 421cafecbf Updated text and added a section on testing 2017-12-30 20:07:38 +02:00
Jori Lallo 94dfebe5a0 Addressed PR feedback 2017-12-30 19:48:43 +02:00
Jori Lallo 2440788372 Merge pull request #497 from outline/jori/public-readme
Improved README
2017-12-30 19:31:54 +02:00
Jori Lallo 71cb7aa9b5 Reworded README based on feedback 2017-12-30 19:25:48 +02:00
Tom Moor f23f591176 Merge pull request #498 from outline/zacharyfmarion-zac/issue-493
Seamless new doc save
2017-12-28 12:57:46 +00:00
Tom Moor 3b303aefc4 Flow 2017-12-28 12:49:39 +00:00
Tom Moor 2d70618f01 Tweaks for seamless save of new doc 2017-12-28 12:35:59 +00:00
Jori Lallo 3ae875c935 Improved README 2017-12-27 14:23:41 +02:00
Jori Lallo 8f045b5c34 Updated snap 2017-12-27 12:59:27 +02:00
Jori Lallo 80c8912c10 Nicer formatting 2017-12-26 15:14:28 +02:00
Jori Lallo 7e44edad42 Added API docs 2017-12-26 15:12:10 +02:00
Jori Lallo 26d0d815a2 Admin endpoints 2017-12-26 15:08:11 +02:00
Jori Lallo a74e90fc09 Move auth to router.use 2017-12-26 15:08:10 +02:00
Jori Lallo 4406ec8e15 Added adminOnly auth option and auth middleware tests 2017-12-26 15:07:27 +02:00
Jori Lallo c4d1490d01 Added migration for adding initial admins 2017-12-26 15:06:53 +02:00
Jori Lallo 0fd30a7313 Merge pull request #491 from outline/jori/email-queue
Added task queue for emails
2017-12-25 05:38:40 -08:00
Tom Moor 4823673981 Merge pull request #492 from outline/issue-480
Fixes exception visiting doc unauthenticated
2017-12-23 14:53:28 -05:00
Zachary Marion 721374e08d meta+s now redirects to document edit page 2017-12-20 13:45:15 -05:00
Zachary Marion db41d779bf Don't redirect on new document save 2017-12-20 00:20:27 -05:00
Tom Moor 922fd2497c Fixes #480 2017-12-18 22:55:14 -08:00
Jori Lallo 1cb00079da Added task queue for emails 2017-12-18 20:55:41 -08:00
Tom Moor 32ba98bb1a Unfurling of Slack links (#487)
* First pass: Unfurling of Slack links

* Add authentication in db

* Call associate on Event correctly

* Add SLACK_APP_ID, remove SLACK_REDIRECT_URI, tidy env sample

* PR feedback

* Comment clarify
2017-12-18 19:59:29 -08:00
Tom Moor 938bb3fc31 Merge pull request #490 from outline/fix-bullets
Closes #489
2017-12-18 08:00:52 -08:00
Tom Moor 4f23dac472 Closes #489 2017-12-18 07:55:15 -08:00
Jori Lallo 0b45f87421 Merge pull request #486 from outline/jori/privacy
Added privacy policy
2017-12-17 17:51:55 -08:00
Jori Lallo 787fb63f09 Added privacy policy 2017-12-17 17:14:16 -08:00
Jori Lallo c52e4abce0 Merge pull request #485 from outline/jori/user-settings
User settings
2017-12-17 16:36:53 -08:00
Jori Lallo 8b22615953 Rename updated 2017-12-17 16:27:23 -08:00
Tom Moor 8f3c82fe57 Remove Flow suppression 2017-12-17 14:14:49 -08:00
Tom Moor 62c014a8e9 👕 2017-12-17 14:09:17 -08:00
Jori Lallo 7fc1af1b74 added s3 envvars to circle 2017-12-14 22:56:35 -08:00
Jori Lallo 308d36c528 Fixes s3 path 2017-12-13 23:32:45 -08:00
Jori Lallo 7d756e4fae Avatar upload 2017-12-13 23:23:22 -08:00
Jori Lallo c2879c51b2 started working on avatar upload 2017-12-13 23:20:04 -08:00
Jori Lallo cd1d2430bb Added a setting to update user’s profile 2017-12-13 23:19:26 -08:00
Tom Moor e880c9295e Merge pull request #258 from outline/update-slate
Update Slate
2017-12-11 22:47:17 -08:00
Tom Moor b70cf29aae Fixed: Another spurious save prompt 2017-12-11 22:37:38 -08:00
Jori Lallo c8a569ee10 Merge pull request #479 from outline/jori/lock-collection
Lock collection navigation tree changes
2017-12-11 21:56:06 -08:00
Tom Moor 5900fa1fbb Fixes #475 - serializer now ensures paragraph node in list items 2017-12-11 21:50:53 -08:00
Tom Moor 1f6ae1e027 Merge branch 'master' into update-slate 2017-12-11 21:23:46 -08:00
Tom Moor 5c9c788d5d Fix first run with Docker 2017-12-11 21:16:37 -08:00
Tom Moor b8751281de Merge pull request #481 from outline/docker-development
Docker Development
2017-12-11 20:37:03 -08:00
Tom Moor ced80b6723 FakeS3 support 2017-12-10 22:58:52 -08:00
Tom Moor ec86b9fe8c Update sample .env
Update README to reflect new process
2017-12-10 17:38:56 -08:00
Tom Moor c53e50299d Merge branch 'saso/docker-development' of https://github.com/sasso/outline into sasso-saso/docker-development 2017-12-10 16:12:31 -08:00
Tom Moor 7e845242de Fix: Esc to close link toolbar
Error when selection changes to not include link
2017-12-10 15:54:54 -08:00
Tom Moor d18bce8a20 Refactoring and improved error handling around Link Toolbar 2017-12-10 15:39:02 -08:00
Jori Lallo c5e2bb2432 Lock collection navigation tree changes 2017-12-09 15:04:55 -08:00
Tom Moor bbb9fc328a Update Slate to 0.31.5 2017-12-08 21:51:20 -08:00
Tom Moor 13b1ab7dca Merge branch 'master' of github.com:jorilallo/atlas into update-slate 2017-12-08 20:22:07 -08:00
Tom Moor 1832bc74ad Merge pull request #478 from outline/jori/sidebar-fixes
Sidebar fixes and warnings
2017-12-08 20:21:32 -08:00
Tom Moor 466986eabb Remove logging 2017-12-08 20:08:47 -08:00
Tom Moor d7d13179d6 Remove slate-plain-serializer dependency 2017-12-08 19:13:35 -08:00
Tom Moor 7b9fa9f4a7 Fixed: Spurious save prompts 2017-12-06 08:40:43 -08:00
Tom Moor 64c2624479 Fixes: Image upload. Back to using our own plugin to show progress 2017-12-06 08:15:06 -08:00
Tom Moor 30b2b91bbc Fixed: Creating checklists from block toolbar 2017-12-06 07:53:54 -08:00
Tom Moor b794a0cc70 Cleaner API for BlockToolbar cursor positioning 2017-12-05 23:41:01 -08:00
Tom Moor 5c38ff9e63 Fixes: Allow BlockInsert on final block (previously didnt work in Prod) 2017-12-05 23:25:09 -08:00
Tom Moor e64ca3ca43 Cleanup 2017-12-05 22:29:07 -08:00
Jori Lallo c9fc437888 Fixes 2017-12-05 21:09:15 -08:00
Tom Moor e3f664e8a4 Fixed: Checklist items cant be created from shortcuts
Fixed: BlockToolbar not close on unfocus
2017-12-05 20:05:43 -08:00
Saso Matejina 61c32ee175 support local development with docker 2017-12-05 10:42:52 -08:00
Jori Lallo 866c43b2cb Fixed React warnings 2017-12-05 01:22:22 -08:00
Jori Lallo 5a0f3d027a Remove sidebar scrolling
Fixes #473
2017-12-05 00:16:05 -08:00
Jori Lallo 553095692c Clear active collection if navigating out of it directly
Fixes #474
2017-12-05 00:15:34 -08:00
Jori Lallo 7af2ff20a8 Merge pull request #471 from outline/jori/document-error-boundary
More detailed error boundary for Document
2017-12-03 21:03:47 -08:00
Jori Lallo abcd737854 Merge pull request #470 from outline/jori/search-improvements
Search improvements
2017-12-03 20:57:18 -08:00
Jori Lallo 564748cfc0 Use key instead 2017-12-03 20:56:45 -08:00
Tom Moor 751b468e92 More and more fixes 2017-12-03 19:59:54 -08:00
Jori Lallo 98124a1c4b linting 2017-12-03 19:48:50 -08:00
Jori Lallo 42d5686182 linting 2017-12-03 19:29:04 -08:00
Jori Lallo f3e3e6d2ca props 2017-12-03 19:21:58 -08:00
Jori Lallo 060066ceee More detailed error boundary for Document 2017-12-03 19:18:22 -08:00
Jori Lallo 5df2983ef6 Search improvements 2017-12-03 16:50:50 -08:00
Jori Lallo 4283f48f00 Merge pull request #469 from outline/jori/search-order
Fixed search ordering
2017-12-03 12:24:07 -08:00
Tom Moor 802f6e6594 Flowtyping 2017-12-03 11:13:35 -08:00
Jori Lallo 36b8e49353 Fixed search ordering 2017-12-03 11:04:17 -08:00
Jori Lallo cd2cbf1c15 Merge pull request #462 from outline/jori/print
Added ability to print a document
2017-12-02 23:36:21 -08:00
Tom Moor 15e8e50601 Slate 30 2017-12-02 23:14:27 -08:00
Jori Lallo c13451186a Hiding toolbars for printing 2017-12-02 22:50:24 -08:00
Jori Lallo 317d85290e Merge pull request #463 from outline/jori/fix-collection-styles
Fixed sidebar styles when on collection home
2017-12-02 22:46:45 -08:00
Jori Lallo b42f123b1a Fixed sidebar styles when open collection 2017-12-02 18:04:34 -08:00
Jori Lallo 81d0072449 Added media print style to dropdowns 2017-12-02 17:44:45 -08:00
Jori Lallo 224f94a79e Added ability to print a document 2017-12-02 16:27:45 -08:00
Tom Moor 5da809c4ab Merge pull request #460 from anchepiece/onboarding
Address failing startup without .env #459
2017-12-02 11:16:13 -08:00
anchepiece a4b10912a4 Address failing startup without .env #459 2017-12-01 16:40:17 -05:00
Tom Moor 8ccd60996d Merge pull request #456 from outline/changelog
Add Changelog
2017-11-29 09:53:44 -08:00
Jori Lallo 883e584da2 Merge pull request #454 from outline/issue-448
Request auth on first load with existing token
2017-11-28 23:00:00 -08:00
Tom Moor 21c1c1797e Add changelog 2017-11-28 22:46:26 -08:00
Tom Moor 9f3e739952 Merge pull request #453 from outline/jori/feedback
Added feedback link
2017-11-28 20:31:42 -08:00
Tom Moor 756cc5d3ff Merge pull request #455 from outline/issue-collection-id
Fixes: Issue with missing collection id
2017-11-28 20:30:59 -08:00
Tom Moor 37ed61d9c8 Fixes: Issue with missing collection id 2017-11-28 08:55:15 -08:00
Tom Moor a573c76512 Request auth on first load with existing token 2017-11-26 22:26:02 -08:00
Jori Lallo 0af46a0d46 Added feedback link 2017-11-26 22:03:23 -08:00
Jori Lallo 88020fc569 Merge pull request #451 from outline/jori/sunday-tweaks
Sunday tweaks
2017-11-26 21:14:18 -08:00
Jori Lallo a0f3332b9f removed ToC in readonly mode 2017-11-26 20:52:39 -08:00
Jori Lallo 3ef82191b7 Code copy pointer 2017-11-26 20:38:57 -08:00
Jori Lallo a373931ebe Disable browser spellchecking with code 2017-11-26 20:34:45 -08:00
Jori Lallo 8dd79f8b13 Added favicons to application 2017-11-26 20:34:28 -08:00
Tom Moor bd8829d057 Merge pull request #434 from outline/collection-home
Collection Home
2017-11-26 18:27:21 -08:00
Tom Moor e07893b001 Merge master 2017-11-26 18:23:11 -08:00
Tom Moor 33fea77a86 PR feedback, remove collectionId 2017-11-26 18:18:41 -08:00
Tom Moor 94c2cc09ee Added documents.list endpoint to documentation (fixed some bad formatting)
Updated collection parameter
Increased fetch to 10 records, 5 looks dumb on larger screens
2017-11-26 18:18:41 -08:00
Tom Moor bca940bedc 💚 2017-11-26 18:18:41 -08:00
Tom Moor 3e01d4813e Add collection actions 2017-11-26 18:18:41 -08:00
Tom Moor a626b78616 Improved loading state 2017-11-26 18:18:40 -08:00
Tom Moor 81edb55d56 Working recently edited list 2017-11-26 18:18:40 -08:00
Tom Moor dc242038ff Remove unused teamId 2017-11-26 18:18:40 -08:00
Tom Moor 2143a87671 WIP: Collection home 2017-11-26 18:18:40 -08:00
Tom Moor 505310c172 Settings Routes (#449)
* Building out settings area

* Flow and refactoring

* TeamLogo

* Add temporary profile screen

* 💚

* PR feedback
2017-11-26 18:09:55 -08:00
Jori Lallo 6aa0390e99 Merge pull request #450 from outline/jori/marketing-pages
Public page CSS tweaks
2017-11-26 17:47:21 -08:00
Jori Lallo b27ac8c17e tweaked margins 2017-11-26 17:04:20 -08:00
Jori Lallo 210588d9a6 Improved mobile styles and keyword targeting 2017-11-26 16:52:25 -08:00
Tom Moor f5bc4f1fe3 Merge pull request #447 from outline/tommoor-patch-4
Add prettier badge
2017-11-26 16:52:20 -08:00
Tom Moor 8da662cb27 Update README.md 2017-11-26 13:18:14 -08:00
Jori Lallo ba3756eb74 Added min height to hero 2017-11-26 12:39:28 -08:00
Jori Lallo a77bface6e Merge pull request #444 from outline/revision-safety
Prevents accidental overwriting of another users work
2017-11-26 12:22:30 -08:00
Jori Lallo a4f738a0c0 Merge pull request #445 from outline/search-highlight
Add highlighting to search results
2017-11-26 12:15:54 -08:00
Jori Lallo 8f0aea88f5 Merge pull request #446 from outline/logout-loop
Fixed: Possible cause of logout loop
2017-11-26 12:13:04 -08:00
Tom Moor 83b6abe491 Fixed: Possible cause of logout loop 2017-11-25 18:56:21 -08:00
Tom Moor 2d8a41a982 Add highlighting to search results as mocked. 2017-11-25 15:44:10 -08:00
Tom Moor 98f317c74a Prevents accidental overwriting of another users work 2017-11-25 13:04:54 -08:00
Tom Moor 7945abbe54 Added documents.list endpoint to documentation (fixed some bad formatting)
Updated collection parameter
Increased fetch to 10 records, 5 looks dumb on larger screens
2017-11-22 18:40:37 -08:00
Tom Moor acdcb9e9ec Merge branch 'master' of github.com:jorilallo/atlas into collection-home 2017-11-22 18:32:35 -08:00
Tom Moor 1e75ce74e2 💚 2017-11-20 00:09:46 -08:00
Tom Moor a8b6b51aa6 Add collection actions 2017-11-19 23:39:56 -08:00
Tom Moor 113974ee19 Improved loading state 2017-11-19 21:50:42 -08:00
Tom Moor eb8b12d327 Working recently edited list 2017-11-19 21:32:18 -08:00
Tom Moor c0b2accb18 Remove unused teamId 2017-11-19 20:44:01 -08:00
Tom Moor 8f5869c48d WIP: Collection home 2017-11-19 20:16:49 -08:00
Tom Moor b0b76aab70 Merge branch 'layout-refactor' into collection-home 2017-11-19 18:09:17 -08:00
983 changed files with 80356 additions and 31257 deletions
+24 -12
View File
@@ -1,17 +1,29 @@
{
"presets": ["react", "env"],
"presets": [
"@babel/preset-react",
"@babel/preset-flow",
[
"@babel/preset-env",
{
"corejs": {
"version": "2",
"proposals": true
},
"useBuiltIns": "usage"
}
]
],
"plugins": [
"lodash",
"styled-components",
"transform-decorators-legacy",
"transform-es2015-destructuring",
"transform-object-rest-spread",
"transform-regenerator",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-transform-destructuring",
"@babel/plugin-transform-regenerator",
"transform-class-properties"
],
"env": {
"development": {
"presets": ["react-hmre"]
}
}
}
]
}
+43
View File
@@ -0,0 +1,43 @@
version: 2
jobs:
build:
working_directory: ~/outline
docker:
- image: circleci/node:12
- image: circleci/redis:latest
- image: circleci/postgres:9.6.5-alpine-ram
environment:
NODE_ENV: test
SECRET_KEY: F0E5AD933D7F6FD8F4DBB3E038C501C052DC0593C686D21ACB30AE205D2F634B
DATABASE_URL_TEST: postgres://root@localhost:5432/circle_test
DATABASE_URL: postgres://root@localhost:5432/circle_test
URL: http://localhost:3000
SMTP_FROM_EMAIL: hello@example.com
AWS_S3_UPLOAD_BUCKET_URL: https://s3.amazonaws.com
AWS_S3_UPLOAD_BUCKET_NAME: outline-circle
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: install-deps
command: yarn install --pure-lockfile
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- ./node_modules
- run:
name: migrate
command: ./node_modules/.bin/sequelize db:migrate --url $DATABASE_URL_TEST
- run:
name: lint
command: yarn lint
- run:
name: flow
command: yarn flow check --max-workers 4
- run:
name: test
command: yarn test
- run:
name: build
command: yarn build
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
curl --user ${CIRCLE_TOKEN}: \
--request POST \
--form revision=<ENTER COMMIT SHA HERE>\
--form config=@config.yml \
--form notify=false \
https://circleci.com/api/v1.1/project/github/outline/outline/tree/master
+51 -12
View File
@@ -1,22 +1,61 @@
# Copy this file to .env, remove this comment and change the keys
# Copy this file to .env, remove this comment and change the keys. For development
# with docker this should mostly work out of the box other than setting the Slack
# keys (for auth) and the SECRET_KEY.
#
# Please use `openssl rand -hex 32` to create SECRET_KEY
SECRET_KEY=generate_a_new_key
UTILS_SECRET=generate_a_new_key
DATABASE_URL=postgres://user:pass@localhost:5532/outline
DATABASE_URL_TEST=postgres://user:pass@localhost:5532/outline-test
REDIS_URL=redis://localhost:6479
DATABASE_URL=postgres://user:pass@example.com:5432/outline
DATABASE_URL_TEST=postgres://user:pass@example.com:5432/outline-test
SECRET_KEY=F0E5AD933D7F6FD8F4DBB3E038C501C052DC0593C686D21ACB30AE205D2F634B
PORT=3000
REDIS_URL=redis://localhost:6379
SLACK_KEY=71315967491.XXXXXXXXXX
SLACK_SECRET=d2dc414f9953226bad0a356c794XXXXX
URL=http://localhost:3000
DEPLOYMENT=hosted
ENABLE_UPDATES=true
GOOGLE_ANALYTICS_ID=
PORT=3000
# enforce (auto redirect to) https in production, (optional) default is true.
# set to false if your SSL is terminated at a loadbalancer, for example
FORCE_HTTPS=true
ENABLE_UPDATES=true
DEBUG=cache,presenters,events
# Third party signin credentials (at least one is required)
SLACK_KEY=get_a_key_from_slack
SLACK_SECRET=get_the_secret_of_above_key
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# Comma separated list of domains to be allowed (optional)
# If not set, all Google apps domains are allowed by default
GOOGLE_ALLOWED_DOMAINS=
# Third party credentials (optional)
SLACK_VERIFICATION_TOKEN=PLxk6OlXXXXXVj3YYYY
SLACK_APP_ID=A0XXXXXXX
SLACK_MESSAGE_ACTIONS=true
GOOGLE_ANALYTICS_ID=
SENTRY_DSN=
# AWS credentials (optional in development)
AWS_ACCESS_KEY_ID=get_a_key_from_aws
AWS_SECRET_ACCESS_KEY=get_the_secret_of_above_key
AWS_REGION=xx-xxxx-x
AWS_S3_UPLOAD_BUCKET_URL=http://s3:4569
AWS_S3_UPLOAD_BUCKET_NAME=bucket_name_here
AWS_S3_UPLOAD_MAX_SIZE=26214400
# uploaded s3 objects permission level, default is private
# set to "public-read" to allow public access
AWS_S3_ACL=private
# Emails configuration (optional)
SMTP_HOST=
SMTP_PORT=
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_FROM_EMAIL=
SMTP_REPLY_EMAIL=
SMTP_REPLY_EMAIL=
# Custom logo that displays on the authentication screen, scaled to height: 60px
# TEAM_LOGO=https://example.com/images/logo.png
+64 -24
View File
@@ -6,23 +6,54 @@
"plugin:import/warnings",
"plugin:flowtype/recommended"
],
"plugins": ["prettier", "flowtype"],
"plugins": [
"prettier",
"flowtype"
],
"rules": {
"eqeqeq": 2,
"no-unused-vars": 2,
// // Bring back after we remove CSS Modules 100%
// "import/order": "warn",
// Prettier automatically uses the least amount of parens possible, so this
// does more harm than good.
"no-mixed-operators": "off",
// Temporary fix for a failing import lint
"import/no-unresolved": [
"import/order": [
"error",
{
"ignore": ["slate-drop-or-paste-images"]
"alphabetize": {
"order": "asc"
},
"pathGroups": [
{
"pattern": "shared/**",
"group": "external",
"position": "after"
},
{
"pattern": "stores",
"group": "external",
"position": "after"
},
{
"pattern": "stores/**",
"group": "external",
"position": "after"
},
{
"pattern": "models/**",
"group": "external",
"position": "after"
},
{
"pattern": "scenes/**",
"group": "external",
"position": "after"
},
{
"pattern": "components/**",
"group": "external",
"position": "after"
}
]
}
],
// Flow
"flowtype/require-valid-file-annotation": [
2,
"always",
@@ -30,20 +61,36 @@
"annotationStyle": "line"
}
],
"flowtype/space-after-type-colon": [2, "always"],
"flowtype/space-before-type-colon": [2, "never"],
// Enforce that code is formatted with prettier.
"flowtype/space-after-type-colon": [
2,
"always"
],
"flowtype/space-before-type-colon": [
2,
"never"
],
"prettier/prettier": [
"error",
{
"printWidth": 80,
"trailingComma": "es5",
"singleQuote": true
"trailingComma": "es5"
}
]
},
"settings": {
"import/resolver": "webpack",
"react": {
"createClass": "createReactClass",
"pragma": "React",
"version": "detect"
},
"import/resolver": {
"node": {
"paths": [
"app",
"."
]
}
},
"flowtype": {
"onlyFilesWithFlowAnnotation": false
}
@@ -52,13 +99,6 @@
"jest": true
},
"globals": {
"__DEV__": true,
"SLACK_KEY": true,
"SLACK_REDIRECT_URI": true,
"DEPLOYMENT": true,
"BASE_URL": true,
"BUGSNAG_KEY": true,
"afterAll": true,
"Bugsnag": true
"EDITOR_VERSION": true
}
}
}
+3 -3
View File
@@ -4,11 +4,14 @@
.*/shared/.*
[ignore]
.*/node_modules/tiny-cookie/flow/.*
.*/node_modules/styled-components/.*
.*/node_modules/polished/.*
.*/node_modules/mobx/.*.flow
.*/node_modules/react-side-effect/.*
.*/node_modules/fbjs/.*
.*/node_modules/config-chain/.*
.*/server/scripts/.*
*.test.js
[libs]
@@ -19,19 +22,16 @@ emoji=true
module.system.node.resolve_dirname=node_modules
module.system.node.resolve_dirname=app
module.name_mapper='^\(.*\)\.s?css$' -> 'empty/object'
module.name_mapper='^\(.*\)\.md$' -> 'empty/object'
module.name_mapper='^shared\/\(.*\)$' -> '<PROJECT_ROOT>/shared/\1'
module.file_ext=.js
module.file_ext=.scss
module.file_ext=.md
module.file_ext=.json
esproposal.decorators=ignore
esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable
unsafe.enable_getters_and_setters=true
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue
-1
View File
@@ -1 +0,0 @@
yarn lint:flow
+37
View File
@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots or videos to help explain your problem.
**Outline (please complete the following information):**
- Install: [getoutline.com or self hosted]
- Version: [commit sha if self hosted]
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Mobile (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
+8
View File
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Feature request
url: https://github.com/outline/outline/discussions/new
about: Request a feature to be added to the project
- name: Self hosting questions
url: https://github.com/outline/outline/discussions/new
about: Ask questions and discuss running Outline with community members
+32
View File
@@ -0,0 +1,32 @@
# Configuration for request-info - https://github.com/behaviorbot/request-info
# Comment to reply with
requestInfoReplyComment: >
Hey there! It looks like you didn't provide much information here. Please
consider adding more details about the issue / pr or it will be automatically
closed. Thanks for helping us maintain the project!
# default titles to check against for lack of descriptiveness
requestInfoDefaultTitles:
- update readme.md
- updates
- fix
- fixes
requestInfoLabelToAdd: more information needed
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
# Comment to be posted to on PRs from first time contributors in your repository
newPRWelcomeComment: >
Thanks for opening your first pull request in the Outline project 🎉🙌! One of the core
team members will take a look and get back to you soon with approval or requested
changes.
# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
# Comment to be posted to on pull requests merged by a first time user
firstPRMergeComment: >
A big thanks on merging your first pull request into Outline!
![awesome](https://media.giphy.com/media/fDzM81OYrNjJC/giphy.gif)
+13
View File
@@ -0,0 +1,13 @@
# Configuration for probot-no-response - https://github.com/probot/no-response
# Number of days of inactivity before an Issue is closed for lack of response
daysUntilClose: 14
# Label requiring a response
responseRequiredLabel: more information needed
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
closeComment: >
This issue has been automatically closed because there has been no response
to the request for more information. With only the details that are currently
in the issue, we don't have enough information to take action.
+21
View File
@@ -0,0 +1,21 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- security
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
Hey! The issue has been automatically marked as stale because it has not had
recent activity. It will be closed soon if no further activity occurs. Please
reply here if you wish for the issue to be kept open.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
+4
View File
@@ -1,5 +1,9 @@
dist
node_modules/*
server/scripts
.env
.log
npm-debug.log
stats.json
.DS_Store
fakes3/*
+6
View File
@@ -0,0 +1,6 @@
{
"javascript.validate.enable": false,
"typescript.validate.enable": false,
"editor.formatOnSave": true,
"typescript.format.enable": false
}
+46
View File
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hello@getoutline.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
+17
View File
@@ -0,0 +1,17 @@
FROM node:12-alpine
ENV PATH /opt/outline/node_modules/.bin:/opt/node_modules/.bin:$PATH
ENV NODE_PATH /opt/outline/node_modules:/opt/node_modules
ENV APP_PATH /opt/outline
RUN mkdir -p $APP_PATH
WORKDIR $APP_PATH
COPY . $APP_PATH
RUN yarn install --pure-lockfile
RUN yarn build
RUN cp -r /opt/outline/node_modules /opt/node_modules
CMD yarn start
EXPOSE 3000
+98 -14
View File
@@ -1,19 +1,103 @@
Copyright (c) 2017 Outline (https://www.getoutline.com/) and individual contributors.
All rights reserved.
Business Source License 1.1
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Parameters
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Licensor: General Outline, Inc.
Licensed Work: Outline 0.46.0
The Licensed Work is (c) 2020 General Outline, Inc.
Additional Use Grant: You may make use of the Licensed Work, provided that
you may not use the Licensed Work for a Document
Service.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
A “Document Service” is a commercial offering that
allows third parties (other than your employees and
contractors) to access the functionality of the
Licensed Work by creating teams and documents
controlled by such third parties.
3. Neither the name of the Outline nor the names of its contributors may be used to endorse or promote products derived from this software
without specific prior written permission.
Change Date: 2023-08-12
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Change License: Apache License, Version 2.0
For information about alternative licensing arrangements for the Software,
please visit: https://www.getoutline.com
Notice
The Business Source License (this document, or the “License”) is not an Open
Source license. However, the Licensed Work will eventually be made available
under an Open Source License, as stated in this License.
License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
“Business Source License” is a trademark of MariaDB Corporation Ab.
-----------------------------------------------------------------------------
Business Source License 1.1
Terms
The Licensor hereby grants you the right to copy, modify, create derivative
works, redistribute, and make non-production use of the Licensed Work. The
Licensor may make an Additional Use Grant, above, permitting limited
production use.
Effective on the Change Date, or the fourth anniversary of the first publicly
available distribution of a specific version of the Licensed Work under this
License, whichever comes first, the Licensor hereby grants you rights under
the terms of the Change License, and the rights granted in the paragraph
above terminate.
If your use of the Licensed Work does not comply with the requirements
currently in effect as described in this License, you must purchase a
commercial license from the Licensor, its affiliated entities, or authorized
resellers, or you must refrain from using the Licensed Work.
All copies of the original and modified Licensed Work, and derivative works
of the Licensed Work, are subject to this License. This License applies
separately for each version of the Licensed Work and the Change Date may vary
for each version of the Licensed Work released by Licensor.
You must conspicuously display this License on each original or modified copy
of the Licensed Work. If you receive the Licensed Work in original or
modified form from a third party, the terms and conditions set forth in this
License apply to your use of that work.
Any use of the Licensed Work in violation of this License will automatically
terminate your rights under this License for the current and all other
versions of the Licensed Work.
This License does not grant you any right in any trademark or logo of
Licensor or its affiliates (provided that you may use a trademark or logo of
Licensor as expressly required by this License).
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
TITLE.
MariaDB hereby grants you permission to use this Licenses text to license
your works, and to refer to it using the trademark “Business Source License”,
as long as you comply with the Covenants of Licensor below.
Covenants of Licensor
In consideration of the right to use this Licenses text and the “Business
Source License” name and trademark, Licensor covenants to MariaDB, and to all
other recipients of the licensed work to be provided by Licensor:
1. To specify as the Change License the GPL Version 2.0 or any later version,
or a license that is compatible with GPL Version 2.0 or a later version,
where “compatible” means that software provided under the Change License can
be included in a program with software provided under GPL Version 2.0 or a
later version. Licensor may specify additional Change Licenses without
limitation.
2. To either: (a) specify an additional grant of rights to use that does not
impose any additional restriction on the right granted in this License, as
the Additional Use Grant; or (b) insert the text “None”.
3. To specify a Change Date.
4. Not to modify this License in any other way.
+22
View File
@@ -0,0 +1,22 @@
up:
docker-compose up -d redis postgres s3
yarn install --pure-lockfile
yarn sequelize db:migrate
yarn dev
build:
docker-compose build --pull outline
test:
docker-compose up -d redis postgres s3
yarn test
watch:
docker-compose up -d redis postgres s3
yarn test:watch
destroy:
docker-compose stop
docker-compose rm -f
.PHONY: up build destroy test watch # let's go to reserve rules names
+129 -26
View File
@@ -1,46 +1,89 @@
# Outline
![](https://circleci.com/gh/outline/outline.svg?style=shield&circle-token=c0c4c2f39990e277385d5c1ae96169c409eb887a)
[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/outline)
An open, extensible, knowledge base for your team built using React and Node.js. Try Outline out using our hosted version at [www.getoutline.com](https://www.getoutline.com) or read on to learn about installing on your own infrastructure.
<p align="center">
<img src="https://user-images.githubusercontent.com/31465/34380645-bd67f474-eb0b-11e7-8d03-0151c1730654.png" height="29" />
</p>
<p align="center">
<i>An open, extensible, wiki for your team built using React and Node.js.<br/>Try out Outline using our hosted version at <a href="https://www.getoutline.com">www.getoutline.com</a>.</i>
<br/>
<img src="https://user-images.githubusercontent.com/380914/78513257-153ae080-775f-11ea-9b49-1e1939451a3e.png" alt="Outline" width="800" />
</p>
<p align="center">
<a href="https://circleci.com/gh/outline/outline" rel="nofollow"><img src="https://circleci.com/gh/outline/outline.svg?style=shield&amp;circle-token=c0c4c2f39990e277385d5c1ae96169c409eb887a"></a>
<a href="https://github.com/prettier/prettier"><img src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat"></a>
<a href="https://github.com/styled-components/styled-components"><img src="https://img.shields.io/badge/style-%F0%9F%92%85%20styled--components-orange.svg"></a>
</p>
This is the source code that runs [**Outline**](https://www.getoutline.com) and all the associated services. If you want to use Outline then you don't need to run this code, we offer a hosted version of the app at [getoutline.com](https://www.getoutline.com).
If you'd like to run your own copy of Outline or contribute to development then this is the place for you.
## Installation
Outline requires following dependencies to work:
Outline requires the following dependencies:
- Node.js >= 12
- Postgres >=9.5
- Redis
- S3 bucket configured to support CORS uploads
- Slack developer application
- Redis >= 4
- AWS S3 storage bucket for media and other attachments
- Slack or Google developer application for authentication
To install and run the application:
1. Install dependencies with `yarn`
1. Register a Slack app at https://api.slack.com/apps
1. Copy the file `.env.sample` to `.env` and fill out the keys
1. Run DB migrations `yarn sequelize db:migrate`
To run Outline in development mode with server and frontend code reloading:
### Development
```shell
yarn dev
```
In development you can quickly get an environment running using Docker by following these steps:
To run Outline in production mode:
1. Install these dependencies if you don't already have them
1. [Docker for Desktop](https://www.docker.com)
1. [Node.js](https://nodejs.org/) (v12 LTS preferred)
1. [Yarn](https://yarnpkg.com)
1. Clone this repo
1. Register a Slack app at https://api.slack.com/apps
1. Copy the file `.env.sample` to `.env`
1. Fill out the following fields:
1. `SECRET_KEY` (follow instructions in the comments at the top of `.env`)
1. `SLACK_KEY` (this is called "Client ID" in Slack admin)
1. `SLACK_SECRET` (this is called "Client Secret" in Slack admin)
1. Configure your Slack app's Oauth & Permissions settings
1. Add `http://localhost:3000/auth/slack.callback` as an Oauth redirect URL
1. Ensure that the bot token scope contains at least `users:read`
1. Run `make up`. This will download dependencies, build and launch a development version of Outline
### Production
For a self-hosted production installation there is more flexibility, but these are the suggested steps:
1. Clone this repo and install dependencies with `yarn` or `npm install`
> Requires [Node.js](https://nodejs.org/) and [yarn](https://yarnpkg.com) installed
1. Build the web app with `yarn build:webpack` or `npm run build:webpack`
1. Using the `.env.sample` as a reference, set the required variables in your production environment. The following are required as a minimum:
1. `SECRET_KEY` (follow instructions in the comments at the top of `.env`)
1. `SLACK_KEY` (this is called "Client ID" in Slack admin)
1. `SLACK_SECRET` (this is called "Client Secret" in Slack admin)
1. `DATABASE_URL` (run your own local copy of Postgres, or use a cloud service)
1. `REDIS_URL` (run your own local copy of Redis, or use a cloud service)
1. `URL` (the public facing URL of your installation)
1. `AWS_` (all of the keys beginning with AWS)
1. Migrate database schema with `yarn sequelize:migrate` or `npm run sequelize:migrate `
1. Start the service with any daemon tools you prefer. Take PM2 for example, `NODE_ENV=production pm2 start index.js --name outline `
1. Visit http://you_server_ip:3000 and you should be able to see Outline page
> Port number can be changed in the `.env` file
1. (Optional) You can add an `nginx` reverse proxy to serve your instance of Outline for a clean URL without the port number, support SSL, etc.
```shell
yarn start
```
## Development
### Server
To enable debugging statements, set the following env vars:
Outline uses [debug](https://www.npmjs.com/package/debug). To enable debugging output, the following categories are available:
```
DEBUG=sql,cache,presenters
DEBUG=sql,cache,presenters,events,logistics,emails,mailer
```
## Migrations
@@ -48,7 +91,7 @@ DEBUG=sql,cache,presenters
Sequelize is used to create and run migrations, for example:
```
yarn sequelize migration:create
yarn sequelize migration:generate --name my-migration
yarn sequelize db:migrate
```
@@ -58,7 +101,67 @@ Or to run migrations on test database:
yarn sequelize db:migrate --env test
```
## Structure
Outline is composed of separate backend and frontend application which are both driven by the same Node process. As both are written in Javascript, they share some code but are mostly separate. We utilize the latest language features, including `async`/`await`, and [Flow](https://flow.org/) typing. Prettier and ESLint are enforced by CI.
### Frontend
Outline's frontend is a React application compiled with [Webpack](https://webpack.js.org/). It uses [Mobx](https://mobx.js.org/) for state management and [Styled Components](https://www.styled-components.com/) for component styles. Unless global, state logic and styles are always co-located with React components together with their subcomponents to make the component tree easier to manage.
The editor itself is built on [Prosemirror](https://github.com/prosemirror) and hosted in a separate repository to encourage reuse: [rich-markdown-editor](https://github.com/outline/rich-markdown-editor)
- `app/` - Frontend React application
- `app/scenes` - Full page views
- `app/components` - Reusable React components
- `app/stores` - Global state stores
- `app/models` - State models
- `app/types` - Flow types for non-models
### Backend
Backend is driven by [Koa](http://koajs.com/) (API, web server), [Sequelize](http://docs.sequelizejs.com/) (database) and React for public pages and emails.
- `server/api` - API endpoints
- `server/commands` - Domain logic, currently being refactored from /models
- `server/emails` - React rendered email templates
- `server/models` - Database models
- `server/policies` - Authorization logic
- `server/presenters` - API responses for database models
- `server/test` - Test helps and support
- `server/utils` - Utility methods
- `shared` - Code shared between frontend and backend applications
## Tests
We aim to have sufficient test coverage for critical parts of the application and aren't aiming for 100% unit test coverage. All API endpoints and anything authentication related should be thoroughly tested.
To add new tests, write your tests with [Jest](https://facebook.github.io/jest/) and add a file with `.test.js` extension next to the tested code.
```shell
# To run all tests
yarn test
# To run backend tests
yarn test:server
# To run frontend tests
yarn test:app
```
## Contributing
Outline is built and maintained by a small team we'd love your help to fix bugs and add features!
However, before working on a pull request please let the core team know by creating or commenting in an issue on [GitHub](https://www.github.com/outline/outline/issues), and we'd also love to hear from you in the [Discussions](https://www.github.com/outline/outline/discussions). This way we can ensure that an approach is agreed on before code is written and will hopefully help to get your contributions integrated faster!
If youre looking for ways to get started, here's a list of ways to help us improve Outline:
* Issues with [`good first issue`](https://github.com/outline/outline/labels/good%20first%20issue) label
* Performance improvements, both on server and frontend
* Developer happiness and documentation
* Bugs and other issues listed on GitHub
## License
Outline is [BSD licensed](/blob/master/LICENSE).
Outline is [BSL 1.1 licensed](https://github.com/outline/outline/blob/master/LICENSE).
+11
View File
@@ -0,0 +1,11 @@
# Security Policy
## Reporting a Vulnerability
The Outline team takes security bugs seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
To report a security issue, email [hello@getoutline.com](mailto:hello@getoutline.com) and include the word "SECURITY" in the subject line.
The Outline team will send a response indicating the next steps in handling your report. After the initial reply to your report you will be kept informed of the progress towards a fix and full announcement.
Report security bugs in third-party dependencies to the person or team maintaining the module. You can also report a vulnerability through the [Node Security Project](https://nodesecurity.io/report).
-2
View File
@@ -1,2 +0,0 @@
import idObj from 'identity-obj-proxy';
export default idObj;
+142
View File
@@ -0,0 +1,142 @@
{
"name": "Outline",
"description": "Open source wiki and knowledge base for growing teams",
"website": "https://www.getoutline.com/",
"repository": "https://github.com/outline/outline",
"keywords": [
"wiki",
"team",
"node",
"markdown",
"slack"
],
"success_url": "/",
"formation": {
"web": {
"quantity": 1,
"size": "Hobby"
}
},
"image": "heroku/node",
"addons": [
{
"plan": "heroku-redis"
},
{
"plan": "heroku-postgresql"
}
],
"scripts": {
"postdeploy": "yarn sequelize db:migrate"
},
"env": {
"SECRET_KEY": {
"description": "A secret key",
"generator": "secret",
"required": true
},
"ENABLE_UPDATES": {
"value": "true",
"required": true
},
"URL": {
"description": "https://{your app name}.herokuapp.com",
"required": true
},
"GOOGLE_CLIENT_ID": {
"description": "See https://developers.google.com/identity/protocols/OAuth2 to create a new Google OAuth client. You must configure at least one of Slack or Google to control login.",
"required": false
},
"GOOGLE_CLIENT_SECRET": {
"description": "",
"required": false
},
"GOOGLE_ALLOWED_DOMAINS": {
"description": "Comma separated list of domains to be allowed (optional). If not set, all Google apps domains are allowed by default",
"required": false
},
"SLACK_KEY": {
"description": "See https://api.slack.com/apps to create a new Slack app. You must configure at least one of Slack or Google to control login.",
"required": false
},
"SLACK_SECRET": {
"description": "Your Slack client secret - d2dc414f9953226bad0a356cXXXXYYYY",
"required": false
},
"SLACK_VERIFICATION_TOKEN": {
"description": "Your Slack verification token - PLxk6OlXXXXXVj3YYYY",
"required": false
},
"SLACK_APP_ID": {
"description": "A0XXXXXXXXX",
"required": false
},
"AWS_ACCESS_KEY_ID": {
"description": "Needed to save file uploads. Optional for development / testing",
"required": false
},
"AWS_SECRET_ACCESS_KEY": {
"description": "",
"required": false
},
"AWS_S3_UPLOAD_BUCKET_NAME": {
"description": "yourbucket.example.com",
"required": false
},
"AWS_S3_UPLOAD_BUCKET_URL": {
"description": "Live web link to your bucket. For CNAMEs, https://yourbucket.example.com",
"required": false
},
"AWS_S3_UPLOAD_MAX_SIZE": {
"description": "Maximum file upload size in bytes",
"value": "26214400",
"required": false
},
"AWS_REGION": {
"value": "us-east-1",
"description": "Region in which the above S3 bucket exists",
"required": false
},
"AWS_S3_ACL": {
"value": "private",
"description": "S3 canned ACL for document attachments",
"required": false
},
"SMTP_HOST": {
"description": "smtp.example.com (optional)",
"required": false
},
"SMTP_PORT": {
"description": "1234 (optional)",
"required": false
},
"SMTP_USERNAME": {
"description": "me@example.com (optional)",
"required": false
},
"SMTP_PASSWORD": {
"description": "(optional)",
"required": false
},
"SMTP_FROM_EMAIL": {
"description": "wiki@example.com (optional)",
"required": false
},
"SMTP_REPLY_EMAIL": {
"description": "wikireply@example.com (optional)",
"required": false
},
"GOOGLE_ANALYTICS_ID": {
"description": "UA-xxxx (optional)",
"required": false
},
"SENTRY_DSN": {
"description": "An API key for Sentry if you wish to collect error reporting (optional)",
"required": false
},
"TEAM_LOGO": {
"description": "A logo that will be displayed on the signed out home page",
"required": false
}
}
}
+53
View File
@@ -0,0 +1,53 @@
// @flow
import styled from "styled-components";
import breakpoint from "styled-components-breakpoint";
import Flex from "components/Flex";
export const Action = styled(Flex)`
justify-content: center;
align-items: center;
padding: 0 0 0 12px;
height: 32px;
font-size: 15px;
flex-shrink: 0;
a {
color: ${(props) => props.theme.text};
height: 24px;
}
&:empty {
display: none;
}
`;
export const Separator = styled.div`
flex-shrink: 0;
margin-left: 12px;
width: 1px;
height: 28px;
background: ${(props) => props.theme.divider};
`;
const Actions = styled(Flex)`
position: fixed;
top: 0;
right: 0;
left: 0;
border-radius: 3px;
background: ${(props) => props.theme.background};
transition: ${(props) => props.theme.backgroundTransition};
padding: 12px;
-webkit-backdrop-filter: blur(20px);
@media print {
display: none;
}
${breakpoint("tablet")`
left: auto;
padding: 24px;
`};
`;
export default Actions;
-38
View File
@@ -1,38 +0,0 @@
// @flow
import React from 'react';
import { observer } from 'mobx-react';
import Flex from 'shared/components/Flex';
import styled from 'styled-components';
import { color } from 'shared/styles/constants';
type Props = {
children: React.Element<*>,
type?: 'info' | 'success' | 'warning' | 'danger' | 'offline',
};
@observer
class Alert extends React.Component {
props: Props;
defaultProps = {
type: 'info',
};
render() {
return (
<Container align="center" justify="center" type={this.props.type}>
{this.props.children}
</Container>
);
}
}
const Container = styled(Flex)`
height: $headerHeight;
color: #ffffff;
font-size: 14px;
line-height: 1;
background-color: ${({ type }) => color[type]};
`;
export default Alert;
-3
View File
@@ -1,3 +0,0 @@
// @flow
import Alert from './Alert';
export default Alert;
+40
View File
@@ -0,0 +1,40 @@
// @flow
/* global ga */
import * as React from "react";
import env from "env";
type Props = {
children?: React.Node,
};
export default class Analytics extends React.Component<Props> {
componentDidMount() {
if (!env.GOOGLE_ANALYTICS_ID) return;
// standard Google Analytics script
window.ga =
window.ga ||
function () {
// $FlowIssue
(ga.q = ga.q || []).push(arguments);
};
// $FlowIssue
ga.l = +new Date();
ga("create", env.GOOGLE_ANALYTICS_ID, "auto");
ga("set", { dimension1: "true" });
ga("send", "pageview");
const script = document.createElement("script");
script.src = "https://www.google-analytics.com/analytics.js";
script.async = true;
if (document.body) {
document.body.appendChild(script);
}
}
render() {
return this.props.children || null;
}
}
+43
View File
@@ -0,0 +1,43 @@
// @flow
import { observer, inject } from "mobx-react";
import * as React from "react";
import { Redirect } from "react-router-dom";
import { isCustomSubdomain } from "shared/utils/domains";
import AuthStore from "stores/AuthStore";
import LoadingIndicator from "components/LoadingIndicator";
import env from "env";
type Props = {
auth: AuthStore,
children?: React.Node,
};
const Authenticated = observer(({ auth, children }: Props) => {
if (auth.authenticated) {
const { user, team } = auth;
const { hostname } = window.location;
if (!team || !user) {
return <LoadingIndicator />;
}
// If we're authenticated but viewing a subdomain that doesn't match the
// currently authenticated team then kick the user to the teams subdomain.
if (
env.SUBDOMAINS_ENABLED &&
team.subdomain &&
isCustomSubdomain(hostname) &&
!hostname.startsWith(`${team.subdomain}.`)
) {
window.location.href = `${team.url}${window.location.pathname}`;
return <LoadingIndicator />;
}
return children;
}
auth.logout(true);
return <Redirect to="/" />;
});
export default inject("auth")(Authenticated);
+46 -15
View File
@@ -1,35 +1,66 @@
// @flow
import React, { Component } from 'react';
import styled from 'styled-components';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
import { color } from 'shared/styles/constants';
import placeholder from './placeholder.png';
import { observable } from "mobx";
import { observer } from "mobx-react";
import * as React from "react";
import styled from "styled-components";
import placeholder from "./placeholder.png";
type Props = {
src: string,
size: number,
icon?: React.Node,
};
@observer
class Avatar extends Component {
class Avatar extends React.Component<Props> {
@observable error: boolean;
static defaultProps = {
size: 24,
};
handleError = () => {
this.error = true;
};
render() {
const { src, icon, ...rest } = this.props;
return (
<CircleImg
{...this.props}
onError={this.handleError}
src={this.error ? placeholder : this.props.src}
/>
<AvatarWrapper>
<CircleImg
onError={this.handleError}
src={this.error ? placeholder : src}
{...rest}
/>
{icon && <IconWrapper>{icon}</IconWrapper>}
</AvatarWrapper>
);
}
}
const AvatarWrapper = styled.div`
position: relative;
`;
const IconWrapper = styled.div`
display: flex;
position: absolute;
bottom: -2px;
right: -2px;
background: ${(props) => props.theme.primary};
border: 2px solid ${(props) => props.theme.background};
border-radius: 100%;
width: 20px;
height: 20px;
`;
const CircleImg = styled.img`
width: 24px;
height: 24px;
display: block;
width: ${(props) => props.size}px;
height: ${(props) => props.size}px;
border-radius: 50%;
border: 2px solid ${color.white};
border: 2px solid ${(props) => props.theme.background};
flex-shrink: 0;
`;
@@ -0,0 +1,86 @@
// @flow
import distanceInWordsToNow from "date-fns/distance_in_words_to_now";
import { observable } from "mobx";
import { observer } from "mobx-react";
import { EditIcon } from "outline-icons";
import * as React from "react";
import styled from "styled-components";
import User from "models/User";
import UserProfile from "scenes/UserProfile";
import Avatar from "components/Avatar";
import Tooltip from "components/Tooltip";
type Props = {
user: User,
isPresent: boolean,
isEditing: boolean,
isCurrentUser: boolean,
lastViewedAt: string,
};
@observer
class AvatarWithPresence extends React.Component<Props> {
@observable isOpen: boolean = false;
handleOpenProfile = () => {
this.isOpen = true;
};
handleCloseProfile = () => {
this.isOpen = false;
};
render() {
const {
user,
lastViewedAt,
isPresent,
isEditing,
isCurrentUser,
} = this.props;
return (
<>
<Tooltip
tooltip={
<Centered>
<strong>{user.name}</strong> {isCurrentUser && "(You)"}
<br />
{isPresent
? isEditing
? "currently editing"
: "currently viewing"
: `viewed ${distanceInWordsToNow(new Date(lastViewedAt))} ago`}
</Centered>
}
placement="bottom"
>
<AvatarWrapper isPresent={isPresent}>
<Avatar
src={user.avatarUrl}
onClick={this.handleOpenProfile}
size={32}
icon={isEditing ? <EditIcon size={16} color="#FFF" /> : undefined}
/>
</AvatarWrapper>
</Tooltip>
<UserProfile
user={user}
isOpen={this.isOpen}
onRequestClose={this.handleCloseProfile}
/>
</>
);
}
}
const Centered = styled.div`
text-align: center;
`;
const AvatarWrapper = styled.div`
opacity: ${(props) => (props.isPresent ? 1 : 0.5)};
transition: opacity 250ms ease-in-out;
`;
export default AvatarWithPresence;
+4 -1
View File
@@ -1,3 +1,6 @@
// @flow
import Avatar from './Avatar';
import Avatar from "./Avatar";
import AvatarWithPresence from "./AvatarWithPresence";
export { AvatarWithPresence };
export default Avatar;
+17
View File
@@ -0,0 +1,17 @@
// @flow
import styled from "styled-components";
const Badge = styled.span`
margin-left: 10px;
padding: 2px 6px 3px;
background-color: ${({ primary, theme }) =>
primary ? theme.primary : theme.textTertiary};
color: ${({ primary, theme }) => (primary ? theme.white : theme.background)};
border-radius: 4px;
font-size: 11px;
font-weight: 500;
text-transform: uppercase;
user-select: none;
`;
export default Badge;
+43
View File
@@ -0,0 +1,43 @@
// @flow
import * as React from "react";
import styled from "styled-components";
import OutlineLogo from "./OutlineLogo";
import env from "env";
type Props = {
href?: string,
};
function Branding({ href = env.URL }: Props) {
return (
<Link href={href}>
<OutlineLogo size={16} />
&nbsp;Outline
</Link>
);
}
const Link = styled.a`
position: fixed;
bottom: 0;
left: 0;
font-weight: 600;
font-size: 14px;
text-decoration: none;
border-top-right-radius: 2px;
color: ${(props) => props.theme.text};
display: flex;
align-items: center;
padding: 16px;
svg {
fill: ${(props) => props.theme.text};
}
&:hover {
background: ${(props) => props.theme.sidebarBackground};
}
`;
export default Branding;
+162
View File
@@ -0,0 +1,162 @@
// @flow
import { observer, inject } from "mobx-react";
import {
PadlockIcon,
GoToIcon,
MoreIcon,
ShapesIcon,
EditIcon,
} from "outline-icons";
import * as React from "react";
import { Link } from "react-router-dom";
import styled from "styled-components";
import breakpoint from "styled-components-breakpoint";
import CollectionsStore from "stores/CollectionsStore";
import Document from "models/Document";
import CollectionIcon from "components/CollectionIcon";
import Flex from "components/Flex";
import BreadcrumbMenu from "./BreadcrumbMenu";
import { collectionUrl } from "utils/routeHelpers";
type Props = {
document: Document,
collections: CollectionsStore,
onlyText: boolean,
};
const Breadcrumb = observer(({ document, collections, onlyText }: Props) => {
const collection = collections.get(document.collectionId);
if (!collection) return <div />;
const path = collection.pathToDocument(document).slice(0, -1);
if (onlyText === true) {
return (
<>
{collection.private && (
<>
<SmallPadlockIcon color="currentColor" size={16} />{" "}
</>
)}
{collection.name}
{path.map((n) => (
<React.Fragment key={n.id}>
<SmallSlash />
{n.title}
</React.Fragment>
))}
</>
);
}
const isTemplate = document.isTemplate;
const isDraft = !document.publishedAt && !isTemplate;
const isNestedDocument = path.length > 1;
const lastPath = path.length ? path[path.length - 1] : undefined;
const menuPath = isNestedDocument ? path.slice(0, -1) : [];
return (
<Wrapper justify="flex-start" align="center">
{isTemplate && (
<>
<CollectionName to="/templates">
<ShapesIcon color="currentColor" />
&nbsp;
<span>Templates</span>
</CollectionName>
<Slash />
</>
)}
{isDraft && (
<>
<CollectionName to="/drafts">
<EditIcon color="currentColor" />
&nbsp;
<span>Drafts</span>
</CollectionName>
<Slash />
</>
)}
<CollectionName to={collectionUrl(collection.id)}>
<CollectionIcon collection={collection} expanded />
&nbsp;
<span>{collection.name}</span>
</CollectionName>
{isNestedDocument && (
<>
<Slash /> <BreadcrumbMenu label={<Overflow />} path={menuPath} />
</>
)}
{lastPath && (
<>
<Slash />{" "}
<Crumb to={lastPath.url} title={lastPath.title}>
{lastPath.title}
</Crumb>
</>
)}
</Wrapper>
);
});
const Wrapper = styled(Flex)`
display: none;
${breakpoint("tablet")`
display: flex;
`};
`;
const SmallPadlockIcon = styled(PadlockIcon)`
display: inline-block;
vertical-align: sub;
`;
const SmallSlash = styled(GoToIcon)`
width: 15px;
height: 10px;
flex-shrink: 0;
opacity: 0.25;
`;
export const Slash = styled(GoToIcon)`
flex-shrink: 0;
fill: ${(props) => props.theme.divider};
`;
const Overflow = styled(MoreIcon)`
flex-shrink: 0;
opacity: 0.25;
transition: opacity 100ms ease-in-out;
&:hover,
&:active {
opacity: 1;
}
`;
const Crumb = styled(Link)`
color: ${(props) => props.theme.text};
font-size: 15px;
height: 24px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
&:hover {
text-decoration: underline;
}
`;
const CollectionName = styled(Link)`
display: flex;
flex-shrink: 0;
color: ${(props) => props.theme.text};
font-size: 15px;
font-weight: 500;
white-space: nowrap;
overflow: hidden;
`;
export default inject("collections")(Breadcrumb);
+25
View File
@@ -0,0 +1,25 @@
// @flow
import * as React from "react";
import { Link } from "react-router-dom";
import { DropdownMenu, DropdownMenuItem } from "components/DropdownMenu";
type Props = {
label: React.Node,
path: Array<any>,
};
export default class BreadcrumbMenu extends React.Component<Props> {
render() {
const { path } = this.props;
return (
<DropdownMenu label={this.props.label} position="center">
{path.map((item) => (
<DropdownMenuItem as={Link} to={item.url} key={item.id}>
{item.title}
</DropdownMenuItem>
))}
</DropdownMenu>
);
}
}
+160
View File
@@ -0,0 +1,160 @@
// @flow
import { ExpandedIcon } from "outline-icons";
import { darken, lighten } from "polished";
import * as React from "react";
import styled from "styled-components";
const RealButton = styled.button`
display: ${(props) => (props.fullwidth ? "block" : "inline-block")};
width: ${(props) => (props.fullwidth ? "100%" : "auto")};
margin: 0;
padding: 0;
border: 0;
background: ${(props) => props.theme.buttonBackground};
color: ${(props) => props.theme.buttonText};
box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 2px;
border-radius: 4px;
font-size: 14px;
font-weight: 500;
height: 32px;
text-decoration: none;
flex-shrink: 0;
outline: none;
cursor: pointer;
user-select: none;
svg {
fill: ${(props) => props.iconColor || props.theme.buttonText};
}
&::-moz-focus-inner {
padding: 0;
border: 0;
}
&:hover {
background: ${(props) => darken(0.05, props.theme.buttonBackground)};
}
&:focus {
transition-duration: 0.05s;
box-shadow: ${(props) => lighten(0.4, props.theme.buttonBackground)} 0px 0px
0px 3px;
outline: none;
}
&:disabled {
cursor: default;
pointer-events: none;
color: ${(props) => props.theme.white50};
}
${(props) =>
props.neutral &&
`
background: ${props.theme.buttonNeutralBackground};
color: ${props.theme.buttonNeutralText};
box-shadow: ${
props.borderOnHover ? "none" : "rgba(0, 0, 0, 0.07) 0px 1px 2px"
};
border: 1px solid ${
props.borderOnHover ? "transparent" : props.theme.buttonNeutralBorder
};
svg {
fill: ${props.iconColor || props.theme.buttonNeutralText};
}
&:hover {
background: ${darken(0.05, props.theme.buttonNeutralBackground)};
border: 1px solid ${props.theme.buttonNeutralBorder};
}
&:focus {
transition-duration: 0.05s;
border: 1px solid ${lighten(0.4, props.theme.buttonBackground)};
box-shadow: ${lighten(0.4, props.theme.buttonBackground)} 0px 0px
0px 2px;
}
&:disabled {
color: ${props.theme.textTertiary};
}
`} ${(props) =>
props.danger &&
`
background: ${props.theme.danger};
color: ${props.theme.white};
&:hover {
background: ${darken(0.05, props.theme.danger)};
}
&:focus {
transition-duration: 0.05s;
box-shadow: ${lighten(0.4, props.theme.danger)} 0px 0px
0px 3px;
}
`};
`;
const Label = styled.span`
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
${(props) => props.hasIcon && "padding-left: 4px;"};
`;
export const Inner = styled.span`
display: flex;
padding: 0 8px;
padding-right: ${(props) => (props.disclosure ? 2 : 8)}px;
line-height: ${(props) => (props.hasIcon ? 24 : 32)}px;
justify-content: center;
align-items: center;
min-height: 30px;
${(props) => props.hasIcon && props.hasText && "padding-left: 4px;"};
${(props) => props.hasIcon && !props.hasText && "padding: 0 4px;"};
`;
export type Props = {
type?: string,
value?: string,
icon?: React.Node,
iconColor?: string,
className?: string,
children?: React.Node,
innerRef?: React.ElementRef<any>,
disclosure?: boolean,
fullwidth?: boolean,
borderOnHover?: boolean,
};
function Button({
type = "text",
icon,
children,
value,
disclosure,
innerRef,
...rest
}: Props) {
const hasText = children !== undefined || value !== undefined;
const hasIcon = icon !== undefined;
return (
<RealButton type={type} ref={innerRef} {...rest}>
<Inner hasIcon={hasIcon} hasText={hasText} disclosure={disclosure}>
{hasIcon && icon}
{hasText && <Label hasIcon={hasIcon}>{children || value}</Label>}
{disclosure && <ExpandedIcon />}
</Inner>
</RealButton>
);
}
export default React.forwardRef<Props, typeof Button>((props, ref) => (
<Button {...props} innerRef={ref} />
));
-112
View File
@@ -1,112 +0,0 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import { color } from 'shared/styles/constants';
import { darken, lighten } from 'polished';
const RealButton = styled.button`
display: inline-block;
margin: 0;
padding: 0;
border: 0;
background: ${color.primary};
color: ${color.white};
border-radius: 4px;
font-size: 15px;
height: 36px;
text-decoration: none;
flex-shrink: 0;
outline: none;
cursor: pointer;
&::-moz-focus-inner {
padding: 0;
border: 0;
}
&:hover {
background: ${darken(0.05, color.primary)};
}
svg {
position: relative;
top: 0.05em;
}
${props =>
props.light &&
`
color: ${color.text};
background: ${lighten(0.08, color.slateLight)};
&:hover {
background: ${color.slateLight};
}
`} ${props =>
props.neutral &&
`
background: ${color.slate};
&:hover {
background: ${darken(0.05, color.slate)};
}
`} ${props =>
props.danger &&
`
background: ${color.danger};
&:hover {
background: ${darken(0.05, color.danger)};
}
`} &:disabled {
background: ${color.slateLight};
cursor: default;
}
`;
const Label = styled.span`
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
${props => props.hasIcon && 'padding-left: 2px;'};
`;
const Inner = styled.span`
padding: 0 12px;
display: flex;
line-height: 28px;
justify-content: center;
align-items: center;
${props =>
props.hasIcon &&
(props.small ? 'padding-left: 6px;' : 'padding-left: 10px;')};
`;
export type Props = {
type?: string,
value?: string,
icon?: React$Element<any>,
className?: string,
children?: React$Element<any>,
};
export default function Button({
type = 'text',
icon,
children,
value,
...rest
}: Props) {
const hasText = children !== undefined || value !== undefined;
const hasIcon = icon !== undefined;
return (
<RealButton {...rest}>
<Inner hasIcon={hasIcon}>
{hasIcon && icon}
{hasText && <Label hasIcon={hasIcon}>{children || value}</Label>}
</Inner>
</RealButton>
);
}
-3
View File
@@ -1,3 +0,0 @@
// @flow
import Button from './Button';
export default Button;
+13
View File
@@ -0,0 +1,13 @@
// @flow
import styled from "styled-components";
import Button, { Inner } from "./Button";
const ButtonLarge = styled(Button)`
height: 40px;
${Inner} {
padding: 4px 16px;
}
`;
export default ButtonLarge;
@@ -1,18 +1,24 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import * as React from "react";
import styled from "styled-components";
import breakpoint from "styled-components-breakpoint";
type Props = {
children?: React.Element<any>,
children?: React.Node,
};
const Container = styled.div`
width: 100%;
margin: 60px;
max-width: 100vw;
padding: 60px 20px;
${breakpoint("tablet")`
padding: 60px;
`};
`;
const Content = styled.div`
max-width: 50em;
max-width: 46em;
margin: 0 auto;
`;
-3
View File
@@ -1,3 +0,0 @@
// @flow
import CenteredContent from './CenteredContent';
export default CenteredContent;
+61
View File
@@ -0,0 +1,61 @@
// @flow
import * as React from "react";
import styled from "styled-components";
import HelpText from "components/HelpText";
import VisuallyHidden from "components/VisuallyHidden";
export type Props = {
checked?: boolean,
label?: string,
labelHidden?: boolean,
className?: string,
note?: string,
short?: boolean,
small?: boolean,
};
const LabelText = styled.span`
font-weight: 500;
margin-left: ${(props) => (props.small ? "6px" : "10px")};
${(props) => (props.small ? `color: ${props.theme.textSecondary}` : "")};
`;
const Wrapper = styled.div`
padding-bottom: 8px;
${(props) => (props.small ? "font-size: 14px" : "")};
`;
const Label = styled.label`
display: flex;
align-items: center;
user-select: none;
`;
export default function Checkbox({
label,
labelHidden,
note,
className,
small,
short,
...rest
}: Props) {
const wrappedLabel = <LabelText small={small}>{label}</LabelText>;
return (
<>
<Wrapper small={small}>
<Label>
<input type="checkbox" {...rest} />
{label &&
(labelHidden ? (
<VisuallyHidden>{wrappedLabel}</VisuallyHidden>
) : (
wrappedLabel
))}
</Label>
{note && <HelpText small>{note}</HelpText>}
</Wrapper>
</>
);
}
+10
View File
@@ -0,0 +1,10 @@
// @flow
import styled from "styled-components";
const ClickablePadding = styled.div`
min-height: 10em;
cursor: ${({ onClick }) => (onClick ? "text" : "default")};
${({ grow }) => grow && `flex-grow: 100;`};
`;
export default ClickablePadding;
+76
View File
@@ -0,0 +1,76 @@
// @flow
import { sortBy, keyBy } from "lodash";
import { observer, inject } from "mobx-react";
import * as React from "react";
import { MAX_AVATAR_DISPLAY } from "shared/constants";
import DocumentPresenceStore from "stores/DocumentPresenceStore";
import ViewsStore from "stores/ViewsStore";
import Document from "models/Document";
import { AvatarWithPresence } from "components/Avatar";
import Facepile from "components/Facepile";
type Props = {
views: ViewsStore,
presence: DocumentPresenceStore,
document: Document,
currentUserId: string,
};
@observer
class Collaborators extends React.Component<Props> {
componentDidMount() {
this.props.views.fetchPage({ documentId: this.props.document.id });
}
render() {
const { document, presence, views, currentUserId } = this.props;
let documentPresence = presence.get(document.id);
documentPresence = documentPresence
? Array.from(documentPresence.values())
: [];
const documentViews = views.inDocument(document.id);
const presentIds = documentPresence.map((p) => p.userId);
const editingIds = documentPresence
.filter((p) => p.isEditing)
.map((p) => p.userId);
// ensure currently present via websocket are always ordered first
const mostRecentViewers = sortBy(
documentViews.slice(0, MAX_AVATAR_DISPLAY),
(view) => {
return presentIds.includes(view.user.id);
}
);
const viewersKeyedByUserId = keyBy(mostRecentViewers, (v) => v.user.id);
const overflow = documentViews.length - mostRecentViewers.length;
return (
<Facepile
users={mostRecentViewers.map((v) => v.user)}
overflow={overflow}
renderAvatar={(user) => {
const isPresent = presentIds.includes(user.id);
const isEditing = editingIds.includes(user.id);
const { lastViewedAt } = viewersKeyedByUserId[user.id];
return (
<AvatarWithPresence
key={user.id}
user={user}
lastViewedAt={lastViewedAt}
isPresent={isPresent}
isEditing={isEditing}
isCurrentUser={currentUserId === user.id}
/>
);
}}
/>
);
}
}
export default inject("views", "presence")(Collaborators);
@@ -1,61 +0,0 @@
// @flow
import React from 'react';
import moment from 'moment';
import styled from 'styled-components';
import Flex from 'shared/components/Flex';
import Avatar from 'components/Avatar';
import Tooltip from 'components/Tooltip';
import Document from 'models/Document';
type Props = { document: Document };
const Collaborators = ({ document }: Props) => {
const {
createdAt,
updatedAt,
createdBy,
updatedBy,
collaborators,
} = document;
let tooltip;
if (createdAt === updatedAt) {
tooltip = `${createdBy.name} published ${moment(createdAt).fromNow()}`;
} else {
tooltip = `${updatedBy.name} modified ${moment(updatedAt).fromNow()}`;
}
return (
<Avatars>
<StyledTooltip tooltip={tooltip} placement="bottom">
{collaborators.map(user => (
<AvatarWrapper>
<Avatar key={user.id} src={user.avatarUrl} />
</AvatarWrapper>
))}
</StyledTooltip>
</Avatars>
);
};
const StyledTooltip = styled(Tooltip)`
display: flex;
flex-direction: row-reverse;
`;
const AvatarWrapper = styled.div`
width: 24px;
height: 24px;
margin-right: -10px;
&:first-child {
margin-right: 0;
}
`;
const Avatars = styled(Flex)`
align-items: center;
flex-direction: row-reverse;
`;
export default Collaborators;
-3
View File
@@ -1,3 +0,0 @@
// @flow
import Collaborators from './Collaborators';
export default Collaborators;
+45
View File
@@ -0,0 +1,45 @@
// @flow
import { inject, observer } from "mobx-react";
import { PrivateCollectionIcon, CollectionIcon } from "outline-icons";
import { getLuminance } from "polished";
import * as React from "react";
import UiStore from "stores/UiStore";
import Collection from "models/Collection";
import { icons } from "components/IconPicker";
type Props = {
collection: Collection,
expanded?: boolean,
size?: number,
ui: UiStore,
};
function ResolvedCollectionIcon({ collection, expanded, size, ui }: Props) {
// If the chosen icon color is very dark then we invert it in dark mode
// otherwise it will be impossible to see against the dark background.
const color =
ui.resolvedTheme === "dark"
? getLuminance(collection.color) > 0.12
? collection.color
: "currentColor"
: collection.color;
if (collection.icon && collection.icon !== "collection") {
try {
const Component = icons[collection.icon].component;
return <Component color={color} size={size} />;
} catch (error) {
console.warn("Failed to render custom icon " + collection.icon);
}
}
if (collection.private) {
return (
<PrivateCollectionIcon color={color} expanded={expanded} size={size} />
);
}
return <CollectionIcon color={color} expanded={expanded} size={size} />;
}
export default inject("ui")(observer(ResolvedCollectionIcon));
-187
View File
@@ -1,187 +0,0 @@
// @flow
import React from 'react';
import { observable, computed, action } from 'mobx';
import { observer } from 'mobx-react';
import styled from 'styled-components';
import Flex from 'shared/components/Flex';
import { LabelText, Outline } from 'components/Input';
import { color, fonts, fontWeight } from 'shared/styles/constants';
import { validateColorHex } from 'shared/utils/color';
const colors = [
'#4E5C6E',
'#19B7FF',
'#7F6BFF',
'#FC7419',
'#FC2D2D',
'#FFE100',
'#14CF9F',
'#EE84F0',
'#2F362F',
];
type Props = {
onSelect: (color: string) => void,
value?: string,
};
@observer
class ColorPicker extends React.Component {
props: Props;
@observable selectedColor: string = colors[0];
@observable customColorValue: string = '';
@observable customColorSelected: boolean;
componentWillMount() {
const { value } = this.props;
if (value && colors.includes(value)) {
this.selectedColor = value;
} else if (value) {
this.customColorSelected = true;
this.customColorValue = value.replace('#', '');
}
}
componentDidMount() {
this.fireCallback();
}
fireCallback = () => {
this.props.onSelect(
this.customColorSelected ? this.customColor : this.selectedColor
);
};
@computed
get customColor(): string {
return this.customColorValue &&
validateColorHex(`#${this.customColorValue}`)
? `#${this.customColorValue}`
: colors[0];
}
@action
setColor = (color: string) => {
this.selectedColor = color;
this.customColorSelected = false;
this.fireCallback();
};
@action
focusOnCustomColor = (event: SyntheticEvent) => {
this.selectedColor = '';
this.customColorSelected = true;
this.fireCallback();
};
@action
setCustomColor = (event: SyntheticEvent) => {
let target = event.target;
if (target instanceof HTMLInputElement) {
const color = target.value;
this.customColorValue = color.replace('#', '');
this.fireCallback();
}
};
render() {
return (
<Flex column>
<LabelText>Color</LabelText>
<StyledOutline justify="space-between">
<Flex>
{colors.map(color => (
<Swatch
key={color}
color={color}
active={
color === this.selectedColor && !this.customColorSelected
}
onClick={() => this.setColor(color)}
/>
))}
</Flex>
<Flex justify="flex-end">
<strong>Custom color:</strong>
<HexHash>#</HexHash>
<CustomColorInput
placeholder="FFFFFF"
onFocus={this.focusOnCustomColor}
onChange={this.setCustomColor}
value={this.customColorValue}
maxLength={6}
/>
<Swatch
color={this.customColor}
active={this.customColorSelected}
/>
</Flex>
</StyledOutline>
</Flex>
);
}
}
type SwatchProps = {
onClick?: () => void,
color?: string,
active?: boolean,
};
const Swatch = ({ onClick, ...props }: SwatchProps) => (
<SwatchOutset onClick={onClick} {...props}>
<SwatchInset {...props} />
</SwatchOutset>
);
const SwatchOutset = styled(Flex)`
width: 24px;
height: 24px;
margin-right: 5px;
border: 2px solid ${({ active, color }) => (active ? color : 'transparent')};
border-radius: 2px;
background: ${({ color }) => color};
${({ onClick }) => onClick && `cursor: pointer;`} &:last-child {
margin-right: 0;
}
`;
const SwatchInset = styled(Flex)`
width: 20px;
height: 20px;
border: 1px solid ${({ active, color }) => (active ? 'white' : 'transparent')};
border-radius: 2px;
background: ${({ color }) => color};
`;
const StyledOutline = styled(Outline)`
padding: 5px;
`;
const HexHash = styled.div`
margin-left: 12px;
padding-bottom: 0;
font-weight: ${fontWeight.medium};
user-select: none;
`;
const CustomColorInput = styled.input`
border: 0;
flex: 1;
width: 65px;
margin-right: 12px;
padding-bottom: 0;
outline: none;
background: none;
font-family: ${fonts.monospace};
font-weight: ${fontWeight.medium};
&::placeholder {
color: ${color.slate};
font-family: ${fonts.monospace};
font-weight: ${fontWeight.medium};
}
`;
export default ColorPicker;
-3
View File
@@ -1,3 +0,0 @@
// @flow
import ColorPicker from './ColorPicker';
export default ColorPicker;
@@ -1,27 +1,25 @@
// @flow
import React, { PureComponent } from 'react';
import copy from 'copy-to-clipboard';
import copy from "copy-to-clipboard";
import * as React from "react";
type Props = {
text: string,
children?: React.Element<any>,
children?: React.Node,
onClick?: () => void,
onCopy: () => void,
};
class CopyToClipboard extends PureComponent {
props: Props;
onClick = (ev: SyntheticEvent) => {
class CopyToClipboard extends React.PureComponent<Props> {
onClick = (ev: SyntheticEvent<>) => {
const { text, onCopy, children } = this.props;
const elem = React.Children.only(children);
copy(text, {
debug: __DEV__,
debug: process.env.NODE_ENV !== "production",
});
if (onCopy) onCopy();
if (elem && elem.props && typeof elem.props.onClick === 'function') {
if (elem && elem.props && typeof elem.props.onClick === "function") {
elem.props.onClick(ev);
}
};
-3
View File
@@ -1,3 +0,0 @@
// @flow
import CopyToClipboard from './CopyToClipboard';
export default CopyToClipboard;
+24
View File
@@ -0,0 +1,24 @@
// @flow
import * as React from "react";
type Props = {
delay?: number,
children: React.Node,
};
export default function DelayedMount({ delay = 250, children }: Props) {
const [isShowing, setShowing] = React.useState(false);
React.useEffect(() => {
const timeout = setTimeout(() => setShowing(true), delay);
return () => {
clearTimeout(timeout);
};
}, []);
if (!isShowing) {
return null;
}
return children;
}
-21
View File
@@ -1,21 +0,0 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import Flex from 'shared/components/Flex';
const Divider = () => {
return (
<Flex auto justify="center">
<Content />
</Flex>
);
};
const Content = styled.span`
display: flex;
width: 50%;
margin: 20px 0;
border-bottom: 1px solid #eee;
`;
export default Divider;
-3
View File
@@ -1,3 +0,0 @@
// @flow
import Divider from './Divider';
export default Divider;
@@ -0,0 +1,149 @@
// @flow
import ArrowKeyNavigation from "boundless-arrow-key-navigation";
import { observable, action } from "mobx";
import { observer, inject } from "mobx-react";
import * as React from "react";
import { type RouterHistory, type Match } from "react-router-dom";
import { Waypoint } from "react-waypoint";
import styled from "styled-components";
import { DEFAULT_PAGINATION_LIMIT } from "stores/BaseStore";
import DocumentsStore from "stores/DocumentsStore";
import RevisionsStore from "stores/RevisionsStore";
import Flex from "components/Flex";
import { ListPlaceholder } from "components/LoadingPlaceholder";
import Revision from "./components/Revision";
import { documentHistoryUrl } from "utils/routeHelpers";
type Props = {
match: Match,
documents: DocumentsStore,
revisions: RevisionsStore,
history: RouterHistory,
};
@observer
class DocumentHistory extends React.Component<Props> {
@observable isLoaded: boolean = false;
@observable isFetching: boolean = false;
@observable offset: number = 0;
@observable allowLoadMore: boolean = true;
async componentDidMount() {
await this.loadMoreResults();
this.selectFirstRevision();
}
fetchResults = async () => {
this.isFetching = true;
const limit = DEFAULT_PAGINATION_LIMIT;
const results = await this.props.revisions.fetchPage({
limit,
offset: this.offset,
documentId: this.props.match.params.documentSlug,
});
if (
results &&
(results.length === 0 || results.length < DEFAULT_PAGINATION_LIMIT)
) {
this.allowLoadMore = false;
} else {
this.offset += DEFAULT_PAGINATION_LIMIT;
}
this.isLoaded = true;
this.isFetching = false;
};
selectFirstRevision = () => {
if (this.revisions.length) {
const document = this.props.documents.getByUrl(
this.props.match.params.documentSlug
);
if (!document) return;
this.props.history.replace(
documentHistoryUrl(document, this.revisions[0].id)
);
}
};
@action
loadMoreResults = async () => {
// Don't paginate if there aren't more results or were in the middle of fetching
if (!this.allowLoadMore || this.isFetching) return;
await this.fetchResults();
};
get revisions() {
const document = this.props.documents.getByUrl(
this.props.match.params.documentSlug
);
if (!document) return [];
return this.props.revisions.getDocumentRevisions(document.id);
}
render() {
const document = this.props.documents.getByUrl(
this.props.match.params.documentSlug
);
const showLoading = (!this.isLoaded && this.isFetching) || !document;
return (
<Sidebar>
<Wrapper column>
{showLoading ? (
<Loading>
<ListPlaceholder count={5} />
</Loading>
) : (
<ArrowKeyNavigation
mode={ArrowKeyNavigation.mode.VERTICAL}
defaultActiveChildIndex={0}
>
{this.revisions.map((revision, index) => (
<Revision
key={revision.id}
revision={revision}
document={document}
showMenu={index !== 0}
selected={this.props.match.params.revisionId === revision.id}
/>
))}
</ArrowKeyNavigation>
)}
{this.allowLoadMore && (
<Waypoint key={this.offset} onEnter={this.loadMoreResults} />
)}
</Wrapper>
</Sidebar>
);
}
}
const Loading = styled.div`
margin: 0 16px;
`;
const Wrapper = styled(Flex)`
position: fixed;
top: 0;
right: 0;
z-index: 1;
min-width: ${(props) => props.theme.sidebarWidth};
height: 100%;
overflow-y: auto;
overscroll-behavior: none;
`;
const Sidebar = styled(Flex)`
background: ${(props) => props.theme.background};
min-width: ${(props) => props.theme.sidebarWidth};
border-left: 1px solid ${(props) => props.theme.divider};
z-index: 1;
`;
export default inject("documents", "revisions")(DocumentHistory);
@@ -0,0 +1,89 @@
// @flow
import format from "date-fns/format";
import { MoreIcon } from "outline-icons";
import * as React from "react";
import { NavLink } from "react-router-dom";
import styled, { withTheme } from "styled-components";
import Document from "models/Document";
import Revision from "models/Revision";
import Avatar from "components/Avatar";
import Flex from "components/Flex";
import Time from "components/Time";
import RevisionMenu from "menus/RevisionMenu";
import { documentHistoryUrl } from "utils/routeHelpers";
type Props = {
theme: Object,
showMenu: boolean,
selected: boolean,
document: Document,
revision: Revision,
};
class RevisionListItem extends React.Component<Props> {
render() {
const { revision, document, showMenu, selected, theme } = this.props;
return (
<StyledNavLink
to={documentHistoryUrl(document, revision.id)}
activeStyle={{ background: theme.primary, color: theme.white }}
>
<Author>
<StyledAvatar src={revision.createdBy.avatarUrl} />{" "}
{revision.createdBy.name}
</Author>
<Meta>
<Time dateTime={revision.createdAt}>
{format(revision.createdAt, "MMMM Do, YYYY h:mm a")}
</Time>
</Meta>
{showMenu && (
<StyledRevisionMenu
document={document}
revision={revision}
label={
<MoreIcon color={selected ? theme.white : theme.textTertiary} />
}
/>
)}
</StyledNavLink>
);
}
}
const StyledAvatar = styled(Avatar)`
border-color: transparent;
margin-right: 4px;
`;
const StyledRevisionMenu = styled(RevisionMenu)`
position: absolute;
right: 16px;
top: 20px;
`;
const StyledNavLink = styled(NavLink)`
color: ${(props) => props.theme.text};
display: block;
padding: 8px 16px;
font-size: 15px;
position: relative;
`;
const Author = styled(Flex)`
font-weight: 500;
padding: 0;
margin: 0;
`;
const Meta = styled.p`
font-size: 14px;
opacity: 0.75;
margin: 0 0 2px;
padding: 0;
`;
export default withTheme(RevisionListItem);
+3
View File
@@ -0,0 +1,3 @@
// @flow
import DocumentHistory from "./DocumentHistory";
export default DocumentHistory;
+25
View File
@@ -0,0 +1,25 @@
// @flow
import ArrowKeyNavigation from "boundless-arrow-key-navigation";
import * as React from "react";
import Document from "models/Document";
import DocumentPreview from "components/DocumentPreview";
type Props = {
documents: Document[],
limit?: number,
};
export default function DocumentList({ limit, documents, ...rest }: Props) {
const items = limit ? documents.splice(0, limit) : documents;
return (
<ArrowKeyNavigation
mode={ArrowKeyNavigation.mode.VERTICAL}
defaultActiveChildIndex={0}
>
{items.map((document) => (
<DocumentPreview key={document.id} document={document} {...rest} />
))}
</ArrowKeyNavigation>
);
}
@@ -1,27 +0,0 @@
// @flow
import React from 'react';
import Document from 'models/Document';
import DocumentPreview from 'components/DocumentPreview';
import ArrowKeyNavigation from 'boundless-arrow-key-navigation';
class DocumentList extends React.Component {
props: {
documents: Array<Document>,
};
render() {
return (
<ArrowKeyNavigation
mode={ArrowKeyNavigation.mode.VERTICAL}
defaultActiveChildIndex={0}
>
{this.props.documents &&
this.props.documents.map(document => (
<DocumentPreview key={document.id} document={document} />
))}
</ArrowKeyNavigation>
);
}
}
export default DocumentList;
-3
View File
@@ -1,3 +0,0 @@
// @flow
import DocumentList from './DocumentList';
export default DocumentList;
+123
View File
@@ -0,0 +1,123 @@
// @flow
import { inject, observer } from "mobx-react";
import * as React from "react";
import { Link } from "react-router-dom";
import styled from "styled-components";
import AuthStore from "stores/AuthStore";
import CollectionsStore from "stores/CollectionsStore";
import Document from "models/Document";
import Breadcrumb from "components/Breadcrumb";
import Flex from "components/Flex";
import Time from "components/Time";
const Container = styled(Flex)`
color: ${(props) => props.theme.textTertiary};
font-size: 13px;
white-space: nowrap;
overflow: hidden;
`;
const Modified = styled.span`
color: ${(props) =>
props.highlight ? props.theme.text : props.theme.textTertiary};
font-weight: ${(props) => (props.highlight ? "600" : "400")};
`;
type Props = {
collections: CollectionsStore,
auth: AuthStore,
showCollection?: boolean,
showPublished?: boolean,
document: Document,
children: React.Node,
to?: string,
};
function DocumentMeta({
auth,
collections,
showPublished,
showCollection,
document,
children,
to,
...rest
}: Props) {
const {
modifiedSinceViewed,
updatedAt,
updatedBy,
createdAt,
publishedAt,
archivedAt,
deletedAt,
isDraft,
} = document;
// Prevent meta information from displaying if updatedBy is not available.
// Currently the situation where this is true is rendering share links.
if (!updatedBy) {
return null;
}
let content;
if (deletedAt) {
content = (
<span>
deleted <Time dateTime={deletedAt} /> ago
</span>
);
} else if (archivedAt) {
content = (
<span>
archived <Time dateTime={archivedAt} /> ago
</span>
);
} else if (createdAt === updatedAt) {
content = (
<span>
created <Time dateTime={updatedAt} /> ago
</span>
);
} else if (publishedAt && (publishedAt === updatedAt || showPublished)) {
content = (
<span>
published <Time dateTime={publishedAt} /> ago
</span>
);
} else if (isDraft) {
content = (
<span>
saved <Time dateTime={updatedAt} /> ago
</span>
);
} else {
content = (
<Modified highlight={modifiedSinceViewed}>
updated <Time dateTime={updatedAt} /> ago
</Modified>
);
}
const collection = collections.get(document.collectionId);
const updatedByMe = auth.user && auth.user.id === updatedBy.id;
return (
<Container align="center" {...rest}>
{updatedByMe ? "You" : updatedBy.name}&nbsp;
{to ? <Link to={to}>{content}</Link> : content}
{showCollection && collection && (
<span>
&nbsp;in&nbsp;
<strong>
<Breadcrumb document={document} onlyText />
</strong>
</span>
)}
{children}
</Container>
);
}
export default inject("collections", "auth")(observer(DocumentMeta));
+48
View File
@@ -0,0 +1,48 @@
// @flow
import { inject } from "mobx-react";
import * as React from "react";
import styled from "styled-components";
import ViewsStore from "stores/ViewsStore";
import Document from "models/Document";
import DocumentMeta from "components/DocumentMeta";
type Props = {|
views: ViewsStore,
document: Document,
isDraft: boolean,
to?: string,
|};
function DocumentMetaWithViews({ views, to, isDraft, document }: Props) {
const totalViews = views.countForDocument(document.id);
return (
<Meta document={document} to={to}>
{totalViews && !isDraft ? (
<>
&nbsp;&middot; Viewed{" "}
{totalViews === 1 ? "once" : `${totalViews} times`}
</>
) : null}
</Meta>
);
}
const Meta = styled(DocumentMeta)`
margin: -12px 0 2em 0;
font-size: 14px;
a {
color: inherit;
&:hover {
text-decoration: underline;
}
}
@media print {
display: none;
}
`;
export default inject("views")(DocumentMetaWithViews);
+187 -67
View File
@@ -1,27 +1,150 @@
// @flow
import React, { Component } from 'react';
import { observer } from 'mobx-react';
import { Link } from 'react-router-dom';
import Document from 'models/Document';
import styled from 'styled-components';
import { color } from 'shared/styles/constants';
import StarredIcon from 'components/Icon/StarredIcon';
import PublishingInfo from './components/PublishingInfo';
import { observer } from "mobx-react";
import { StarredIcon, PlusIcon } from "outline-icons";
import * as React from "react";
import { Link, withRouter, type RouterHistory } from "react-router-dom";
import styled, { withTheme } from "styled-components";
import Document from "models/Document";
import Badge from "components/Badge";
import Button from "components/Button";
import DocumentMeta from "components/DocumentMeta";
import Flex from "components/Flex";
import Highlight from "components/Highlight";
import Tooltip from "components/Tooltip";
import DocumentMenu from "menus/DocumentMenu";
import { newDocumentUrl } from "utils/routeHelpers";
type Props = {
history: RouterHistory,
document: Document,
highlight?: ?string,
context?: ?string,
showCollection?: boolean,
innerRef?: Function,
showPublished?: boolean,
showPin?: boolean,
showDraft?: boolean,
showTemplate?: boolean,
};
const StyledStar = styled(({ solid, ...props }) => (
<StarredIcon color={solid ? color.black : color.text} {...props} />
const SEARCH_RESULT_REGEX = /<b\b[^>]*>(.*?)<\/b>/gi;
@observer
class DocumentPreview extends React.Component<Props> {
handleStar = (ev: SyntheticEvent<>) => {
ev.preventDefault();
ev.stopPropagation();
this.props.document.star();
};
handleUnstar = (ev: SyntheticEvent<>) => {
ev.preventDefault();
ev.stopPropagation();
this.props.document.unstar();
};
replaceResultMarks = (tag: string) => {
// don't use SEARCH_RESULT_REGEX here as it causes
// an infinite loop to trigger a regex inside it's own callback
return tag.replace(/<b\b[^>]*>(.*?)<\/b>/gi, "$1");
};
handleNewFromTemplate = (event) => {
event.preventDefault();
event.stopPropagation();
const { document } = this.props;
this.props.history.push(
newDocumentUrl(document.collectionId, {
templateId: document.id,
})
);
};
render() {
const {
document,
showCollection,
showPublished,
showPin,
showDraft = true,
showTemplate,
highlight,
context,
} = this.props;
const queryIsInTitle =
!!highlight &&
!!document.title.toLowerCase().includes(highlight.toLowerCase());
return (
<DocumentLink
to={{
pathname: document.url,
state: { title: document.titleWithDefault },
}}
>
<Heading>
<Title text={document.titleWithDefault} highlight={highlight} />
{!document.isDraft &&
!document.isArchived &&
!document.isTemplate && (
<Actions>
{document.isStarred ? (
<StyledStar onClick={this.handleUnstar} solid />
) : (
<StyledStar onClick={this.handleStar} />
)}
</Actions>
)}
{document.isDraft && showDraft && (
<Tooltip tooltip="Only visible to you" delay={500} placement="top">
<Badge>Draft</Badge>
</Tooltip>
)}
{document.isTemplate && showTemplate && (
<Badge primary>Template</Badge>
)}
<SecondaryActions>
{document.isTemplate &&
!document.isArchived &&
!document.isDeleted && (
<Button
onClick={this.handleNewFromTemplate}
icon={<PlusIcon />}
neutral
>
New doc
</Button>
)}
&nbsp;
<DocumentMenu document={document} showPin={showPin} />
</SecondaryActions>
</Heading>
{!queryIsInTitle && (
<ResultContext
text={context}
highlight={highlight ? SEARCH_RESULT_REGEX : undefined}
processResult={this.replaceResultMarks}
/>
)}
<DocumentMeta
document={document}
showCollection={showCollection}
showPublished={showPublished}
/>
</DocumentLink>
);
}
}
const StyledStar = withTheme(styled(({ solid, theme, ...props }) => (
<StarredIcon color={theme.text} {...props} />
))`
position: absolute;
opacity: ${props => (props.solid ? '1 !important' : 0)};
flex-shrink: 0;
opacity: ${(props) => (props.solid ? "1 !important" : 0)};
transition: all 100ms ease-in-out;
margin-left: 2px;
&:hover {
transform: scale(1.1);
@@ -29,25 +152,41 @@ const StyledStar = styled(({ solid, ...props }) => (
&:active {
transform: scale(0.95);
}
`);
const SecondaryActions = styled(Flex)`
align-items: center;
position: absolute;
right: 16px;
top: 50%;
transform: translateY(-50%);
`;
const DocumentLink = styled(Link)`
display: block;
margin: 0 -16px;
padding: 10px 16px;
margin: 10px -8px;
padding: 6px 8px;
border-radius: 8px;
border: 2px solid transparent;
max-height: 50vh;
min-width: 100%;
max-width: calc(100vw - 40px);
overflow: hidden;
position: relative;
${SecondaryActions} {
opacity: 0;
}
&:hover,
&:active,
&:focus {
background: ${color.smokeLight};
border: 2px solid ${color.smoke};
background: ${(props) => props.theme.listItemHoverBackground};
outline: none;
${SecondaryActions} {
opacity: 1;
}
${StyledStar} {
opacity: 0.5;
@@ -56,57 +195,38 @@ const DocumentLink = styled(Link)`
}
}
}
&:focus {
border: 2px solid ${color.slateDark};
}
h3 {
margin-top: 0;
margin-bottom: 0.25em;
}
`;
@observer
class DocumentPreview extends Component {
props: Props;
const Heading = styled.h3`
display: flex;
align-items: center;
height: 24px;
margin-top: 0;
margin-bottom: 0.25em;
overflow: hidden;
white-space: nowrap;
color: ${(props) => props.theme.text};
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
`;
star = (ev: SyntheticEvent) => {
ev.preventDefault();
ev.stopPropagation();
this.props.document.star();
};
const Actions = styled(Flex)`
margin-left: 4px;
align-items: center;
`;
unstar = (ev: SyntheticEvent) => {
ev.preventDefault();
ev.stopPropagation();
this.props.document.unstar();
};
const Title = styled(Highlight)`
max-width: 90%;
overflow: hidden;
text-overflow: ellipsis;
`;
render() {
const { document, showCollection, innerRef, ...rest } = this.props;
const ResultContext = styled(Highlight)`
display: block;
color: ${(props) => props.theme.textTertiary};
font-size: 14px;
margin-top: -0.25em;
margin-bottom: 0.25em;
`;
return (
<DocumentLink to={document.url} innerRef={innerRef} {...rest}>
<h3>
{document.title}
{document.starred ? (
<a onClick={this.unstar}>
<StyledStar solid />
</a>
) : (
<a onClick={this.star}>
<StyledStar />
</a>
)}
</h3>
<PublishingInfo
document={document}
collection={showCollection ? document.collection : undefined}
/>
</DocumentLink>
);
}
}
export default DocumentPreview;
export default withRouter(DocumentPreview);
@@ -1,62 +0,0 @@
// @flow
import React, { Component } from 'react';
import moment from 'moment';
import styled from 'styled-components';
import { color } from 'shared/styles/constants';
import Collection from 'models/Collection';
import Document from 'models/Document';
import Flex from 'shared/components/Flex';
const Container = styled(Flex)`
color: ${color.slate};
font-size: 13px;
`;
const Modified = styled.span`
color: ${props => (props.highlight ? color.slateDark : color.slate)};
font-weight: ${props => (props.highlight ? '600' : '400')};
`;
class PublishingInfo extends Component {
props: {
collection?: Collection,
document: Document,
views?: number,
};
render() {
const { collection, document } = this.props;
const {
modifiedSinceViewed,
createdAt,
updatedAt,
createdBy,
updatedBy,
} = document;
return (
<Container align="center">
{createdAt === updatedAt ? (
<span>
{createdBy.name} published {moment(createdAt).fromNow()}
</span>
) : (
<span>
{updatedBy.name}
<Modified highlight={modifiedSinceViewed}>
{' '}
modified {moment(updatedAt).fromNow()}
</Modified>
</span>
)}
{collection && (
<span>
&nbsp;in <strong>{collection.name}</strong>
</span>
)}
</Container>
);
}
}
export default PublishingInfo;
+1 -1
View File
@@ -1,3 +1,3 @@
// @flow
import DocumentPreview from './DocumentPreview';
import DocumentPreview from "./DocumentPreview";
export default DocumentPreview;
@@ -1,42 +0,0 @@
// @flow
import { observable, action } from 'mobx';
import invariant from 'invariant';
import { client } from 'utils/ApiClient';
import type { User } from 'types';
type View = {
user: User,
count: number,
};
class DocumentViewersStore {
documentId: string;
@observable viewers: Array<View>;
@observable isFetching: boolean;
@action
fetchViewers = async () => {
this.isFetching = true;
try {
const res = await client.post(
'/views.list',
{
id: this.documentId,
},
{ cache: true }
);
invariant(res && res.data, 'Data should be available');
this.viewers = res.data.users;
} catch (e) {
console.error('Something went wrong');
}
this.isFetching = false;
};
constructor(documentId: string) {
this.documentId = documentId;
}
}
export default DocumentViewersStore;
@@ -1,72 +0,0 @@
// @flow
import React, { Component } from 'react';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
import Popover from 'components/Popover';
import styled from 'styled-components';
import DocumentViewers from './components/DocumentViewers';
import DocumentViewersStore from './DocumentViewersStore';
import Flex from 'shared/components/Flex';
const Container = styled(Flex)`
font-size: 13px;
user-select: none;
a {
color: #ccc;
&:hover {
color: #aaa;
}
}
`;
type Props = {
documentId: string,
count: number,
};
@observer
class DocumentViews extends Component {
@observable opened: boolean = false;
anchor: HTMLElement;
store: DocumentViewersStore;
props: Props;
constructor(props: Props) {
super(props);
this.store = new DocumentViewersStore(props.documentId);
}
openPopover = () => {
this.opened = true;
};
closePopover = () => {
this.opened = false;
};
setRef = (ref: HTMLElement) => {
this.anchor = ref;
};
render() {
return (
<Container align="center">
<a ref={this.setRef} onClick={this.openPopover}>
Viewed {this.props.count} {this.props.count === 1 ? 'time' : 'times'}
</a>
{this.opened && (
<Popover anchor={this.anchor} onClose={this.closePopover}>
<DocumentViewers
onMount={this.store.fetchViewers}
viewers={this.store.viewers}
/>
</Popover>
)}
</Container>
);
}
}
export default DocumentViews;
@@ -1,54 +0,0 @@
// @flow
import React, { Component } from 'react';
import Flex from 'shared/components/Flex';
import styled from 'styled-components';
import map from 'lodash/map';
import Avatar from 'components/Avatar';
import Scrollable from 'components/Scrollable';
type Props = {
viewers: Array<Object>,
onMount: Function,
};
const List = styled.ul`
list-style: none;
font-size: 13px;
margin: -4px 0;
padding: 0;
li {
padding: 4px 0;
}
`;
const UserName = styled.span`
padding-left: 8px;
`;
class DocumentViewers extends Component {
props: Props;
componentDidMount() {
this.props.onMount();
}
render() {
return (
<Scrollable>
<List>
{map(this.props.viewers, view => (
<li key={view.user.id}>
<Flex align="center">
<Avatar src={view.user.avatarUrl} />{' '}
<UserName>{view.user.name}</UserName>
</Flex>
</li>
))}
</List>
</Scrollable>
);
}
}
export default DocumentViewers;
@@ -1,3 +0,0 @@
// @flow
import DocumentViewers from './DocumentViewers';
export default DocumentViewers;
-3
View File
@@ -1,3 +0,0 @@
// @flow
import DocumentViews from './DocumentViews';
export default DocumentViews;
+113
View File
@@ -0,0 +1,113 @@
// @flow
import invariant from "invariant";
import { observable } from "mobx";
import { observer, inject } from "mobx-react";
import * as React from "react";
import Dropzone from "react-dropzone";
import { withRouter, type RouterHistory, type Match } from "react-router-dom";
import { createGlobalStyle } from "styled-components";
import DocumentsStore from "stores/DocumentsStore";
import LoadingIndicator from "components/LoadingIndicator";
import importFile from "utils/importFile";
const EMPTY_OBJECT = {};
let importingLock = false;
type Props = {
children: React.Node,
collectionId: string,
documentId?: string,
activeClassName?: string,
rejectClassName?: string,
documents: DocumentsStore,
disabled: boolean,
location: Object,
match: Match,
history: RouterHistory,
staticContext: Object,
};
export const GlobalStyles = createGlobalStyle`
.activeDropZone {
border-radius: 4px;
background: ${(props) => props.theme.slateDark};
svg { fill: ${(props) => props.theme.white}; }
}
.activeDropZone a {
color: ${(props) => props.theme.white} !important;
}
`;
@observer
class DropToImport extends React.Component<Props> {
@observable isImporting: boolean = false;
onDropAccepted = async (files = []) => {
if (importingLock) return;
this.isImporting = true;
importingLock = true;
try {
let collectionId = this.props.collectionId;
const documentId = this.props.documentId;
const redirect = files.length === 1;
if (documentId && !collectionId) {
const document = await this.props.documents.fetch(documentId);
invariant(document, "Document not available");
collectionId = document.collectionId;
}
for (const file of files) {
const doc = await importFile({
documents: this.props.documents,
file,
documentId,
collectionId,
});
if (redirect) {
this.props.history.push(doc.url);
}
}
} finally {
this.isImporting = false;
importingLock = false;
}
};
render() {
const {
documentId,
collectionId,
documents,
disabled,
location,
match,
history,
staticContext,
...rest
} = this.props;
if (this.props.disabled) return this.props.children;
return (
<Dropzone
accept="text/markdown, text/plain"
onDropAccepted={this.onDropAccepted}
style={EMPTY_OBJECT}
disableClick
disablePreview
multiple
{...rest}
>
{this.isImporting && <LoadingIndicator />}
{this.props.children}
</Dropzone>
);
}
}
export default inject("documents")(withRouter(DropToImport));
-123
View File
@@ -1,123 +0,0 @@
// @flow
import React, { Component } from 'react';
import { observable } from 'mobx';
import { observer, inject } from 'mobx-react';
import { injectGlobal } from 'styled-components';
import { color } from 'shared/styles/constants';
import invariant from 'invariant';
import _ from 'lodash';
import Dropzone from 'react-dropzone';
import Document from 'models/Document';
import DocumentsStore from 'stores/DocumentsStore';
import LoadingIndicator from 'components/LoadingIndicator';
type Props = {
children?: React$Element<any>,
collectionId: string,
documentId?: string,
activeClassName?: string,
rejectClassName?: string,
documents: DocumentsStore,
disabled: boolean,
dropzoneRef: Function,
history: Object,
};
// eslint-disable-next-line
injectGlobal`
.activeDropZone {
background: ${color.slateDark};
svg { fill: ${color.white}; }
}
.activeDropZone a {
color: ${color.white} !important;
}
`;
@observer
class DropToImport extends Component {
@observable isImporting: boolean = false;
props: Props;
importFile = async ({ file, documentId, collectionId, redirect }) => {
const reader = new FileReader();
reader.onload = async ev => {
const text = ev.target.result;
let data = {
parentDocument: undefined,
collection: { id: collectionId },
text,
};
if (documentId) data.parentDocument = documentId;
let document = new Document(data);
document = await document.save();
this.props.documents.add(document);
if (redirect && this.props.history) {
this.props.history.push(document.url);
}
};
reader.readAsText(file);
};
onDropAccepted = async (files = []) => {
this.isImporting = true;
try {
let collectionId = this.props.collectionId;
const documentId = this.props.documentId;
const redirect = files.length === 1;
if (documentId && !collectionId) {
const document = await this.props.documents.fetch(documentId);
invariant(document, 'Document not available');
collectionId = document.collection.id;
}
for (const file of files) {
await this.importFile({ file, documentId, collectionId, redirect });
}
} catch (err) {
// TODO: show error alert.
} finally {
this.isImporting = false;
}
};
render() {
const props = _.omit(
this.props,
'history',
'documentId',
'collectionId',
'documents',
'disabled',
'dropzoneRef',
'menuOpen'
);
if (this.props.disabled) return this.props.children;
return (
<Dropzone
accept="text/markdown, text/plain"
onDropAccepted={this.onDropAccepted}
style={{}}
disableClick
disablePreview
multiple
ref={this.props.dropzoneRef}
{...props}
>
{this.isImporting && <LoadingIndicator />}
{this.props.children}
</Dropzone>
);
}
}
export default inject('documents')(DropToImport);
-3
View File
@@ -1,3 +0,0 @@
// @flow
import DropToImport from './DropToImport';
export default DropToImport;
+242 -57
View File
@@ -1,72 +1,227 @@
// @flow
import React, { Component } from 'react';
import invariant from 'invariant';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
import styled from 'styled-components';
import { PortalWithState } from 'react-portal';
import Flex from 'shared/components/Flex';
import { color } from 'shared/styles/constants';
import { fadeAndScaleIn } from 'shared/styles/animations';
import invariant from "invariant";
import { observable } from "mobx";
import { observer } from "mobx-react";
import { MoreIcon } from "outline-icons";
import { rgba } from "polished";
import * as React from "react";
import { PortalWithState } from "react-portal";
import styled from "styled-components";
import { fadeAndScaleIn } from "shared/styles/animations";
import Flex from "components/Flex";
import NudeButton from "components/NudeButton";
let previousClosePortal;
let counter = 0;
type Children =
| React.Node
| ((options: { closePortal: () => void }) => React.Node);
type Props = {
label: React.Element<*>,
label?: React.Node,
onOpen?: () => void,
onClose?: () => void,
children?: React.Element<*>,
children?: Children,
className?: string,
hover?: boolean,
style?: Object,
position?: "left" | "right" | "center",
};
@observer
class DropdownMenu extends Component {
props: Props;
@observable top: number;
@observable left: number;
@observable right: number;
class DropdownMenu extends React.Component<Props> {
id: string = `menu${counter++}`;
closeTimeout: TimeoutID;
handleOpen = (openPortal: SyntheticEvent => void) => {
return (ev: SyntheticMouseEvent) => {
@observable top: ?number;
@observable bottom: ?number;
@observable right: ?number;
@observable left: ?number;
@observable position: "left" | "right" | "center";
@observable fixed: ?boolean;
@observable bodyRect: ClientRect;
@observable labelRect: ClientRect;
@observable dropdownRef: { current: null | HTMLElement } = React.createRef();
@observable menuRef: { current: null | HTMLElement } = React.createRef();
handleOpen = (
openPortal: (SyntheticEvent<>) => void,
closePortal: () => void
) => {
return (ev: SyntheticMouseEvent<HTMLElement>) => {
ev.preventDefault();
ev.stopPropagation();
const currentTarget = ev.currentTarget;
invariant(document.body, 'why you not here');
invariant(document.body, "why you not here");
if (currentTarget instanceof HTMLDivElement) {
const bodyRect = document.body.getBoundingClientRect();
const targetRect = currentTarget.getBoundingClientRect();
this.top = targetRect.bottom - bodyRect.top;
this.right = bodyRect.width - targetRect.left - targetRect.width;
this.bodyRect = document.body.getBoundingClientRect();
this.labelRect = currentTarget.getBoundingClientRect();
this.top = this.labelRect.bottom - this.bodyRect.top;
this.bottom = undefined;
this.position = this.props.position || "left";
if (currentTarget.parentElement) {
const triggerParentStyle = getComputedStyle(
currentTarget.parentElement
);
if (triggerParentStyle.position === "static") {
this.fixed = true;
this.top = this.labelRect.bottom;
}
}
this.initPosition();
// attempt to keep only one flyout menu open at once
if (previousClosePortal && !this.props.hover) {
previousClosePortal();
}
previousClosePortal = closePortal;
openPortal(ev);
}
};
};
initPosition() {
if (this.position === "left") {
this.right =
this.bodyRect.width - this.labelRect.left - this.labelRect.width;
} else if (this.position === "center") {
this.left = this.labelRect.left + this.labelRect.width / 2;
} else {
this.left = this.labelRect.left;
}
}
onOpen = () => {
if (typeof this.props.onOpen === "function") {
this.props.onOpen();
}
this.fitOnTheScreen();
};
fitOnTheScreen() {
if (!this.dropdownRef || !this.dropdownRef.current) return;
const el = this.dropdownRef.current;
const sticksOutPastBottomEdge =
el.clientHeight + this.top > window.innerHeight;
if (sticksOutPastBottomEdge) {
this.top = undefined;
this.bottom = this.fixed ? 0 : -1 * window.pageYOffset;
} else {
this.bottom = undefined;
}
if (this.position === "left" || this.position === "right") {
const totalWidth =
Math.sign(this.position === "left" ? -1 : 1) * el.offsetLeft +
el.scrollWidth;
const isVisible = totalWidth < window.innerWidth;
if (!isVisible) {
if (this.position === "right") {
this.position = "left";
this.left = undefined;
} else if (this.position === "left") {
this.position = "right";
this.right = undefined;
}
}
}
this.initPosition();
this.forceUpdate();
}
closeAfterTimeout = (closePortal: () => void) => () => {
if (this.closeTimeout) {
clearTimeout(this.closeTimeout);
}
this.closeTimeout = setTimeout(closePortal, 500);
};
clearCloseTimeout = () => {
if (this.closeTimeout) {
clearTimeout(this.closeTimeout);
}
};
render() {
const { className, hover, label, children } = this.props;
return (
<div>
<div className={className}>
<PortalWithState
onOpen={this.props.onOpen}
onOpen={this.onOpen}
onClose={this.props.onClose}
closeOnEsc
closeOnOutsideClick
closeOnEsc
>
{({ closePortal, openPortal, portal }) => [
<Label onClick={this.handleOpen(openPortal)} key="label">
{this.props.label}
</Label>,
portal(
<Menu
key="menu"
onClick={closePortal}
style={this.props.style}
left={this.left}
top={this.top}
right={this.right}
{({ closePortal, openPortal, isOpen, portal }) => (
<>
<Label
onMouseMove={hover ? this.clearCloseTimeout : undefined}
onMouseOut={
hover ? this.closeAfterTimeout(closePortal) : undefined
}
onMouseEnter={
hover ? this.handleOpen(openPortal, closePortal) : undefined
}
onClick={
hover ? undefined : this.handleOpen(openPortal, closePortal)
}
>
{this.props.children}
</Menu>
),
]}
{label || (
<NudeButton
id={`${this.id}button`}
aria-haspopup="true"
aria-expanded={isOpen ? "true" : "false"}
aria-controls={this.id}
>
<MoreIcon />
</NudeButton>
)}
</Label>
{portal(
<Position
ref={this.dropdownRef}
position={this.position}
fixed={this.fixed}
top={this.top}
bottom={this.bottom}
left={this.left}
right={this.right}
>
<Menu
ref={this.menuRef}
onMouseMove={hover ? this.clearCloseTimeout : undefined}
onMouseOut={
hover ? this.closeAfterTimeout(closePortal) : undefined
}
onClick={
typeof children === "function"
? undefined
: (ev) => {
ev.stopPropagation();
closePortal();
}
}
style={this.props.style}
id={this.id}
aria-labelledby={`${this.id}button`}
role="menu"
>
{typeof children === "function"
? children({ closePortal })
: children}
</Menu>
</Position>
)}
</>
)}
</PortalWithState>
</div>
);
@@ -74,28 +229,58 @@ class DropdownMenu extends Component {
}
const Label = styled(Flex).attrs({
justify: 'center',
align: 'center',
justify: "center",
align: "center",
})`
z-index: 1000;
z-index: ${(props) => props.theme.depths.menu};
cursor: pointer;
`;
const Position = styled.div`
position: ${({ fixed }) => (fixed ? "fixed" : "absolute")};
display: flex;
${({ left }) => (left !== undefined ? `left: ${left}px` : "")};
${({ right }) => (right !== undefined ? `right: ${right}px` : "")};
${({ top }) => (top !== undefined ? `top: ${top}px` : "")};
${({ bottom }) => (bottom !== undefined ? `bottom: ${bottom}px` : "")};
max-height: 75%;
z-index: ${(props) => props.theme.depths.menu};
transform: ${(props) =>
props.position === "center" ? "translateX(-50%)" : "initial"};
pointer-events: none;
`;
const Menu = styled.div`
animation: ${fadeAndScaleIn} 200ms ease;
transform-origin: 75% 0;
position: absolute;
right: ${({ right }) => right}px;
top: ${({ top }) => top}px;
z-index: 1000;
border: ${color.slateLight};
background: ${color.white};
transform-origin: ${(props) => (props.left !== undefined ? "25%" : "75%")} 0;
backdrop-filter: blur(10px);
background: ${(props) => rgba(props.theme.menuBackground, 0.8)};
border: ${(props) =>
props.theme.menuBorder ? `1px solid ${props.theme.menuBorder}` : "none"};
border-radius: 2px;
min-width: 160px;
padding: 0.5em 0;
min-width: 180px;
overflow: hidden;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 4px 8px rgba(0, 0, 0, 0.08),
0 2px 4px rgba(0, 0, 0, 0.08);
overflow-y: auto;
box-shadow: ${(props) => props.theme.menuShadow};
pointer-events: all;
hr {
margin: 0.5em 12px;
}
@media print {
display: none;
}
`;
export const Header = styled.h3`
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
color: ${(props) => props.theme.sidebarText};
letter-spacing: 0.04em;
margin: 1em 12px 0.5em;
`;
export default DropdownMenu;
+62 -21
View File
@@ -1,47 +1,88 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import Flex from 'shared/components/Flex';
import { color } from 'shared/styles/constants';
import { CheckmarkIcon } from "outline-icons";
import * as React from "react";
import styled from "styled-components";
type Props = {
onClick?: (SyntheticEvent<>) => void | Promise<void>,
children?: React.Node,
selected?: boolean,
disabled?: boolean,
};
const DropdownMenuItem = ({
onClick,
children,
}: {
onClick?: SyntheticEvent => void,
children?: React.Element<any>,
}) => {
return <MenuItem onClick={onClick}>{children}</MenuItem>;
selected,
disabled,
...rest
}: Props) => {
return (
<MenuItem
onClick={disabled ? undefined : onClick}
disabled={disabled}
role="menuitem"
tabIndex="-1"
{...rest}
>
{selected !== undefined && (
<>
<CheckmarkIcon
color={selected === false ? "transparent" : undefined}
/>
&nbsp;
</>
)}
{children}
</MenuItem>
);
};
const MenuItem = styled(Flex)`
const MenuItem = styled.a`
display: flex;
margin: 0;
padding: 5px 10px;
height: 32px;
padding: 6px 12px;
width: 100%;
min-height: 32px;
color: ${color.slateDark};
color: ${(props) =>
props.disabled ? props.theme.textTertiary : props.theme.textSecondary};
justify-content: left;
align-items: center;
cursor: pointer;
font-size: 15px;
cursor: default;
user-select: none;
svg {
svg:not(:last-child) {
margin-right: 8px;
}
a {
text-decoration: none;
width: 100%;
svg {
opacity: ${(props) => (props.disabled ? ".5" : 1)};
}
${(props) =>
props.disabled
? "pointer-events: none;"
: `
&:hover {
color: ${color.white};
background: ${color.primary};
color: ${props.theme.white};
background: ${props.theme.primary};
box-shadow: none;
cursor: pointer;
svg {
fill: ${color.white};
fill: ${props.theme.white};
}
}
&:focus {
color: ${props.theme.white};
background: ${props.theme.primary};
outline: none;
}
`};
`;
export default DropdownMenuItem;
+2 -2
View File
@@ -1,3 +1,3 @@
// @flow
export { default as DropdownMenu } from './DropdownMenu';
export { default as DropdownMenuItem } from './DropdownMenuItem';
export { default as DropdownMenu, Header } from "./DropdownMenu";
export { default as DropdownMenuItem } from "./DropdownMenuItem";
+129
View File
@@ -0,0 +1,129 @@
// @flow
import { lighten } from "polished";
import * as React from "react";
import { withRouter, type RouterHistory } from "react-router-dom";
import styled, { withTheme } from "styled-components";
import UiStore from "stores/UiStore";
import ErrorBoundary from "components/ErrorBoundary";
import Tooltip from "components/Tooltip";
import embeds from "../embeds";
import isInternalUrl from "utils/isInternalUrl";
import { uploadFile } from "utils/uploadFile";
const RichMarkdownEditor = React.lazy(() => import("rich-markdown-editor"));
const EMPTY_ARRAY = [];
type Props = {
id?: string,
defaultValue?: string,
readOnly?: boolean,
grow?: boolean,
disableEmbeds?: boolean,
ui?: UiStore,
};
type PropsWithRef = Props & {
forwardedRef: React.Ref<any>,
history: RouterHistory,
};
class Editor extends React.Component<PropsWithRef> {
onUploadImage = async (file: File) => {
const result = await uploadFile(file, { documentId: this.props.id });
return result.url;
};
onClickLink = (href: string) => {
// on page hash
if (href[0] === "#") {
window.location.href = href;
return;
}
if (isInternalUrl(href)) {
// relative
let navigateTo = href;
// probably absolute
if (href[0] !== "/") {
try {
const url = new URL(href);
navigateTo = url.pathname + url.hash;
} catch (err) {
navigateTo = href;
}
}
this.props.history.push(navigateTo);
} else {
window.open(href, "_blank");
}
};
onShowToast = (message: string) => {
if (this.props.ui) {
this.props.ui.showToast(message);
}
};
render() {
return (
<ErrorBoundary reloadOnChunkMissing>
<StyledEditor
ref={this.props.forwardedRef}
uploadImage={this.onUploadImage}
onClickLink={this.onClickLink}
onShowToast={this.onShowToast}
embeds={this.props.disableEmbeds ? EMPTY_ARRAY : embeds}
tooltip={EditorTooltip}
{...this.props}
/>
</ErrorBoundary>
);
}
}
const StyledEditor = styled(RichMarkdownEditor)`
flex-grow: ${(props) => (props.grow ? 1 : 0)};
justify-content: start;
> div {
transition: ${(props) => props.theme.backgroundTransition};
}
.notice-block.tip,
.notice-block.warning {
font-weight: 500;
}
p {
a {
color: ${(props) => props.theme.text};
border-bottom: 1px solid ${(props) => lighten(0.5, props.theme.text)};
text-decoration: none !important;
font-weight: 500;
&:hover {
border-bottom: 1px solid ${(props) => props.theme.text};
text-decoration: none;
}
}
}
`;
const EditorTooltip = ({ children, ...props }) => (
<Tooltip offset="0, 16" delay={150} {...props}>
<Span>{children}</Span>
</Tooltip>
);
const Span = styled.span`
outline: none;
`;
const EditorWithRouterAndTheme = withRouter(withTheme(Editor));
export default React.forwardRef<Props, typeof Editor>((props, ref) => (
<EditorWithRouterAndTheme {...props} forwardedRef={ref} />
));
-338
View File
@@ -1,338 +0,0 @@
// @flow
import React, { Component } from 'react';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
import { Editor, Plain } from 'slate';
import keydown from 'react-keydown';
import type { State, Editor as EditorType } from './types';
import getDataTransferFiles from 'utils/getDataTransferFiles';
import Flex from 'shared/components/Flex';
import ClickablePadding from './components/ClickablePadding';
import Toolbar from './components/Toolbar';
import BlockInsert from './components/BlockInsert';
import Placeholder from './components/Placeholder';
import Contents from './components/Contents';
import Markdown from './serializer';
import createSchema from './schema';
import createPlugins from './plugins';
import insertImage from './insertImage';
import styled from 'styled-components';
type Props = {
text: string,
onChange: Function,
onSave: Function,
onCancel: Function,
onImageUploadStart: Function,
onImageUploadStop: Function,
emoji?: string,
readOnly: boolean,
};
type KeyData = {
isMeta: boolean,
key: string,
};
@observer
class MarkdownEditor extends Component {
props: Props;
editor: EditorType;
schema: Object;
plugins: Array<Object>;
@observable editorState: State;
constructor(props: Props) {
super(props);
this.schema = createSchema({
onInsertImage: this.insertImageFile,
onChange: this.onChange,
});
this.plugins = createPlugins({
onImageUploadStart: props.onImageUploadStart,
onImageUploadStop: props.onImageUploadStop,
});
if (props.text.trim().length) {
this.editorState = Markdown.deserialize(props.text);
} else {
this.editorState = Plain.deserialize('');
}
}
componentDidMount() {
if (!this.props.readOnly) {
if (this.props.text) {
this.focusAtEnd();
} else {
this.focusAtStart();
}
}
}
componentDidUpdate(prevProps: Props) {
if (prevProps.readOnly && !this.props.readOnly) {
this.focusAtEnd();
}
}
onChange = (editorState: State) => {
if (this.editorState !== editorState) {
this.props.onChange(Markdown.serialize(editorState));
}
this.editorState = editorState;
};
handleDrop = async (ev: SyntheticEvent) => {
if (this.props.readOnly) return;
// check if this event was already handled by the Editor
if (ev.isDefaultPrevented()) return;
// otherwise we'll handle this
ev.preventDefault();
ev.stopPropagation();
const files = getDataTransferFiles(ev);
for (const file of files) {
if (file.type.startsWith('image/')) {
await this.insertImageFile(file);
}
}
};
insertImageFile = async (file: window.File) => {
const state = this.editor.getState();
let transform = state.transform();
transform = await insertImage(
transform,
file,
this.editor,
this.props.onImageUploadStart,
this.props.onImageUploadStop
);
this.editor.onChange(transform.apply());
};
cancelEvent = (ev: SyntheticEvent) => {
ev.preventDefault();
};
// Handling of keyboard shortcuts outside of editor focus
@keydown('meta+s')
onSave(ev: SyntheticKeyboardEvent) {
if (this.props.readOnly) return;
ev.preventDefault();
ev.stopPropagation();
this.props.onSave();
}
@keydown('meta+enter')
onSaveAndExit(ev: SyntheticKeyboardEvent) {
if (this.props.readOnly) return;
ev.preventDefault();
ev.stopPropagation();
this.props.onSave({ redirect: false });
}
@keydown('esc')
onCancel() {
if (this.props.readOnly) return;
this.props.onCancel();
}
// Handling of keyboard shortcuts within editor focus
onKeyDown = (ev: SyntheticKeyboardEvent, data: KeyData, state: State) => {
if (!data.isMeta) return;
switch (data.key) {
case 's':
this.onSave(ev);
return state;
case 'enter':
this.onSaveAndExit(ev);
return state;
case 'escape':
this.onCancel();
return state;
default:
}
};
focusAtStart = () => {
const state = this.editor.getState();
const transform = state.transform();
transform.collapseToStartOf(state.document);
transform.focus();
this.editorState = transform.apply();
};
focusAtEnd = () => {
const state = this.editor.getState();
const transform = state.transform();
transform.collapseToEndOf(state.document);
transform.focus();
this.editorState = transform.apply();
};
render = () => {
const { readOnly, emoji, onSave } = this.props;
return (
<Flex
onDrop={this.handleDrop}
onDragOver={this.cancelEvent}
onDragEnter={this.cancelEvent}
align="flex-start"
justify="center"
auto
>
<MaxWidth column auto>
<Header onClick={this.focusAtStart} readOnly={readOnly} />
<Contents state={this.editorState} />
{!readOnly && (
<Toolbar state={this.editorState} onChange={this.onChange} />
)}
{!readOnly && (
<BlockInsert
state={this.editorState}
onChange={this.onChange}
onInsertImage={this.insertImageFile}
/>
)}
<StyledEditor
innerRef={ref => (this.editor = ref)}
placeholder="Start with a title…"
bodyPlaceholder="…the rest is your canvas"
schema={this.schema}
plugins={this.plugins}
emoji={emoji}
state={this.editorState}
onKeyDown={this.onKeyDown}
onChange={this.onChange}
onSave={onSave}
readOnly={readOnly}
/>
<ClickablePadding
onClick={!readOnly ? this.focusAtEnd : undefined}
grow
/>
</MaxWidth>
</Flex>
);
};
}
const MaxWidth = styled(Flex)`
padding: 0 60px;
max-width: 50em;
height: 100%;
`;
const Header = styled(Flex)`
height: 60px;
flex-shrink: 0;
align-items: flex-end;
${({ readOnly }) => !readOnly && 'cursor: text;'};
`;
const StyledEditor = styled(Editor)`
font-weight: 400;
font-size: 1em;
line-height: 1.7em;
width: 100%;
color: #1b2830;
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: 500;
}
h1:first-of-type {
${Placeholder} {
visibility: visible;
}
}
p:nth-child(2) {
${Placeholder} {
visibility: visible;
}
}
ul,
ol {
margin: 1em 0.1em;
padding-left: 1em;
ul,
ol {
margin: 0.1em;
}
}
p {
position: relative;
}
a:hover {
text-decoration: ${({ readOnly }) => (readOnly ? 'underline' : 'none')};
}
li p {
display: inline;
margin: 0;
}
.todoList {
list-style: none;
padding-left: 0;
.todoList {
padding-left: 1em;
}
}
.todo {
span:last-child:focus {
outline: none;
}
}
blockquote {
border-left: 3px solid #efefef;
padding-left: 10px;
}
table {
border-collapse: collapse;
}
tr {
border-bottom: 1px solid #eee;
}
th {
font-weight: bold;
}
th,
td {
padding: 5px 20px 5px 0;
}
b,
strong {
font-weight: 600;
}
`;
export default MarkdownEditor;
@@ -1,148 +0,0 @@
// @flow
import React, { Component } from 'react';
import { Portal } from 'react-portal';
import { findDOMNode, Node } from 'slate';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
import styled from 'styled-components';
import { color } from 'shared/styles/constants';
import PlusIcon from 'components/Icon/PlusIcon';
import type { State } from '../types';
type Props = {
state: State,
onChange: Function,
onInsertImage: File => Promise<*>,
};
function findClosestRootNode(state, ev) {
let previous;
for (const node of state.document.nodes) {
const element = findDOMNode(node);
const bounds = element.getBoundingClientRect();
if (bounds.top > ev.clientY) return previous;
previous = { node, element, bounds };
}
}
@observer
export default class BlockInsert extends Component {
props: Props;
mouseMoveTimeout: number;
mouseMovementSinceClick: number = 0;
lastClientX: number = 0;
lastClientY: number = 0;
@observable closestRootNode: Node;
@observable active: boolean = false;
@observable top: number;
@observable left: number;
componentDidMount = () => {
window.addEventListener('mousemove', this.handleMouseMove);
};
componentWillUnmount = () => {
window.removeEventListener('mousemove', this.handleMouseMove);
};
setInactive = () => {
this.active = false;
};
handleMouseMove = (ev: SyntheticMouseEvent) => {
const windowWidth = window.innerWidth / 2.5;
const result = findClosestRootNode(this.props.state, ev);
const movementThreshold = 200;
this.mouseMovementSinceClick +=
Math.abs(this.lastClientX - ev.clientX) +
Math.abs(this.lastClientY - ev.clientY);
this.lastClientX = ev.clientX;
this.lastClientY = ev.clientY;
this.active =
ev.clientX < windowWidth &&
this.mouseMovementSinceClick > movementThreshold;
if (result) {
this.closestRootNode = result.node;
// do not show block menu on title heading or editor
const firstNode = this.props.state.document.nodes.first();
if (result.node === firstNode || result.node.type === 'block-toolbar') {
this.left = -1000;
} else {
this.left = Math.round(result.bounds.left - 20);
this.top = Math.round(result.bounds.top + window.scrollY);
}
}
if (this.active) {
clearTimeout(this.mouseMoveTimeout);
this.mouseMoveTimeout = setTimeout(this.setInactive, 2000);
}
};
handleClick = (ev: SyntheticMouseEvent) => {
this.mouseMovementSinceClick = 0;
this.active = false;
const { state } = this.props;
const type = { type: 'block-toolbar', isVoid: true };
let transform = state.transform();
// remove any existing toolbars in the document as a fail safe
state.document.nodes.forEach(node => {
if (node.type === 'block-toolbar') {
transform.removeNodeByKey(node.key);
}
});
transform
.collapseToStartOf(this.closestRootNode)
.collapseToEndOfPreviousBlock()
.insertBlock(type);
this.props.onChange(transform.apply());
};
render() {
const style = { top: `${this.top}px`, left: `${this.left}px` };
return (
<Portal>
<Trigger active={this.active} style={style}>
<PlusIcon onClick={this.handleClick} color={color.slate} />
</Trigger>
</Portal>
);
}
}
const Trigger = styled.div`
position: absolute;
z-index: 1;
opacity: 0;
background-color: ${color.white};
transition: opacity 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275),
transform 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
line-height: 0;
margin-left: -10px;
box-shadow: inset 0 0 0 2px ${color.slate};
border-radius: 100%;
transform: scale(0.9);
cursor: pointer;
&:hover {
background-color: ${color.smokeDark};
}
${({ active }) =>
active &&
`
transform: scale(1);
opacity: .9;
`};
`;
@@ -1,22 +0,0 @@
// @flow
import React from 'react';
import styled from 'styled-components';
type Props = {
onClick?: ?Function,
grow?: boolean,
};
const ClickablePadding = (props: Props) => {
return <Container grow={props.grow} onClick={props.onClick} />;
};
const Container = styled.div`
min-height: 150px;
padding-top: 50px;
cursor: ${({ onClick }) => (onClick ? 'text' : 'default')};
${({ grow }) => grow && `flex-grow: 1;`};
`;
export default ClickablePadding;
@@ -1,3 +0,0 @@
// @flow
import ClickablePadding from './ClickablePadding';
export default ClickablePadding;
-40
View File
@@ -1,40 +0,0 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import CopyButton from './CopyButton';
import { color } from 'shared/styles/constants';
import type { Props } from '../types';
export default function Code({ children, node, readOnly, attributes }: Props) {
const language = node.data.get('language') || 'javascript';
return (
<Container {...attributes}>
{readOnly && <CopyButton text={node.text} />}
<Pre className={`language-${language}`}>
<code className={`language-${language}`}>{children}</code>
</Pre>
</Container>
);
}
const Pre = styled.pre`
padding: 0.5em 1em;
background: ${color.smokeLight};
border-radius: 4px;
border: 1px solid ${color.smokeDark};
code {
padding: 0;
}
`;
const Container = styled.div`
position: relative;
&:hover {
> span {
opacity: 1;
}
}
`;
@@ -1,150 +0,0 @@
// @flow
import React, { Component } from 'react';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
import { List } from 'immutable';
import { color } from 'shared/styles/constants';
import headingToSlug from '../headingToSlug';
import type { State, Block } from '../types';
import styled from 'styled-components';
type Props = {
state: State,
};
@observer
class Contents extends Component {
props: Props;
@observable activeHeading: ?string;
componentDidMount() {
window.addEventListener('scroll', this.updateActiveHeading);
this.updateActiveHeading();
}
componentWillUnmount() {
window.removeEventListener('scroll', this.updateActiveHeading);
}
updateActiveHeading = () => {
const elements = this.headingElements;
if (!elements.length) return;
let activeHeading = elements[0].id;
for (const element of elements) {
const bounds = element.getBoundingClientRect();
if (bounds.top <= 0) activeHeading = element.id;
}
this.activeHeading = activeHeading;
};
get headingElements(): HTMLElement[] {
const elements = [];
const tagNames = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
for (const tagName of tagNames) {
for (const ele of document.getElementsByTagName(tagName)) {
elements.push(ele);
}
}
return elements;
}
get headings(): List<Block> {
const { state } = this.props;
return state.document.nodes.filter((node: Block) => {
if (!node.text) return false;
return node.type.match(/^heading/);
});
}
render() {
// If there are one or less headings in the document no need for a minimap
if (this.headings.size <= 1) return null;
return (
<Wrapper>
<Sections>
{this.headings.map(heading => {
const slug = headingToSlug(heading);
const active = this.activeHeading === slug;
return (
<ListItem type={heading.type} active={active}>
<Anchor href={`#${slug}`} active={active}>
{heading.text}
</Anchor>
</ListItem>
);
})}
</Sections>
</Wrapper>
);
}
}
const Wrapper = styled.div`
position: fixed;
right: 0;
top: 150px;
z-index: 100;
`;
const Anchor = styled.a`
color: ${props => (props.active ? color.slateDark : color.slate)};
font-weight: ${props => (props.active ? 500 : 400)};
opacity: 0;
transition: all 100ms ease-in-out;
margin-right: -5px;
padding: 2px 0;
pointer-events: none;
text-overflow: ellipsis;
&:hover {
color: ${color.primary};
}
`;
const ListItem = styled.li`
position: relative;
margin-left: ${props => (props.type.match(/heading[12]/) ? '8px' : '16px')};
text-align: right;
color: ${color.slate};
padding-right: 16px;
white-space: nowrap;
&:after {
color: ${props => (props.active ? color.slateDark : color.slate)};
content: "${props => (props.type.match(/heading[12]/) ? '—' : '')}";
position: absolute;
right: 0;
}
`;
const Sections = styled.ol`
margin: 0 0 0 -8px;
padding: 0;
list-style: none;
font-size: 13px;
width: 100px;
transition-delay: 1s;
transition: width 100ms ease-in-out;
&:hover {
width: 300px;
transition-delay: 0s;
${Anchor} {
opacity: 1;
margin-right: 0;
background: ${color.white};
pointer-events: all;
}
}
`;
export default Contents;
@@ -1,50 +0,0 @@
// @flow
import React, { Component } from 'react';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
import { color } from 'shared/styles/constants';
import styled from 'styled-components';
import CopyToClipboard from 'components/CopyToClipboard';
@observer
class CopyButton extends Component {
@observable copied: boolean = false;
copiedTimeout: ?number;
componentWillUnmount() {
clearTimeout(this.copiedTimeout);
}
handleCopy = () => {
this.copied = true;
this.copiedTimeout = setTimeout(() => (this.copied = false), 3000);
};
render() {
return (
<StyledCopyToClipboard onCopy={this.handleCopy} {...this.props}>
<span>{this.copied ? 'Copied!' : 'Copy to clipboard'}</span>
</StyledCopyToClipboard>
);
}
}
const StyledCopyToClipboard = styled(CopyToClipboard)`
position: absolute;
top: 0;
right: 0;
opacity: 0;
transition: opacity 50ms ease-in-out;
z-index: 1;
font-size: 12px;
background: ${color.slateLight};
border-radius: 2px;
padding: 1px 6px;
&:hover {
background: ${color.slate};
}
`;
export default CopyButton;
-103
View File
@@ -1,103 +0,0 @@
// @flow
import React from 'react';
import { Document } from 'slate';
import styled from 'styled-components';
import headingToSlug from '../headingToSlug';
import type { Node, Editor } from '../types';
import Placeholder from './Placeholder';
type Props = {
children: React$Element<*>,
placeholder?: boolean,
parent: Node,
node: Node,
editor: Editor,
readOnly: boolean,
component?: string,
attributes: Object,
className?: string,
};
function Heading(props: Props) {
const {
parent,
placeholder,
node,
editor,
readOnly,
children,
component = 'h1',
className,
attributes,
} = props;
const parentIsDocument = parent instanceof Document;
const firstHeading = parentIsDocument && parent.nodes.first() === node;
const showPlaceholder = placeholder && firstHeading && !node.text;
const slugish = headingToSlug(node);
const showHash = readOnly && !!slugish;
const Component = component;
const emoji = editor.props.emoji || '';
const title = node.text.trim();
const startsWithEmojiAndSpace =
emoji && title.match(new RegExp(`^${emoji}\\s`));
return (
<Component {...attributes} id={slugish} className={className}>
<Wrapper hasEmoji={startsWithEmojiAndSpace}>{children}</Wrapper>
{showPlaceholder && (
<Placeholder contentEditable={false}>
{editor.props.placeholder}
</Placeholder>
)}
{showHash && (
<Anchor name={slugish} href={`#${slugish}`}>
#
</Anchor>
)}
</Component>
);
}
const Wrapper = styled.div`
display: inline;
margin-left: ${(props: Props) => (props.hasEmoji ? '-1.2em' : 0)};
`;
const Anchor = styled.a`
visibility: hidden;
padding-left: 0.25em;
color: #dedede;
&:hover {
color: #cdcdcd;
}
`;
export const StyledHeading = styled(Heading)`
position: relative;
&:hover {
${Anchor} {
visibility: visible;
text-decoration: none;
}
}
`;
export const Heading1 = (props: Props) => (
<StyledHeading component="h1" {...props} />
);
export const Heading2 = (props: Props) => (
<StyledHeading component="h2" {...props} />
);
export const Heading3 = (props: Props) => (
<StyledHeading component="h3" {...props} />
);
export const Heading4 = (props: Props) => (
<StyledHeading component="h4" {...props} />
);
export const Heading5 = (props: Props) => (
<StyledHeading component="h5" {...props} />
);
export const Heading6 = (props: Props) => (
<StyledHeading component="h6" {...props} />
);
@@ -1,21 +0,0 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import type { Props } from '../types';
import { color } from 'shared/styles/constants';
function HorizontalRule(props: Props) {
const { state, node, attributes } = props;
const active = state.isFocused && state.selection.hasEdgeIn(node);
return <StyledHr active={active} {...attributes} />;
}
const StyledHr = styled.hr`
padding-top: 0.75em;
margin: 0;
border: 0;
border-bottom: 1px solid
${props => (props.active ? color.slate : color.slateLight)};
`;
export default HorizontalRule;
-104
View File
@@ -1,104 +0,0 @@
// @flow
import React, { Component } from 'react';
import ImageZoom from 'react-medium-image-zoom';
import styled from 'styled-components';
import type { Props } from '../types';
import { color } from 'shared/styles/constants';
class Image extends Component {
props: Props;
handleChange = (ev: SyntheticInputEvent) => {
const alt = ev.target.value;
const { editor, node } = this.props;
const data = node.data.toObject();
const state = editor
.getState()
.transform()
.setNodeByKey(node.key, { data: { ...data, alt } })
.apply();
editor.onChange(state);
};
handleClick = (ev: SyntheticInputEvent) => {
ev.stopPropagation();
};
render() {
const { attributes, state, node, readOnly } = this.props;
const loading = node.data.get('loading');
const caption = node.data.get('alt');
const src = node.data.get('src');
const active = state.isFocused && state.selection.hasEdgeIn(node);
const showCaption = !readOnly || caption;
return (
<CenteredImage>
{!readOnly ? (
<StyledImg
{...attributes}
src={src}
alt={caption}
active={active}
loading={loading}
/>
) : (
<ImageZoom
image={{
src,
alt: caption,
style: {
maxWidth: '100%',
},
...attributes,
}}
shouldRespectMaxDimension
/>
)}
{showCaption && (
<Caption
type="text"
placeholder="Write a caption"
onChange={this.handleChange}
onClick={this.handleClick}
defaultValue={caption}
contentEditable={false}
disabled={readOnly}
tabIndex={-1}
/>
)}
</CenteredImage>
);
}
}
const StyledImg = styled.img`
max-width: 100%;
box-shadow: ${props => (props.active ? `0 0 0 2px ${color.slate}` : '0')};
border-radius: ${props => (props.active ? `2px` : '0')};
opacity: ${props => (props.loading ? 0.5 : 1)};
`;
const CenteredImage = styled.div`
text-align: center;
`;
const Caption = styled.input`
border: 0;
display: block;
font-size: 13px;
font-style: italic;
color: ${color.slate};
padding: 2px 0;
line-height: 16px;
text-align: center;
width: 100%;
outline: none;
&::placeholder {
color: ${color.slate};
}
`;
export default Image;
@@ -1,12 +0,0 @@
// @flow
import styled from 'styled-components';
import { color } from 'shared/styles/constants';
const InlineCode = styled.code`
padding: 0.25em;
background: ${color.smoke};
border-radius: 4px;
border: 1px solid ${color.smokeDark};
`;
export default InlineCode;
-46
View File
@@ -1,46 +0,0 @@
// @flow
import React from 'react';
import { Link as InternalLink } from 'react-router-dom';
import type { Props } from '../types';
function getPathFromUrl(href: string) {
if (href[0] === '/') return href;
try {
const parsed = new URL(href);
return parsed.pathname;
} catch (err) {
return '';
}
}
function isOutlineUrl(href: string) {
if (href[0] === '/') return true;
try {
const outline = new URL(BASE_URL);
const parsed = new URL(href);
return parsed.hostname === outline.hostname;
} catch (err) {
return false;
}
}
export default function Link({ attributes, node, children, readOnly }: Props) {
const href = node.data.get('href');
const path = getPathFromUrl(href);
if (isOutlineUrl(href) && readOnly) {
return (
<InternalLink {...attributes} to={path}>
{children}
</InternalLink>
);
} else {
return (
<a {...attributes} href={href} target="_blank">
{children}
</a>
);
}
}
@@ -1,27 +0,0 @@
// @flow
import React from 'react';
import type { Props } from '../types';
import TodoItem from './TodoItem';
export default function ListItem({
children,
node,
attributes,
...props
}: Props) {
const checked = node.data.get('checked');
if (checked !== undefined) {
return (
<TodoItem
checked={checked}
node={node}
attributes={attributes}
{...props}
>
{children}
</TodoItem>
);
}
return <li {...attributes}>{children}</li>;
}
@@ -1,35 +0,0 @@
// @flow
import React from 'react';
import { Document } from 'slate';
import type { Props } from '../types';
import Placeholder from './Placeholder';
export default function Link({
attributes,
editor,
node,
parent,
children,
readOnly,
}: Props) {
const parentIsDocument = parent instanceof Document;
const firstParagraph = parent && parent.nodes.get(1) === node;
const lastParagraph = parent && parent.nodes.last() === node;
const showPlaceholder =
!readOnly &&
parentIsDocument &&
firstParagraph &&
lastParagraph &&
!node.text;
return (
<p {...attributes}>
{children}
{showPlaceholder && (
<Placeholder contentEditable={false}>
{editor.props.bodyPlaceholder}
</Placeholder>
)}
</p>
);
}
@@ -1,11 +0,0 @@
// @flow
import styled from 'styled-components';
export default styled.span`
position: absolute;
top: 0;
visibility: hidden;
pointer-events: none;
user-select: none;
color: #b1becc;
`;
@@ -1,54 +0,0 @@
// @flow
import React, { Component } from 'react';
import styled from 'styled-components';
import { color } from 'shared/styles/constants';
import type { Props } from '../types';
export default class TodoItem extends Component {
props: Props & { checked: boolean };
handleChange = (ev: SyntheticInputEvent) => {
const checked = ev.target.checked;
const { editor, node } = this.props;
const state = editor
.getState()
.transform()
.setNodeByKey(node.key, { data: { checked } })
.apply();
editor.onChange(state);
};
render() {
const { children, checked, attributes, readOnly } = this.props;
return (
<ListItem checked={checked} {...attributes}>
<Input
type="checkbox"
checked={checked}
onChange={this.handleChange}
disabled={readOnly}
contentEditable={false}
/>
{children}
</ListItem>
);
}
}
const ListItem = styled.li`
padding-left: 1.4em;
position: relative;
> p > span {
color: ${props => (props.checked ? color.slateDark : 'inherit')};
text-decoration: ${props => (props.checked ? 'line-through' : 'none')};
}
`;
const Input = styled.input`
position: absolute;
left: 0;
top: 0.4em;
`;
@@ -1,13 +0,0 @@
// @flow
import styled from 'styled-components';
const TodoList = styled.ul`
list-style: none;
padding: 0 !important;
ul {
padding-left: 1em;
}
`;
export default TodoList;
@@ -1,194 +0,0 @@
// @flow
import React, { Component } from 'react';
import keydown from 'react-keydown';
import styled from 'styled-components';
import getDataTransferFiles from 'utils/getDataTransferFiles';
import Heading1Icon from 'components/Icon/Heading1Icon';
import Heading2Icon from 'components/Icon/Heading2Icon';
import ImageIcon from 'components/Icon/ImageIcon';
import CodeIcon from 'components/Icon/CodeIcon';
import BulletedListIcon from 'components/Icon/BulletedListIcon';
import OrderedListIcon from 'components/Icon/OrderedListIcon';
import HorizontalRuleIcon from 'components/Icon/HorizontalRuleIcon';
import TodoListIcon from 'components/Icon/TodoListIcon';
import Flex from 'shared/components/Flex';
import ToolbarButton from './components/ToolbarButton';
import type { Props as BaseProps } from '../../types';
import { color } from 'shared/styles/constants';
import { fadeIn } from 'shared/styles/animations';
import { splitAndInsertBlock } from '../../transforms';
type Props = BaseProps & {
onInsertImage: Function,
onChange: Function,
};
type Options = {
type: string | Object,
wrapper?: string | Object,
append?: string | Object,
};
class BlockToolbar extends Component {
props: Props;
file: HTMLInputElement;
componentWillReceiveProps(nextProps: Props) {
const wasActive = this.props.state.selection.hasEdgeIn(this.props.node);
const isActive = nextProps.state.selection.hasEdgeIn(nextProps.node);
const becameInactive = !isActive && wasActive;
if (becameInactive) {
const state = nextProps.state
.transform()
.removeNodeByKey(nextProps.node.key)
.apply();
this.props.onChange(state);
}
}
@keydown('esc')
removeSelf(ev: SyntheticEvent) {
ev.preventDefault();
ev.stopPropagation();
const state = this.props.state
.transform()
.removeNodeByKey(this.props.node.key)
.apply();
this.props.onChange(state);
}
insertBlock = (options: Options) => {
const { state } = this.props;
let transform = splitAndInsertBlock(state.transform(), state, options);
state.document.nodes.forEach(node => {
if (node.type === 'block-toolbar') {
transform.removeNodeByKey(node.key);
}
});
this.props.onChange(transform.focus().apply());
};
handleClickBlock = (ev: SyntheticEvent, type: string) => {
ev.preventDefault();
switch (type) {
case 'heading1':
case 'heading2':
case 'code':
return this.insertBlock({ type });
case 'horizontal-rule':
return this.insertBlock({
type: { type: 'horizontal-rule', isVoid: true },
});
case 'bulleted-list':
return this.insertBlock({
type: 'list-item',
wrapper: 'bulleted-list',
});
case 'ordered-list':
return this.insertBlock({
type: 'list-item',
wrapper: 'ordered-list',
});
case 'todo-list':
return this.insertBlock({
type: { type: 'list-item', data: { checked: false } },
wrapper: 'todo-list',
});
case 'image':
return this.onPickImage();
default:
}
};
onPickImage = () => {
// simulate a click on the file upload input element
this.file.click();
};
onImagePicked = async (ev: SyntheticEvent) => {
const files = getDataTransferFiles(ev);
for (const file of files) {
await this.props.onInsertImage(file);
}
};
renderBlockButton = (type: string, IconClass: Function) => {
return (
<ToolbarButton onMouseDown={ev => this.handleClickBlock(ev, type)}>
<IconClass color={color.text} />
</ToolbarButton>
);
};
render() {
const { state, attributes, node } = this.props;
const active = state.isFocused && state.selection.hasEdgeIn(node);
return (
<Bar active={active} {...attributes}>
<HiddenInput
type="file"
innerRef={ref => (this.file = ref)}
onChange={this.onImagePicked}
accept="image/*"
/>
{this.renderBlockButton('heading1', Heading1Icon)}
{this.renderBlockButton('heading2', Heading2Icon)}
<Separator />
{this.renderBlockButton('bulleted-list', BulletedListIcon)}
{this.renderBlockButton('ordered-list', OrderedListIcon)}
{this.renderBlockButton('todo-list', TodoListIcon)}
<Separator />
{this.renderBlockButton('code', CodeIcon)}
{this.renderBlockButton('horizontal-rule', HorizontalRuleIcon)}
{this.renderBlockButton('image', ImageIcon)}
</Bar>
);
}
}
const Separator = styled.div`
height: 100%;
width: 1px;
background: ${color.smokeDark};
display: inline-block;
margin-left: 10px;
`;
const Bar = styled(Flex)`
z-index: 100;
animation: ${fadeIn} 150ms ease-in-out;
position: relative;
align-items: center;
background: ${color.smoke};
height: 44px;
&:before,
&:after {
content: '';
position: absolute;
left: -100%;
width: 100%;
height: 44px;
background: ${color.smoke};
}
&:after {
left: auto;
right: -100%;
}
`;
const HiddenInput = styled.input`
position: absolute;
top: -100px;
left: -100px;
visibility: hidden;
`;
export default BlockToolbar;
@@ -1,153 +0,0 @@
// @flow
import React, { Component } from 'react';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
import { Portal } from 'react-portal';
import styled from 'styled-components';
import _ from 'lodash';
import type { State } from '../../types';
import FormattingToolbar from './components/FormattingToolbar';
import LinkToolbar from './components/LinkToolbar';
@observer
export default class Toolbar extends Component {
@observable active: boolean = false;
@observable focused: boolean = false;
@observable link: ?React$Element<any>;
@observable top: string = '';
@observable left: string = '';
props: {
state: State,
onChange: (state: State) => void,
};
menu: HTMLElement;
componentDidMount = () => {
this.update();
};
componentDidUpdate = () => {
this.update();
};
handleFocus = () => {
this.focused = true;
};
handleBlur = () => {
this.focused = false;
};
get linkInSelection(): any {
const { state } = this.props;
try {
const selectedLinks = state.startBlock
.getInlinesAtRange(state.selection)
.filter(node => node.type === 'link');
if (selectedLinks.size) {
return selectedLinks.first();
}
} catch (err) {
//
}
}
update = () => {
const { state } = this.props;
const link = this.linkInSelection;
if (state.isBlurred || (state.isCollapsed && !link)) {
if (this.active && !this.focused) {
this.active = false;
this.link = undefined;
this.top = '';
this.left = '';
}
return;
}
// don't display toolbar for document title
const firstNode = state.document.nodes.first();
if (firstNode === state.startBlock) return;
// don't display toolbar for code blocks
if (state.startBlock.type === 'code') return;
this.active = true;
this.focused = !!link;
this.link = link;
const padding = 16;
const selection = window.getSelection();
const range = selection.getRangeAt(0);
const rect = range.getBoundingClientRect();
if (rect.top === 0 && rect.left === 0) {
return;
}
const left =
rect.left + window.scrollX - this.menu.offsetWidth / 2 + rect.width / 2;
this.top = `${Math.round(
rect.top + window.scrollY - this.menu.offsetHeight
)}px`;
this.left = `${Math.round(Math.max(padding, left))}px`;
};
setRef = (ref: HTMLElement) => {
this.menu = ref;
};
render() {
const style = {
top: this.top,
left: this.left,
};
return (
<Portal>
<Menu active={this.active} innerRef={this.setRef} style={style}>
{this.link ? (
<LinkToolbar
{...this.props}
link={this.link}
onBlur={this.handleBlur}
/>
) : (
<FormattingToolbar
onCreateLink={this.handleFocus}
{...this.props}
/>
)}
</Menu>
</Portal>
);
}
}
const Menu = styled.div`
padding: 8px 16px;
position: absolute;
z-index: 2;
top: -10000px;
left: -10000px;
opacity: 0;
background-color: #2f3336;
border-radius: 4px;
transform: scale(0.95);
transition: opacity 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275),
transform 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
line-height: 0;
height: 40px;
min-width: 260px;
${({ active }) =>
active &&
`
transform: translateY(-6px) scale(1);
opacity: 1;
`};
`;
@@ -1,49 +0,0 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import { fontWeight, color } from 'shared/styles/constants';
import Document from 'models/Document';
import NextIcon from 'components/Icon/NextIcon';
type Props = {
innerRef?: Function,
onClick: SyntheticEvent => void,
document: Document,
};
function DocumentResult({ document, ...rest }: Props) {
return (
<ListItem {...rest} href="">
<i>
<NextIcon light />
</i>
{document.title}
</ListItem>
);
}
const ListItem = styled.a`
display: flex;
align-items: center;
height: 24px;
padding: 4px 8px 4px 0;
color: ${color.white};
font-size: 15px;
i {
visibility: hidden;
}
&:hover,
&:focus,
&:active {
font-weight: ${fontWeight.medium};
outline: none;
i {
visibility: visible;
}
}
`;
export default DocumentResult;
@@ -1,127 +0,0 @@
// @flow
import React, { Component } from 'react';
import styled from 'styled-components';
import type { State } from '../../../types';
import ToolbarButton from './ToolbarButton';
import BoldIcon from 'components/Icon/BoldIcon';
import CodeIcon from 'components/Icon/CodeIcon';
import Heading1Icon from 'components/Icon/Heading1Icon';
import Heading2Icon from 'components/Icon/Heading2Icon';
import ItalicIcon from 'components/Icon/ItalicIcon';
import LinkIcon from 'components/Icon/LinkIcon';
import StrikethroughIcon from 'components/Icon/StrikethroughIcon';
class FormattingToolbar extends Component {
props: {
state: State,
onChange: Function,
onCreateLink: Function,
};
/**
* Check if the current selection has a mark with `type` in it.
*
* @param {String} type
* @return {Boolean}
*/
hasMark = (type: string) => {
return this.props.state.marks.some(mark => mark.type === type);
};
isBlock = (type: string) => {
return this.props.state.startBlock.type === type;
};
/**
* When a mark button is clicked, toggle the current mark.
*
* @param {Event} ev
* @param {String} type
*/
onClickMark = (ev: SyntheticEvent, type: string) => {
ev.preventDefault();
let { state } = this.props;
state = state
.transform()
.toggleMark(type)
.apply();
this.props.onChange(state);
};
onClickBlock = (ev: SyntheticEvent, type: string) => {
ev.preventDefault();
let { state } = this.props;
state = state
.transform()
.setBlock(type)
.apply();
this.props.onChange(state);
};
onCreateLink = (ev: SyntheticEvent) => {
ev.preventDefault();
ev.stopPropagation();
let { state } = this.props;
const data = { href: '' };
state = state
.transform()
.wrapInline({ type: 'link', data })
.apply();
this.props.onChange(state);
this.props.onCreateLink();
};
renderMarkButton = (type: string, IconClass: Function) => {
const isActive = this.hasMark(type);
const onMouseDown = ev => this.onClickMark(ev, type);
return (
<ToolbarButton onMouseDown={onMouseDown} active={isActive}>
<IconClass light />
</ToolbarButton>
);
};
renderBlockButton = (type: string, IconClass: Function) => {
const isActive = this.isBlock(type);
const onMouseDown = ev =>
this.onClickBlock(ev, isActive ? 'paragraph' : type);
return (
<ToolbarButton onMouseDown={onMouseDown} active={isActive}>
<IconClass light />
</ToolbarButton>
);
};
render() {
return (
<span>
{this.renderMarkButton('bold', BoldIcon)}
{this.renderMarkButton('italic', ItalicIcon)}
{this.renderMarkButton('deleted', StrikethroughIcon)}
{this.renderMarkButton('code', CodeIcon)}
<Separator />
{this.renderBlockButton('heading1', Heading1Icon)}
{this.renderBlockButton('heading2', Heading2Icon)}
<Separator />
<ToolbarButton onMouseDown={this.onCreateLink}>
<LinkIcon light />
</ToolbarButton>
</span>
);
}
}
const Separator = styled.div`
height: 100%;
width: 1px;
background: #fff;
opacity: 0.2;
display: inline-block;
margin-left: 10px;
`;
export default FormattingToolbar;
@@ -1,216 +0,0 @@
// @flow
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { observable, action } from 'mobx';
import { observer, inject } from 'mobx-react';
import { withRouter } from 'react-router-dom';
import styled from 'styled-components';
import ArrowKeyNavigation from 'boundless-arrow-key-navigation';
import ToolbarButton from './ToolbarButton';
import DocumentResult from './DocumentResult';
import type { State } from '../../../types';
import DocumentsStore from 'stores/DocumentsStore';
import keydown from 'react-keydown';
import CloseIcon from 'components/Icon/CloseIcon';
import OpenIcon from 'components/Icon/OpenIcon';
import TrashIcon from 'components/Icon/TrashIcon';
import Flex from 'shared/components/Flex';
@keydown
@observer
class LinkToolbar extends Component {
input: HTMLElement;
firstDocument: HTMLElement;
props: {
state: State,
link: Object,
documents: DocumentsStore,
onBlur: () => void,
onChange: State => void,
};
@observable isEditing: boolean = false;
@observable isFetching: boolean = false;
@observable resultIds: string[] = [];
@observable searchTerm: ?string = null;
componentWillMount() {
this.isEditing = !!this.props.link.data.get('href');
}
@action
search = async () => {
this.isFetching = true;
if (this.searchTerm) {
try {
this.resultIds = await this.props.documents.search(this.searchTerm);
} catch (err) {
console.error(err);
}
} else {
this.resultIds = [];
}
this.isFetching = false;
};
selectDocument = (ev, document) => {
ev.preventDefault();
this.save(document.url);
};
onKeyDown = (ev: SyntheticKeyboardEvent & SyntheticInputEvent) => {
switch (ev.keyCode) {
case 13: // enter
ev.preventDefault();
return this.save(ev.target.value);
case 27: // escape
return this.input.blur();
case 40: // down
ev.preventDefault();
if (this.firstDocument) {
const element = ReactDOM.findDOMNode(this.firstDocument);
if (element instanceof HTMLElement) element.focus();
}
break;
default:
}
};
onChange = (ev: SyntheticKeyboardEvent & SyntheticInputEvent) => {
try {
new URL(ev.target.value);
} catch (err) {
// this is not a valid url, show search suggestions
this.searchTerm = ev.target.value;
this.search();
return;
}
this.resultIds = [];
};
onBlur = () => {
if (!this.resultIds.length) {
if (this.input.value) {
this.props.onBlur();
} else {
this.removeLink();
}
}
};
removeLink = () => {
this.save('');
};
openLink = () => {
const href = this.props.link.data.get('href');
window.open(href, '_blank');
};
save = (href: string) => {
href = href.trim();
const { state } = this.props;
const transform = state.transform();
if (href) {
transform.setInline({ type: 'link', data: { href } });
} else {
transform.unwrapInline('link');
}
this.props.onChange(transform.apply());
this.props.onBlur();
};
setFirstDocumentRef = ref => {
this.firstDocument = ref;
};
render() {
const href = this.props.link.data.get('href');
const hasResults = this.resultIds.length > 0;
return (
<span>
<LinkEditor>
<Input
innerRef={ref => (this.input = ref)}
defaultValue={href}
placeholder="Search or paste a link…"
onBlur={this.onBlur}
onKeyDown={this.onKeyDown}
onChange={this.onChange}
autoFocus
/>
{this.isEditing && (
<ToolbarButton onMouseDown={this.openLink}>
<OpenIcon light />
</ToolbarButton>
)}
<ToolbarButton onMouseDown={this.removeLink}>
{this.isEditing ? <TrashIcon light /> : <CloseIcon light />}
</ToolbarButton>
</LinkEditor>
{hasResults && (
<SearchResults>
<ArrowKeyNavigation
mode={ArrowKeyNavigation.mode.VERTICAL}
defaultActiveChildIndex={0}
>
{this.resultIds.map((id, index) => {
const document = this.props.documents.getById(id);
if (!document) return null;
return (
<DocumentResult
innerRef={ref =>
index === 0 && this.setFirstDocumentRef(ref)
}
document={document}
key={document.id}
onClick={ev => this.selectDocument(ev, document)}
/>
);
})}
</ArrowKeyNavigation>
</SearchResults>
)}
</span>
);
}
}
const SearchResults = styled.div`
background: #2f3336;
position: absolute;
top: 100%;
width: 100%;
height: auto;
left: 0;
padding: 8px;
margin-top: -3px;
margin-bottom: 0;
border-radius: 0 0 4px 4px;
`;
const LinkEditor = styled(Flex)`
margin-left: -8px;
margin-right: -8px;
`;
const Input = styled.input`
font-size: 15px;
background: rgba(255, 255, 255, 0.1);
border-radius: 2px;
padding: 4px 8px;
border: 0;
margin: 0;
outline: none;
color: #fff;
flex-grow: 1;
`;
export default withRouter(inject('documents')(LinkToolbar));
@@ -1,26 +0,0 @@
// @flow
import styled from 'styled-components';
export default styled.button`
display: inline-block;
flex: 0;
width: 24px;
height: 24px;
cursor: pointer;
margin-left: 10px;
border: none;
background: none;
transition: opacity 100ms ease-in-out;
padding: 0;
opacity: 0.7;
&:first-child {
margin-left: 0;
}
&:hover {
opacity: 1;
}
${({ active }) => active && 'opacity: 1;'};
`;
@@ -1,3 +0,0 @@
// @flow
import Toolbar from './Toolbar';
export default Toolbar;

Some files were not shown because too many files have changed in this diff Show More