* Add `emails.export_completed` notification to settings menu
Signed-off-by: AKP <tom@tdpain.net>
* Don't send email when export_completed notifications are disabled
Signed-off-by: AKP <tom@tdpain.net>
* Automatically subscribe new users to `export_completed` notifications
Signed-off-by: AKP <tom@tdpain.net>
* Alter secondary text on export page to mention optional notifications
Signed-off-by: AKP <tom@tdpain.net>
* Alter toast text on collection export for optional notifications
Signed-off-by: AKP <tom@tdpain.net>
* Only subscribe new admins to export notifs
Signed-off-by: AKP <tom@tdpain.net>
* Move `export_completed` notification decision into `beforeSend`
Signed-off-by: AKP <tom@tdpain.net>
* Update server/emails/templates/ExportFailureEmail.tsx
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Update server/emails/templates/ExportSuccessEmail.tsx
Co-authored-by: Tom Moor <tom.moor@gmail.com>
Signed-off-by: AKP <tom@tdpain.net>
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* fix: Upgrade markdown-it to fix text collapse bug
* tsc. Need to overwrite the types for now until all Prosemirror modules are updated, they have recently been converted to Typescript and the types conflict
* feat: Put request rate limit at application server
This PR contains implementation for a blanket rate limiter at
application server level. Currently the allowed throughput is set high
only to be changed later as per the actual data gathered.
* Simplify implementation
1. Remove shutdown handler to purge rate limiter keys
2. Have separate keys for default and custom(route-based) rate limiters
3. Do not kill default rate limiter because it is not needed anymore due
to (2) above
* Set 60s as default for rate limiting window
* Fix env types
* wip
* wip
* fix comments
* better separation of conerns
* fix up tests
* fix semantics
* fixup tsc
* fix some tests
* the old semantics were easier to use
* add db:reset to scripts
* explicitly throw for unauthorized external authorization
* fix minor bug
* add additional tests for user creator and team creator
* yank the email matching logic out of teamcreator
* renaming
* fix type and test errors
* adds test to ensure that accountProvisioner works with email matching
* remove only
* fix comments
* recreate changes to allow self hosted to make teams
* fix: Long collection description prevents import
fix: Parallelize attachment upload during import
* fix: Improve Notion image import matching
* chore: Bump JSZIP (perf)
* fix: Allow redirect from /doc/<id> to canonical url
* fix: Importing document with only title duplicates title in body
* feat: Refactor Search scene to functional style
* fix: Clicking on recent not updating search input
* Replace translations and root objs with stores
* Replace `props.location` with `useLocation`
* deconstruct `useLocation` for readability
* Replace match prop term with `useParams`
* [WIP] Replace props history with `useHistory`
* Replace `ReactComponentProps` with state style
* Remove `lastParam` check, use dependency array instead
* Add explict match on param change
This reverts commit bfcc4038ff.
* make the user lookup in user creator sensitive to team
* add team specific logic to oidc strat
* factor out slugifyDomain
* change type of req during auth to Koa.Context
* fix: Cursor disappearing behind emoji
* Move emoji node styles to `Styles.ts`
* fix: grammar
* fix: Pasting emoji adds a new line
* fix: DOM element type
* clarify default role and allowed domains
* language tweaks
* Update app/scenes/Settings/Security.tsx
Co-authored-by: Tom Moor <tom.moor@gmail.com>
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* fix: `ToolbarMenu` popup on inline code selection
* fix: Replace `isCode` checks with single `isInCode`
* feat: Only relevant options on `code_inline` selection
* Change special case with item visibility toggle
* fix: `formattingMenuItems` visibility in `code_inline`
Note: That this bump of prosemirror-view also includes typescript types for the first time ever, these conflict with the @types packages and cause the need for extensive changes throughout the codebase. To prevent this becoming a massive PR with days of testing these new types are being removed for now. In the future we will bump all of the pm dependencies and restore the package types here
* chore: Updating all model validations before the white-hatters get to it ;)
* test
* Remove isUrl validation, thinking about it need to account for minio and other weird urls here
* feat: merge a new authentication method onto existing user records when emails match
* adds test for invite acceptance and auth provider creation
* addresses comments
- test existing user and invites in different test cases
- update lastActiveAt syncronously when an invite is accepted
* sort arrays in test to prevent nondeterministic test behaivior when doing array compare
* chore: Async user avatar upload processor
* chore: Async team avatar upload
* Refactor to task for retries
* Docs
Include avatarUrl in task props to prevent race condition
Remove transaction around upload fetch request
* fix: Add websocket client error capturing
fix: Incorrect parsing of documentName will never be empty
* fix: Non-present documentId in collaboration route should trigger an error response
* fix: Close unhandled websocket requests
The logic for this is that we show the button if either:
a) one or more new non-empty domains have been added, or
b) an existing domain was modified, even if the modification was then undone.
The reasoning for b) is as follows:
If a user adds a new domain row, makes changes, then removes the domain row, it is clear to the user that no changes have been made, and therefore the "save" button should not be visible.
However, as soon as the user makes any changes to an existing domain, they want to feel confident that they can hit save and ensure that whatever change they made is persisted; even if the change is identical to the current state, because they may not be able to recall accurately what the current state was. In those situations a user gets more confidence out of being able to hit save, than they would from being told by the system "you haven't made any changes".
* Webhooks (#3607)
* Get the migration and the model setup. Also make the sample env file a bit easier to use. Now just requires setting a SECRET_KEY and besides that will boot up from the sample
* WIP: Start getting a Webhook page created. Just the skeleton state right now
* WIP: Getting a form created to create webhooks, need to bring in react-hook-forms now
* WIP: Get library installed and make TS happy
* Get a few checkboxes ready to go
* Get creating and destroying working with a decent start to a frontend
* Didn't mean to enable this
* Remove eslint and fix other random typescript issue
* Rename some events to be more realistic
* Revert these changes
* PR review comments around policies. Also make sure this inherits from IdModel so it actually gets an id
* Allow any admin on the team to edit webhooks
* Start sending some webhooks for some User events
* Make sure the URL is valid
* Start recording webhook deliveries
* Make sure to verify if the subscription is for the type of event we are looking at
* Refactor sending Webhooks and follow better webhook schema
This creates a presenter to unify the format of webhooks. We also
extract the sending of webhooks and recording their deliveries to a
method than can be used by each of the different event type methods
We also add a status to WebhookDelivery since we need to save the record
before we make the HTTP request to get its id. Then once we make the
request and get a response we can update the delivery with the HTTP info
* Turn off a subscription that has failed for the last 25 deliveries
* Get a first spec passing. Found a bug in my returning of promises so good to patch that up now
* This looks nicer
* Get some tests added for the processor
* Add cron task to delete older webhooks
* Add Document Events to the Processor
* Revisions, FileOperations and Collections
* Get all the server side events added to the processor and make Typescript make sure they are all accounted for
* Get all the events added to the Frontend and work on styling them a bit, still needs some love though
* Get UI styled up a bit
* Get events wired up for webhook subscriptions
* Get delete events working and test at least one variant of them
* Get deletes working and actually make sure to send the model id in the webhook
* Remove webhook secrets from this slice
* Add disabled label for subscriptions that are disabled
* Make sure to cascade the delete
* Reorg this file a bit
* Fix association
* I removed secret for the moment
* Apply Copy changes from PR Review
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Actually apply the copy changes
TIL that if you Resolve a conversation it _also_ removes the 'staged suggestion' from your list on Github
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Update app/scenes/Settings/Webhooks.tsx
Missed this copy change before
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Add disabled as yellow badge
* Resolve frontend comments
* Fixup Schema a bit and remove the dependency on the subscription
* Add test to make sure we don't disable until there are enough failures, and fix code to actually do that. Also some test fixes from the json response shape changes
* Fix WebhookDeliveries to store the responses as Text instead of blobs
* Switch to text better for response bodies, this is using the helpers better and makes the code read better
* Move the logic to a task but run in through the processor cause the tests expect that right now, moving the tests over next
* Split up the tests and actually enqueue the events from the WebhookProcessor instead of doing them inline
* Allow any team admin to see any webhook subscription for the team
* Add the indexes based on our lookup patterns
* Run eslint --fix to fix auto correct issues from when I tried to use Github to merge copy changes
* Allow subscriptions to be edited after creation
* Types caught that I didn't add the new event to the webhook processor, also added it to the frontend here
* I think this will get these into the translations file
* Catch a few more translations, use styled components better and remove usage of webhook subscription in the copy
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* fix: tsc
fix: Document model payload empty
* fix: Revision webhook payload
Add custom UA for hooks
* Add webhooks icon, move under Integrations settings
Some spacing fixes
* Add actorId to webhook payloads
* Add View and ApiKey event types
* Spacing tweaks, fix team payload
* fix: Webhook not disabled after 25 failures
* fix: Enable webhook when editing if previously disabled
* fix: Correctly store response headers
* fix: Error in json/parsing/presentation results in hanging 'pending' webhook delivery
* fix: Awkward payload for users.invite webhook
* Add BaseEvent, ShareEvent
* fix: Add share events to form
* fix: Move webhook delivery cleanup to single DB call
Remove some unused abstraction
* Add user, collection, group context to membership webhook events
Some associated refactoring
Co-authored-by: Corey Alexander <coreyja@gmail.com>
* feat: Add mermaidjs integration (#3523)
* Add mermaidjs to dependencies and CodeFenceNode
* Fix diagram id for mermaidjs diagrams
* Fix typescript compiler errors on mermaid integration
* Fix id generation for mermaid diagrams
* Refactor mermaidjs integration into prosemirror plugin
* Remove unnecessary class attribute in mermaidjs integration
* Change mermaidjs label to singular
* Change decorator.inline to decorator.node for mermaid diagram id
* Fix diagram toggle state
* Add border and background to mermaid diagrams
* Stop mermaidjs from overwriting fontFamily inside diagrams
* Add stable diagramId to mermaid diagrams
* Separate text for hide/show diagram
Use uuid as diagramId, avoid storing in state
Fix cursor on diagrams
* fix: Base diagram visibility off presence of source
* fix: More cases where our font-family is ignored
* Disable HTML labels
* fix: Button styling – not technically required but now we have a third button this felt all the more needed
closes#3116
* named chunks
* Upgrade mermaid 9.1.3
Co-authored-by: Jan Niklas Richter <5812215+ArcticXWolf@users.noreply.github.com>
* feat: allow personal gmail accounts to be used to sign into teams with an existing invite
* address comments
* add comment for appDomain
* address comments
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Turkish translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Indonesian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Indonesian translations from Crowdin [ci skip]
* chore: Store expiresAt on UserAuthentications. This represents the time that the accessToken is no longer valid and should be exchanged using the refreshToken
* feat: Check and expire Google SSO
* fix: Better handling of multiple auth methods
Added more docs
* fix: Retry access validation with network errors
* Small refactor, add Azure token validation support
* doc
* test
* lint
* OIDC refresh support
* CheckSSOAccessTask -> ValidateSSOAccessTask
Added lastValidatedAt column
Skip checks if validated within 5min
Some edge cases around encrypted columns
* change the api of domain parsing to just parseDomain and getCookieDomain
* adds getBaseDomain as the method to get the domain after any official subdomains
* fix: New German translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: simplify transformation
Functions (isDragging, isOver, canDrop) always return a boolean value
* fix: type
In browserslist must be either an array or an object
Fixes#3412
Previously the only way to restrict the domains for a Team were with the ALLOWED_DOMAINS environment variable for self hosted instances.
This PR migrates this to be a database backed setting on the Team object. This is done through the creation of a TeamDomain model that is associated with the Team and contains the domain name
This settings is updated on the Security Tab. Here domains can be added or removed from the Team.
On the server side, we take the code paths that previously were using ALLOWED_DOMAINS and switched them to use the Team allowed domains instead
* Allow Document to be fetched without Slug
Fixes#3423
This PR refactors the `Document.findByPk` method to not require the
`slug` portion of the urlID.
Before this function accepted two different 'formats' for the ID.
- The `uuid` ID of the Document
- The full `urlID` which looked something like
`some-document-1234567890`
However the `some-document` slug portion of this identifier wasn't
actually used when looking for a document.
We now allow searching by JUST the postfix of the `urlID`, in the above
example that is `1234567890`.
We do this via a new Regex pattern to match on that just looks for the
right looking id alone, without the prefix.
This codepath looks the same as when we find it by the full `urlID`
besides the different regex that we match on.
The issue #3423 mentions that this should apply to all the API
endpoints. I believe that this `findByPk` method is all that should be
needed for that change. But if this is incorrect, OR you would like more
test coverage on the API endpoints as a more 'end to end test' please
let me know!
* Change original regex to make the slug optional
This has the, I believe to be good, side-effect of making the same logic
apply to `Collection` as well. Since `Collection` was always doing the
same stripping of the slug before the lookup I believe it should be just
as safe to do there.
We don't have to touch the code in Collections but we add a test of this
behavior there as well.
* No reason to rename this now that we aren't doing two matches
* Normalize code around localStorage
Persist disabled embed state
* fix: Cannot view more than 10 starred items on load
* More tidying of sidebar state
* feat: Add user flags concept, for tracking bits on a user
* feat: Example flag usage for user invite resend abuse
* wip
* test
* fix: Set correct flag
* fix: prevent the interactive gutter elements from interfering with the sidebar collapse button
* keep mobile padding the same on documents
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* feat: adds "/" keyboard shortcut to focus search input on share screen; auto-focus content body on search item selection
* usekeydown instead of registerkeydown
* Add arm64 docker image build
* add arm64 docker image build
* fix: install missing docker buildx
* fix: new cimg orbs not working with this config
* fix misstake on qemu image name
* fix node:16 image not supported on arm/v5 and arm/v6
* add timeout to avoir errors
* fix docker buildx multiarch auto removing
* remove useless platforms, and keep only most used to reduce CI duration
* fix context issues
* fixed multiarch CI
* provide a type-ahead search input on shared document pages that allow search of child document tree
* improve keyboard navigation handling of all search views
* improve coloring on dark mode list selection states
* refactor PaginatedList component to eliminate edge cases
* Refactor worker, all emails on task system
* fix
* lint
* fix: Remove a bunch of expect-error comments in related tests
* refactor: Move work from utils.gc into tasks
* test
* Add tracing to tasks and processors
fix: DebounceProcessor triggering on all events
Event.add -> Event.schedule
* Migrations, models, commands
* ui
* Move starred hint to location state
* lint
* tsc
* refactor
* Add collection empty state in expanded sidebar
* Add empty placeholder within starred collections
* Drag and drop improves, Relative refactor
* fix: Starring untitled draft leaves empty space
* fix: Creating draft in starred collection shouldnt open main
* fix: Dupe drop cursor
* Final fixes
* fix: Canonical redirect replaces starred location state
* fix: Don't show reorder cursor at the top of collection with no permission to edit when dragging
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
* fix: Catch and warn of rare error when emoji combinations cause document to be unable to persist changes
closes#3230
* addEventListener -> removeEventListener
* fix: New French translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* chore: Remove unused DocumentList component
* fix: Add support for detecting Pomerium
* Refactor to avoid reading cookies on every request
* refactor: Just enable cookies for all self-hosted builds
* Remove unused userAgent
* test: Add window.env to mock
* feat: Add new icon button on collections in sidebar, move sort into menu
* Remove unused menu, add warning when dragging in a-z collection
* fix: Add hover background to sidebar actions, add tooltip to new doc button
* Retain 'active' state on buttons when related context menu is open
* fix: Two more spots that deserve active background
* fix: New French translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: add disclosure and transition
* fix: keep collections expanded
* fix: tune transition and collapsing conditions
* fix: collectionIcon expanded props is no longer driven by expanded state
* fix: sync issue
* fix: managing state together
* fix: remove comment
* fix: simplify expanded state
* fix: remove extra state
* fix: remove animation and retain expanded state
* fix: remove isCollectionDropped
* fix: don't use ref
* review suggestions
* fix many functional and design issues
* don't render every single document in the sidebar, just ones that the user has seen before
* chore: Sidebar refinement (#3154)
* stash
* wip: More sidebar tweaks
* Simplify draft bubble
* disclosure refactor
* wip wip
* lint
* tweak menu position
* Use document emoji for starred docs where available
* feat: Trigger cmd+k from sidebar (#3149)
* feat: Trigger cmd+k from sidebar
* Add hint when opening command bar from sidebar
* fix: Clicking internal links in shared documents sometimes reroutes to Login
* fix: Spacing issues on connected slack channels list
* Merge
* fix: Do not prefetch JS bundles on public share links
* fix: Buttons show on collection empty state when user does not have permission to edit
* fix: the hover area for the "collections" subheading was being obfuscated by the initial collection drop cursor
* fix: top-align disclosures
* fix: Disclosure color PR feedback
fix: Starred no longer draggable
* fix: Overflow on sidebar button
* fix: Scrollbar in sidebar when command menu is open
* Minor alignment issues, clarify back in settings sidebar
* fix: Fade component causes SidebarButton missizing
Co-authored-by: Nan Yu <thenanyu@gmail.com>
Co-authored-by: Tom Moor <tom.moor@gmail.com>
Co-authored-by: Nan Yu <thenanyu@gmail.com>
* fix: New French translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Danish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New Vietnamese translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: add toc to mobile views and center the branding
* add padding to bottom of sidebar
* put the mobile branding inline
* finesse the padding
* make spelling of sign-in email less crazy looking
* move mobile sidebar button into header
* adds scene to search and 404 pages
* fix title alignment
* make filter buttons tight
* clean up unused imports
* lint
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* working state
* Selective deps upgrade, still working
* Update more deps, still working
* fix: Tweak checkbox items too bright while we're here
* Avoid prosemirror-view downgrade
* fix: Team logo shows as white in settings
fix: Team logo doesnt update in sidebar immediately after updating
refactor to ImageUpload component
* text
Remove menu hover styles on mobile
Fixed duplicate hover+active behavior on editor menus
Fixed editor menus visibly scroll to the top when reopened
Fixed some minor editor spacing issues
Renamed shred routeHelpers -> urlHelpers
* fix: New German translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Dutch translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Swedish translations from Crowdin [ci skip]
* fix: New Chinese Traditional translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Persian translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* feat: Added ability to click another user to observe them, mainly for fun
* language, lower debounce, prevent tooltip from hiding when toggling observation
* fix: Don't allow observing self, added banner at top of screen
* Dont edit tooltip as it's confusing between our actions and theirs
* snapshots
This PR moves the entire project to Typescript. Due to the ~1000 ignores this will lead to a messy codebase for a while, but the churn is worth it – all of those ignore comments are places that were never type-safe previously.
closes#1282
* updated readme to give some light testing instructions
* updated tests to accept new behavior for group memberships
* use test factories in more places
* add debug logs for mailer events in development
* feat: Remove explicit edit
* Restore revision remains disabled for now
* Bump RME, better differentiation of focused state
* fix: Star not visible in edit mode
* remove stray log
* fix: Occassional user context not available in collaborative persistence
* Add defaultUserRole on server
* Handle defaultUserRole on frontend
* Handle tests
* Handle user role in userCreator
* Minor improvments
* Fix prettier issue
* Undefined when isNewTeam is false
* Update app/scenes/Settings/Security.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Update app/scenes/Settings/Security.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Update app/scenes/Settings/Security.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Remove duplicate validation
* Update Team.js
* fix: Move note out of restricted width wrapper
* Move language setting to use 'note' prop
* Remove admin option
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* feat: Normalize logging
* Remove scattered console.error + Sentry.captureException
* Remove mention of debug
* cleanup dev output
* Edge cases, docs
* Refactor: Move logger, metrics, sentry under 'logging' folder.
Trying to reduce the amount of things under generic 'utils'
* cleanup, last few console calls
* fix: Remove Saving… message when collab enabled
* chore: Add tracing extension to collaboration server
* fix: Incorrect debounce behavior due to missing timestamps on events, fixes abundence of notifications when editing in realtime collab mode
* fix: Reload document prompt when collab editing
* Make request only when popover is visible
* Update policies required for shares.create shares.update
* Create withCollection scope
* Remove team share check from shares.create
* Update tests
* Select user role while sending invite
* Add tests to check for role
* Update app/scenes/Invite.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Use select
* Use inviteUser policy
* Remove unnecessary code
* Normalize rank/role
Fix text sizing of select input, fix alignment on users invite form
* Move component to root
* cleanup
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* perf: Remove no-longer-used 'backup' columns
These were added as part of the move to the v2 editor over a year ago incase any text was not correctly converted. After a year of use no cases of failed conversion have occurred that required the use of this column
* Remove migration, will do in 2-step release
* perf: Remove no-longer-used 'backup' columns
These were added as part of the move to the v2 editor over a year ago incase any text was not correctly converted. After a year of use no cases of failed conversion have occurred that required the use of this column
* feat: optimize dockerfile
use new dockerfile syntaxes
leverage multi-stage builds
strip yarn cache from image
use stricter yarn install command
run as a non-root user
* fix: mark yarn-deduplicate as a required dep
`yarn --production` will fail on a clean install otherwise
* fix: add sequelize required files for migrations
* fix: use correct ARG syntax for multistage builds
* revert: mark yarn-deduplicate as a required dep
no longer required as of 0b3adad751
* perf: Remove no-longer-used 'backup' columns
These were added as part of the move to the v2 editor over a year ago incase any text was not correctly converted. After a year of use no cases of failed conversion have occurred that required the use of this column
* Remove migration, will do in 2-step release
- Fixes enter with horizontal gap cursor
- Improves pasting behavior
- Fixes heading uncollapse when value changes
- Fixes notice blocks not hidden with other collapsed content
closes#2371
* fix: Publish button disabled on drafts in read-only mode
fix: Template selector appears on edited documents
* fix: Save button does not immediately come available when selecting a template
* fix: Template menu item alignment
closes#2204
* fixes: Use policy for display of star in document title
closes#2354
* fix: Modified time is sometimes bold when last edited user is current user
closes#2355
* fix: Allow starring of drafts
* Add migrations
* Handle previousTitles when titles is updated
* Add necessary test cases
* Use previous title while searching
* Rewrite logic to update previousTitles in beforeSave hook
* Update weights
* Update test to match new rank order
* Add tooltip to inform user on document
* Add code comment
* Remove previous title tooltip
* fix: Remove unused string, add model tests
Co-authored-by: Tom Moor <tom.moor@gmail.com>
fix: Show message in mobile TOC when no headings in document
fix: MenuItem with level should still have background edge-to-edge
fix: Show developer warning when creating incorrect menu item type
* Add TOC button for mobile
* Undo NewDocumentMenu changes
* Place the toc button in the correct position.
* Pass menu props to menuitem
* Update app/menus/TableOfContentsMenu.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Update app/menus/TableOfContentsMenu.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Use the existing prop type
* Write menu inside actions prop
* Prevent blank webpage behaviour for toc
* Use href instead of level to determine target
* Update app/scenes/Document/components/Header.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Add heading to menu items
* Use existing Heading component
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* fix: Input placeholder ellipsis
* fix: Hide scrollbar on nav tabs on mobile
* fix: Header actions should be fixed on mobile
* fix: Add fade when content in tabs does not fit in available horizontal width
* Align false conditions before true
* Update documents.delete endpoint for permanent delete
* Add permanent delete to events table and integrate with socket.io
* Add permanent delete to document menu
* Update parentDocumentId of direct child to null
* Add translation
* Add test for permanent delete
* Add space
* Update app/scenes/DocumentPermanentDelete.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Update app/stores/DocumentsStore.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Update server/commands/documentPermanentDeleter.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Update app/scenes/DocumentPermanentDelete.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Change socket room from team to collection
* Add translation
* Create log func for commands
* Move tests from utils to permanentDeleter command
* Add additional tests
* Set redirect to trash
* Return promise from beforeEach
* Add undeleted documents validation
* Include deleteAt attribute in db query
* Update server/commands/documentPermanentDeleter.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* tweak language
Co-authored-by: Tom Moor <tom.moor@gmail.com>
Updated the description of the SECRET_KEY variable in the .env.sample
file to clarify that the key needs to be 32 bytes long and hex-encoded.
The previous description of "32 character hexadecimal" was confusing
as it left open the possibility of a hex-encoded 16-byte key.
* fix: Unauthorized request to views.list from shared documents
* Bump dep styled-components
* chore: Normalize 'new' actions in settings area to top right
chore: Add translation hooks to API tokens screen
chore: Move API tokens loading to paginated list
* build: Webpack config - use named chunk ids
prevent invalidation across builds by using a deterministic chunkId algorithm
* fix: Autotrack chunk name syntax
* fix: New Polish translations from Crowdin [ci skip]
* fix: New Polish translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: Add application/octet-stream as a valid mimetype for docx uploads
* fix: Include application/octet-stream in frontend filter
fix: Add file size and file type guards
* Validate .docx extension in files with application/octet-stream mimetype
* refactor: Move MAXIMUM_IMPORT_SIZE to an optional environment config
fix: Add file size check on server too
Co-authored-by: Saumya Pandey <sp160899@gmail.com>
* feat: Add search
* feat: New design for keyboard shortcuts guide
feat: Include quick search
fix: Add missing shortcuts
* tweaks
* fix: Two other spots that should trigger guide-style instead of modal
* sink,lift -> indent,outdent
* fix: Animation should slide out as well as in
* feat: Add collection iconography and colors to Slack settings page
fix: Use standardized list components
fix: Slack icon size
chore: Convert to translation strings
* fix: Missing translation, convert to Scene
* chore: Migrations
* chore: Add recording of share link views
* feat: Add display of share link accessed date in admin
* translations
* test
* translations, admin pagination
fix: Severla context menus miss-positioned
fix: Search filters not large enough on mobile
fix: Deep black background on mobile to match native apps
fix: Sticky document header allowing horizontal scrolling on mobile
* Introduce isViewer field
* Update policies
* Make users read-only feature
* Remove not demoting current user validation
* Update tests
* Catch the unhandled promise rejection
* Hide unnecessary ui elements for read-only user
* Update app/scenes/Settings/People.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Remove redundant logic for admin only policies
* Use can logic
* Update snapshot
* Remove lint error
* Update snapshot
* Minor fix
* Update app/menus/UserMenu.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Update server/api/users.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Update app/components/DocumentListItem.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Update app/stores/UsersStore.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Use useCurrentTeam hook in functional component
* Update translation
* Update ternary
* Remove punctuation
* Move the functions to User model
* Update share policy and shareMenu
* Rename makeAdmin to promote
* Create updateCounts function and Rank enum
* Update tests
* Remove enum
* Use async await, remove enum and create computed accessor
* Remove unused variable
* Fix lint issues
* Hide templates
* Create shared/types and use rank type from it
* Delete shared/utils/rank type file
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* chore: Show all configuration errors at once
fix: Remove requirement for deprecated Slack key
fix: Add requirement for UTILS_SECRET
* chore: Add funding/sponsorship message
* fix: Enforce single team when self hosting
* test: positive case
* refactor
* fix: Visible error message on login screen for max teams scenario
* Update Notices.js
* lint
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
- Added `accountProvisioner`
- Move authentication to use passport strategies
- Make authentication more pluggable
- Change language of services -> providers
closes#1120
* feat: Collection to standard header
feat: Sticky tabs
* chore: Document to standard header
* chore: Dashboard -> Home
chore: Scene component
* chore: Trash, Templates, Drafts
* fix: Mobile improvements
* fix: Content showing at sides and occassionally ontop of sticky headers
* feat: add total users to pagination
* move this.total in runInAction callback
* add total counts + counts to people tabs
* progress: use raw pg query
* progress: add test
* fix: SQL interpolation
* Styling and translation of People page
Co-authored-by: Tim <timothychang94@gmail.com>
* feat: Added ability to disable sharing at collection
* fix: Disable all previous share links when disabling collection share
Language
* fix: Disable document sharing for read-only collection members
* wip
* test
* fix: Clear policies after updating sharing settings
* chore: Less ambiguous language
* feat: Allow setting sharing choice on collection creation
* fix: New French translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* add google drawings integration
* add google drawings image
* update google drawings image and regex
* allow query parameter in google drawings regex
* support CDN for google drawings image
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Thai translations from Crowdin [ci skip]
* fix: New Italian translations from Crowdin [ci skip]
* fix: Restore DNS prefetching for static resources
* fix: CDN paths
feat: preload instead of prefetch for key bundles
* csp
* fix: Turns out prefetch-src is still behind a flag in Chrome, not publicly available yet
* implement google drive extension
* add current logo of google drive
* fix issue when posting gdrive links which are already a preview
* always only show the preview
* Add bottom bar to get to original url for Google Drive embeds
Co-authored-by: Tom Moor <tom.moor@gmail.com>
- Makes menus fully accessible and keyboard driven
- Currently adds 2.8% to initial bundle size due to the inclusion of Reakit and its dependency, popperjs.
- Converts all menus to functional components
- Remove old custom menu system
- Various layout and flow improvements around the menus
closes#1766
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* tweaking effect details
* wrap work on this feature
* adds correct color to drop cursor
* simplify logic for early return
* much better comment so Tom doesn't fire me
* feat: Allow changing sort order of collections
* refactor: Move validation to model
feat: Make custom order the default (in prep for dnd)
* feat: Add sort choice to edit collection modal
fix: Improved styling of generic InputSelect
* fix: Vertical space left after removing previous collection description
* chore: Tweak language, menu contents, add auto-disclosure on sub menus
* only show drop-to-reorder cursor when sort is set to manual
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* wip: added some basic drag and drop UI for combining items
* refactor: pathToDocument to accept only id
* fix: Multiple drop backends error
fix: Incorrect styling dragging over active collection
fix: Stay in disabled state until save is complete
* Improving display while moving doc
* fix: update by user should be changed when moving a doc
* add move guard to drag
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* fix: New French translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Spanish translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Japanese translations from Crowdin [ci skip]
* fix: New Portuguese translations from Crowdin [ci skip]
* fix: New Russian translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New Korean translations from Crowdin [ci skip]
* fix: Attachments should not be deleted when their original document is deleted when referenced elsewhere
* fix: Attachments deleted prematurely when docs are placed in trash
* mock
* restore hook, cascading delete was the issue
* fix: New German translations from Crowdin [ci skip]
* fix: New German translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Chinese Simplified translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* fix: New French translations from Crowdin [ci skip]
* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
* Update server/api/share.js to send 204 status for unshared documents.
* Update shares.info endpoint to expect 204 in a few test.
* Update SharesStore and ApiClient to handle 204 status code
* feat: i18n
* Changing language single source of truth from TEAM to USER
* Changes according to @tommoor comments on PR
* Changed package.json for build:i18n and translation label
* Finished 1st MVP of i18n for outline
* new translation labels & Portuguese from Portugal translation
* Fixes from PR request
* Described language dropdown as an experimental feature
* Set keySeparator to false in order to cowork with html keys
* Added useTranslation to Breadcrumb
* Repositioned <strong> element
* Removed extra space from TemplatesMenu
* Fortified the test suite for i18n
* Fixed trans component problematic
* Check if selected language is available
* Update yarn.lock
* Removed unused Trans
* Removing debug variable from i18n init
* Removed debug variable
* test: update snapshots
* flow: Remove decorator usage to get proper flow typing
It's a shame, but hopefully we'll move to Typescript in the next 6 months and we can forget this whole Flow mistake ever happened
* translate: Drafts
* More translatable strings
* Mo translation strings
* translation: Search
* async translations loading
* cache translations in client
* Revert "cache translations in client"
This reverts commit 08fb61ce36.
* Revert localStorage cache for cache headers
* Update Crowdin configuration file
* Moved translation files to locales folder and fixed english text
* Added CONTRIBUTING File for CrowdIn
* chore: Move translations again to please CrowdIn
* fix: loading paths
chore: Add strings for editor
* fix: Improve validation on documents.import endpoint
* test: mock bull
* fix: Unknown mimetype should fallback to Markdown parsing if markdown extension (#1678)
* closes#1675
* Update CONTRIBUTING
* chore: Add link to translation portal from app UI
* refactor: Centralize language config
* fix: Ensure creation of i18n directory in build
* feat: Add language prompt
* chore: Improve contributing guidelines, add link from README
* chore: Normalize tab header casing
* chore: More string externalization
* fix: Language prompt in dark mode
Co-authored-by: André Glatzl <andreglatzl@gmail.com>
* Prevent API request for views data for deleted documents
Added a conditional statement to check if the document.deletedAt is falsy before making a request to views.list.
* Update app/components/Collaborators.js to use isDeleted attribute.
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* chore: Add additional missing events
signed in
profile updated
team setting updated
* Minor refactor to DRY existing code
* Add events
* lint
* flow: Add missing ip to event types
* feat: Sync sessions across browser tabs
If the user signs in or out in one tab, then make sure their session on the same subdomain is kept in sync on other tabs
* fix: Use get request instead of cookie to transfer token between domains
* Add domain to database
Add redirects to team domain when present
* 30s -> 1m
* fix: Avoid redirect loop if subdomain and domain set
* fix: Create a transfer specific token to prevent replay requests
* refactor: Move isCustomDomain out of shared as it won't work on the client
* Update backlinks service to not rely on revisions
* fix: Add missing index for finding backlinks
* Debounce revision creation (#1616)
* refactor debounce logic to service
* Debounce slack notification
* Revisions created by service
* fix: Revision sidebar latest
* test: Add tests for notifications
* feat: Support importing .docx or .html files as new documents (#1551)
* Support importing .docx as new documents
* Add html file support, build types and interface for easily adding file types to importer
* fix: Upload embedded images in docx to storage
* refactor: Bulk of logic to command
* refactor: Do all importing on server, so we're not splitting logic for import into two places
* test: Add documentImporter tests
Co-authored-by: Lance Whatley <whatl3y@gmail.com>
* fix: Accessibility audit
* fix: Quick fix, non editable title
closes#1560
* fix: Embed selection
Co-authored-by: Lance Whatley <whatl3y@gmail.com>
* Support importing .docx as new documents
* Add html file support, build types and interface for easily adding file types to importer
* fix: Upload embedded images in docx to storage
* refactor: Bulk of logic to command
* refactor: Do all importing on server, so we're not splitting logic for import into two places
* test: Add documentImporter tests
Co-authored-by: Lance Whatley <whatl3y@gmail.com>
* feat/editable-titles
* feat: Double click to edit titles in the sidebar
* Take into account policies
* fix: Title update on another client
* Improved styling
* refactor: Remove babel/register for instant production server startup
* fix: Update procfile location
* fix: package.json must be copied, not linked for production build
* fix: Production file paths
* fix: Public assets path
* Remove unused scripts
* fix: Focus ring appearing on click
fix: Focus ring not appearing on sidebar links
add: focus-visible polyfill
* fix: More visible outlines on keyboard focus
fix: Header block should be a button semantically
* core search logic
* bump version of rich markdown editor
* let shift and meta modifiers do their thing when clicking on a link in a doc
* version bump editor
* test: Add parseDocumentSlug test
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* handle delete events fron collection and document sockets
* handle collection deletes to documents
* rework semantics to always reload after a delete
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* fix: Remove limit of displayed results on Move dialog
* fix: Filter templates from results
* Show final document location on hover/active, reduces visual noise
* fix: Update package.json build script to yarn.
Update package.json build script to use yarn instead of npm to maintain consistency with the rest of scripts. I was running into an issue with the Dockerfile when using nvm with yarn and this fixed the issue.
* Upgrade pg and sequelize to support node 14+
When Node 14 came out the app was incompatible, we should always have a maximum version defined here until the server code has been tested to prove compatibility
Co-authored-by: Lance Whatley <whatl3y@gmail.com>
- Allow template move in document policy
- fix: Ensure that document is not added to collection structure in documentMover command
- fix: Moving a template should now show nested documents as options
- fix: Hitting 'm' should not allow moving a draft
- fix: Styling of seperators on move screen
2020-08-20 19:46:29 -07:00
1793 changed files with 118557 additions and 77719 deletions
stale-pr-message:"This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days"
stale-issue-message:"This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days"
close-pr-message:"Automatically closed due to inactivity"
close-issue-message:"Automatically closed due to inactivity"
<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>
<i>A fast, collaborative, knowledge base 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>
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
# Installation
Outline requires the following dependencies:
Please see the [documentation](https://app.getoutline.com/share/770a97da-13e5-401e-9f8a-37949c19f97e/) for running your own copy of Outline in a production configuration.
- Node.js >= 12
- Postgres >=9.5
- Redis >= 4
- AWS S3 storage bucket for media and other attachments
- Slack or Google developer application for authentication
If you have questions or improvements for the docs please create a thread in [GitHub discussions](https://github.com/outline/outline/discussions).
# Development
### Development
There is a short guide for [setting up a development environment](https://app.getoutline.com/share/770a97da-13e5-401e-9f8a-37949c19f97e/doc/local-development-5hEhFRXow7) if you wish to contribute changes, fixes, and improvements to Outline.
In development you can quickly get an environment running using Docker by following these steps:
## Contributing
1. Install these dependencies if you don't already have them
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
Outline is built and maintained by a small team – we'd love your help to fix bugs and add features!
Before submitting a pull request _please_ discuss with the core team by creating or commenting in an issue on [GitHub](https://www.github.com/outline/outline/issues) – 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. This will result in a much higher liklihood of your code being accepted.
### Production
If you’re looking for ways to get started, here's a list of ways to help us improve Outline:
For a self-hosted production installation there is more flexibility, but these are the suggested steps:
- [Translation](docs/TRANSLATION.md) into other languages
- 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
1. Clone this repo and install dependencies with `yarn` or `npm install`
## Architecture
> Requires [Node.js](https://nodejs.org/) and [yarn](https://yarnpkg.com) installed
If you're interested in contributing or learning more about the Outline codebase
please refer to the [architecture document](docs/ARCHITECTURE.md) first for a high level overview of how the application is put together.
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
## Debugging
> Port number can be changed in the `.env` file
In development Outline outputs simple logging to the console, prefixed by categories. In production it outputs JSON logs, these can be easily parsed by your preferred log ingestion pipeline.
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.
## Development
### Server
Outline uses [debug](https://www.npmjs.com/package/debug). To enable debugging output, the following categories are available:
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
HTTP logging is disabled by default, but can be enabled by setting the `DEBUG=http` environment variable.
## Tests
@@ -140,28 +61,41 @@ To add new tests, write your tests with [Jest](https://facebook.github.io/jest/)
```shell
# To run all tests
yarntest
maketest
# To run backend tests in watch mode
make watch
```
Once the test database is created with `make test` you may individually run
frontend and backend tests directly.
```shell
# To run backend tests
yarn test:server
# To run a specific backend test
yarn test:server myTestFile
# To run frontend tests
yarn test:app
```
## Contributing
## Migrations
Outline is built and maintained by a small team – we'd love your help to fix bugs and add features!
Sequelize is used to create and run migrations, for example:
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!
"description":"https://{your app name}.herokuapp.com, or the domain you are binding to",
"required":true
},
"GOOGLE_CLIENT_ID":{
@@ -51,15 +55,58 @@
"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",
"AZURE_CLIENT_ID":{
"description":"To configure Microsoft/Azure auth, you'll need to create an OAuth Client. See the guide for details on setting up your Azure App: https://wiki.generaloutline.com/share/dfa77e56-d4d2-4b51-8ff8-84ea6608faa4",
"required":false
},
"SLACK_KEY":{
"AZURE_CLIENT_SECRET":{
"description":"",
"required":false
},
"AZURE_RESOURCE_APP_ID":{
"description":"",
"required":false
},
"OIDC_CLIENT_ID":{
"description":"To configure generic OIDC auth, you'll need some kind of identity provider. See documentation for whichever IdP you use to acquire the following info; Redirect URI is https://<URL>/auth/oidc.callback",
"required":false
},
"OIDC_CLIENT_SECRET":{
"description":"",
"required":false
},
"OIDC_AUTH_URI":{
"description":"",
"required":false
},
"OIDC_TOKEN_URI":{
"description":"",
"required":false
},
"OIDC_USERINFO_URI":{
"description":"",
"required":false
},
"OIDC_USERNAME_CLAIM":{
"description":"Specify which claims to derive user information from. Supports any valid JSON path with the JWT payload",
"value":"preferred_username",
"required":false
},
"OIDC_DISPLAY_NAME":{
"description":"Display name for OIDC authentication",
"value":"OpenID",
"required":false
},
"OIDC_SCOPES":{
"description":"Space separated auth scopes.",
"value":"openid profile email",
"required":false
},
"SLACK_CLIENT_ID":{
"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.",
"description":"A logo that will be displayed on the signed out home page",
"required":false
},
"DEFAULT_LANGUAGE":{
"value":"en_US",
"description":"The default interface language. See translate.getoutline.com for a list of available language codes and their rough percentage translated.",
defaults="Are you sure about that? Deleting the <em>{{collectionName}}</em> collection is permanent and cannot be restored, however documents within will be moved to the trash."
values={{
collectionName: collection.name,
}}
components={{
em:<strong/>,
}}
/>
</Text>
{team.defaultCollectionId===collection.id?(
<Texttype="secondary">
<Trans
defaults="Also, <em>{{collectionName}}</em> is being used as the start view – deleting it will reset the start view to the Home page."
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.