105 Commits

Author SHA1 Message Date
Salihu
430883f186 feat: Custom emoji (#10513)
Towards #9278
2025-12-01 02:31:50 +01:00
Tom Moor
ac06a06a66 feat: Diagrams/Draw.io integration (#10707)
* wip

* wip

* tsc

* lint

* Detect imported Draw.io

* Add empty diagram placeholder

* fix: Do not close editor on save
fix: Account for nodes moving / multiplayer

* fix: Reduce image menu for diagrams

* Add custom server settings page

* refactor

* sp

* Move edit button
2025-11-29 21:02:08 +01:00
codegen-sh[bot]
bf9065d6e6 Add description column to groups (#10511)
* Add description column to groups

- Add database migration to add description column to groups table
- Update server-side Group model with description field and validation
- Update group presenter to include description in API responses
- Update API schemas to validate description field in create/update operations
- Update client-side Group model with description field and search integration
- Update unfurl types and presenter to include description for hover cards
- Update HoverPreviewGroup component to display description in UI

The description field is optional with a 2000 character limit and is included
in group search functionality.

* Fix TypeScript error: Add missing description prop to HoverPreviewGroup

The HoverPreviewGroup component expects a description prop but it wasn't being passed from HoverPreview.tsx. This was causing the types check to fail with:

error TS2741: Property 'description' is missing in type '{ ref: MutableRefObject<HTMLDivElement | null>; name: any; memberCount: any; users: any; }' but required in type 'Props'.

Fixed by adding the description prop from data.description which is available in the UnfurlResponse[UnfurlResourceType.Group] type.

* Move 2000 char validation to shared constant

- Add GroupValidation.maxDescriptionLength constant to shared/validations.ts
- Update server Group model to use GroupValidation.maxDescriptionLength
- Update API schemas to use the shared constant instead of hardcoded value
- Ensures consistent validation across the entire application

* Add description field to CreateGroupDialog and EditGroupDialog

- Add description textarea input to both create and edit group dialogs
- Import GroupValidation constant for consistent character limit validation
- Set maxLength to GroupValidation.maxDescriptionLength (2000 chars)
- Include description in form submission for both create and update operations
- Add placeholder text for better UX
- Maintain backward compatibility with optional description field

* Add description column to GroupsTable

- Add description column between name and members columns
- Display group description with fallback to em dash (—) for empty descriptions
- Use secondary text styling for consistent visual hierarchy
- Set column width to 2fr for adequate space
- Maintain sortable functionality through accessor

* tweaks

* animation

---------

Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
2025-10-31 11:36:26 -04:00
codegen-sh[bot]
3269eacf68 Add hover card for group mentions (#10432)
* Add hover card for group mentions

- Add Group type to UnfurlResourceType enum
- Create HoverPreviewGroup component following HoverUser pattern
- Add server-side support for group unfurling in URLs route
- Display group name, member count, and member avatars in hover card
- Implement presentGroup function in unfurl presenter

Fixes #10418

* Fix TypeScript errors in group hover card implementation

- Make presentGroup async to properly handle group.memberCount Promise
- Update presentUnfurl to await presentGroup result
- Fix Facepile users prop by creating User-like objects with required properties
- Add User import to HoverPreviewGroup component

Fixes TypeScript compilation errors:
- TS2322: Type mismatch in HoverPreviewGroup.tsx
- TS2362: Arithmetic operation type error in unfurl.ts
- TS2322: Promise<number> not assignable to number in unfurl.ts

* tweaks

* tweaks

---------

Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
2025-10-22 21:04:58 -04:00
Salihu
e86593f234 feat: add group mentions (#10331)
* add group mentions

* group mention functionality

* add notification test

* fix: Group icon in mention menu

* language

* toast message

* fix: Group icon in mention menu light mode color

---------

Co-authored-by: Tom Moor <tom@getoutline.com>
2025-10-19 15:40:10 -04:00
Apoorv Mishra
95f0c42d56 Mention chip for regular URLs (#10327)
* fix: replace oembed with iframely

* feat: wip

fix: favicon

* fix: missing icon in API response
2025-10-10 19:40:05 -04:00
codegen-sh[bot]
38beca412e Add originalDocumentId to sourceMetadata when duplicating documents (#10215)
- Added originalDocumentId property to SourceMetadata type
- Updated documentDuplicator to set originalDocumentId for both parent and child documents
- Added comprehensive tests to verify the functionality works correctly
- Preserves existing sourceMetadata while adding the new property

Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
2025-09-20 08:34:28 -04:00
codegen-sh[bot]
70321350d4 Add TeamPreference to prevent document embedding (#10192)
* Add TeamPreference to prevent document embedding

- Add PreventDocumentEmbedding enum value to TeamPreference
- Add default value (false) to maintain backward compatibility
- Update TeamPreferences interface with new boolean property
- Modify renderShare function to respect team preference
- When preference is true, X-Frame-Options header is kept to prevent iframe embedding
- When preference is false (default), X-Frame-Options is removed to allow embedding

* Add preventDocumentEmbedding to TeamsUpdateSchema

- Add preventDocumentEmbedding boolean field to the preferences object in TeamsUpdateSchema
- This allows the new TeamPreference to be modified through the API
- The existing teamUpdater function will automatically handle the new preference
- API responses will include the preference via the presentTeam function

---------

Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
2025-09-16 21:36:16 -04:00
Tom Moor
617504d8bb feat: Add group admin role (#10030)
* Add admin role to GroupUser

This change adds an admin role to GroupUser that allows group admins to:
1. Administer other users in the group
2. Change the group name

Changes include:
- Database migration to add isAdmin field to group_users table
- Updated GroupUser model to include isAdmin field
- Added isGroupAdmin policy utility function
- Updated group policy to allow group admins to update groups
- Added API endpoints for managing admin status
- Updated GroupUsersStore to handle admin functionality
- Added tests for the new functionality

* Replace isAdmin with role-based approach for GroupUser

- Added role field to GroupUser model using UserRole.Admin and UserRole.Member
- Created migration to convert isAdmin boolean to role enum
- Updated policies to be synchronous and require pre-loaded relationships
- Updated API endpoints to support both role and legacy isAdmin parameters
- Updated GroupUsersStore to handle role-based functionality
- Updated tests to use role instead of isAdmin
- Maintained backward compatibility with isAdmin in presenters

* Remove isAdmin logic from GroupUser implementation

- Removed isAdmin parameter from GroupUsersStore methods
- Removed isAdmin field from presenter output
- Removed isAdmin from API schemas
- Removed isAdmin parameter handling in API endpoints
- Updated tests to use role instead of isAdmin
- Simplified role handling throughout the codebase

* lint

* tests

* role -> permission

* fe

* test

* Change permission label from 'Admin' to 'Manage'

---------

Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
2025-09-01 05:10:32 -04:00
codegen-sh[bot]
4fc6ac1f15 Add in-app reaction notifications (#9893)
* Add ReactionsCreate notification event type

- Add ReactionsCreate to NotificationEventType enum and defaults
- Add notification settings UI with SmileyIcon and proper labels
- Create ReactionsCreateNotificationsTask to handle comment reactions
- Update NotificationsProcessor to handle comments.add_reaction events
- Add eventText and path handling in client Notification model
- Notifications are enabled by default but never send emails

* Applied automatic fixes

* Show the actual emoji in the notification

* Cleanup notifications if reaction is removed

* PR feedback

---------

Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
2025-08-11 18:54:43 -04:00
codegen-sh[bot]
879c568a2c Upgrade Prettier to v3.6.2 (#9500)
* Upgrade Prettier to v3.6.2 and eslint-plugin-prettier to v5.5.1

- Upgraded prettier from ^2.8.8 to ^3.6.2 (latest version)
- Upgraded eslint-plugin-prettier from ^4.2.1 to ^5.5.1 for compatibility
- Applied automatic formatting changes from new Prettier version
- All existing ESLint and Prettier configurations remain compatible

* Applied automatic fixes

* Trigger CI

---------

Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
2025-06-28 10:22:28 -04:00
Tom Moor
a06671e8ce OAuth provider (#8884)
This PR contains the necessary work to make Outline an OAuth provider including:

- OAuth app registration
- OAuth app management
- Private / public apps (Public in cloud only)
- Full OAuth 2.0 spec compatible authentication flow
- Granular scopes
- User token management screen in settings
- Associated API endpoints for programatic access
2025-05-03 19:40:18 -04:00
Hemachandar
9274f56ef6 Show correct icon & color for GitHub draft PR (#9063) 2025-04-25 17:37:54 -04:00
Hemachandar
de6c1735d9 feat: Linear integration (#9037)
* linear settings and oauth

* unfurl

* unfurl impl fix for recent merge from main

* fetch labels

* state icon

* linear icon

* uninstall hook

* lint

* i18n

* cleanup

* use workspace key, reduce icon size

* determine completion percentage

* extract completionPercentage to separate method
2025-04-24 07:50:48 -04:00
Hemachandar
51cb5bffce Cache issueSources for embed integrations (#8952)
* Cache `issueSources` for embed integrations

* lock model before update
2025-04-22 09:59:39 -04:00
Hemachandar
bf6a56849e Show GitHub issues and pull requests as mentions (#8870)
* mention issue works

* pr and loading works

* error node

* tweak mention display

* handle multiple creation error

* tidy

* store unfurl in mention attrs

* simplify mention code creation

* test fix

* base feedback

* update node when pos is available

* delete local UnfurlsStore

* use unfurl from store

* Optimize lodash isMatch import statement

* fix: Copy/paste of issue mentions
fix: Icon alignment
fix: Error and loading mentions are unselectable

* Switch order in paste menu

---------

Co-authored-by: Tom Moor <tom@getoutline.com>
2025-04-13 06:09:13 -07:00
Hemachandar
6e98568e5b API importer for Notion (#8710) 2025-03-23 12:19:13 -07:00
Tom Moor
a48f6c7a85 fix: Unsubscribe link for collection subscriptions (#8734)
* fix: Cannot unsubscribe from collection subscriptions via email token

* tests

* Separate redirect for pass through

* Delete both subscriptions

* Test draft documents
2025-03-22 08:22:20 -07:00
Tom Moor
08f91aa60c fix: Error rendering read only editor with paragraph without text content (#8730) 2025-03-20 13:46:53 +00:00
YouLL
d551a1a10b feat: collection mentions (#8529)
* feat: init collection mention

* refactor: dedicated search helper function for collection mentions

* feat: add test for collection search function helper

* feat: parseCollectionSlug

* feat: isCollectionUrl

* feat: add collection mention to paste handler

* fix: update translation of mention keyboard shortcut

* fix: keyboard shortcut mention label

* fix: missing teamId in search helper functioN

* chore: update translations

---------

Co-authored-by: Tom Moor <tom@getoutline.com>
2025-03-03 19:03:27 -08:00
Hemachandar
6a1f2399db feat: Collection subscription (#8392)
* feat: Collection subscription

* refactor to use latest impl

* load subscriptions only once

* tests, type rename, migration index

* all users in publish flow

* tsc

* remove SubscriptionType.Collection enum

* review
2025-02-22 06:53:19 -08:00
Tom Moor
73086139d2 Document mentions (#8225) 2025-01-17 15:56:38 -08:00
infinite-persistence
e8bddbe104 Notification for resolved comment (#8045)
* fix: probably copy-pasted function description

* fix: userIdsMentioned was always empty

* add: NotificationEventType.ResolveComment

* move: split handler for "mentioned" vs. "resolved"

The recipients for "resolved" will include more people (creator, repliers, mentioned), so it's easier to just split the handler than trying to augment it.

* implement: handleResolvedComment

* clone: CommentMentionedEmail as CommentResolvedEmail

Changes coming up in next commit...

* implement: CommentResolvedEmail

* Fix "New Comment↓" incorrectly showing in Resolved

## Repro 1 (with production code)
1. In a list of long resolved comments, scroll up and select the first one.
2. From another account, resolve another comment. The hint appears.

## Repro 2 (with production code)
1. Select Most-Recent, then Resolved.
2. F5. It's scrolled all the way to the bottom.

## Repro 3 (after this PR)
1. Click on the notification when someone resolved a comment. The screen jumps to "Resolved" + showing hint unnecessarily.

## Fix
The scrolling and hint was meant for Most Recent only, but missed out this case since "Resolve" is not part of the enum.

* Better sentences

* Refactor "mentions + author" calculation

* Remove unnecessary check

The resolver is already added to `userIdsNotified` from the start, so no point checking it again here.
2024-12-04 15:10:03 -08:00
infinite-persistence
f5de2834d6 Add user preference to disable smart quotes (#7881) 2024-11-05 16:45:06 -08:00
Tom Moor
74192040a2 Add new security preference (#7879)
* Add security preference to remove document content in email notifications

* Refactor, reduce chance of misuse
2024-11-03 05:59:11 -08:00
Hemachandar
de04d1c0c5 feat: Comment reactions (#7790)
Co-authored-by: Tom Moor <tom@getoutline.com>
2024-11-02 10:58:03 -07:00
Hemachandar
57e9abd77f feat: allow sort by position for comments (#7770)
* feat: allow sort by position for comments

* wait for prosemirror nodes to load

* Move to menu

* remove sort; rename enum

* asc sort for in-thread display

* revert sort

---------

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2024-10-22 20:18:33 -07:00
Apoorv Mishra
0d7ce76c21 Allow querying by user emails in order to @mention them (#7807)
* fix: readEmail permission

* fix: allow querying over user email in users.list

* fix: allow searching by email in @mention

* fix: include email in mentioned user's hover card

* fix: put email on separate line in hover card
2024-10-22 20:24:11 +05:30
Tom Moor
9680e57849 chore: Remove suppressImplicitAnyIndexErrors TS rule (#7760) 2024-10-11 12:46:46 -07:00
Apoorv Mishra
35ff70bf14 Archive collections (#7266)
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2024-10-06 05:37:11 -07:00
Meng Sen
f3fe73057a feat: add Umami (#7366)
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2024-09-07 15:15:35 -07:00
Tom Moor
4a009ed35b feat: Adds team preference to disable user account removal (#7556)
* feat: Adds team preference to disable user account removal

* Switch to using policy
2024-09-07 10:36:41 -07:00
Tom Moor
1491fc2eb4 fix: Allow dragging shared documents to starred section (#7506)
* fix: Allow dragging shared documents to starred section

* fix: Allow read-only collection drag and drop
fix: Full screen delete modal from drag and drop
2024-09-01 14:19:40 -07:00
Tom Moor
43cf33fc0a fix: Light icons are not responsive to dark theme 2024-07-07 21:06:04 -04:00
Tom Moor
117c4f5009 feat: Comment resolving (#7115) 2024-07-02 03:55:16 -07:00
Hemachandar
6fd3a0fa8a feat: Unified icon picker (#7038) 2024-06-23 06:31:18 -07:00
Hemachandar
3edaf4f8ea feat: TOC position for publicly shared docs (#7057)
* feat: TOC position for publicly shared docs

* remove preferences object

* comment

* fix: Allow sidebar position preference without public branding switch

---------

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2024-06-16 17:26:29 -04:00
Hemachandar
05c1bee412 feat: allow user to set TOC display preference (#6943)
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2024-06-16 09:21:08 -07:00
Tom Moor
df3cd22aee Matomo integration (#7009) 2024-06-12 05:03:38 -07:00
Tom Moor
7bf5c4e533 Add manage permission to documents (#7003) 2024-06-10 17:38:23 -07:00
Tom Moor
025ee63f0b Add MembersCanCreateApiKey team preference 2024-06-05 08:30:30 -04:00
Tom Moor
d51267b8bc JSON to client (#5553) 2024-05-24 05:29:00 -07:00
Apoorv Mishra
6a4628afef Refactor unfurling related types (#6730)
* wip

* fix: refactor unfurl types
2024-04-03 07:28:30 +05:30
Tom Moor
c27cd945a7 Policies refactor, guest roles (#6732) 2024-03-31 17:28:35 -07:00
Apoorv Mishra
450d0d9355 Github integration (#6414)
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2024-03-23 07:09:28 -07:00
Tom Moor
cbdacc7cfd Add ability to link Slack <-> Outline accounts (#6682) 2024-03-18 18:21:38 -07:00
Tom Moor
fe4c2fb7d6 chore: Add eslint rule for no-shadow (#6658)
* chore: Add eslint rule for no-shadow

* fix
2024-03-09 13:04:27 -08:00
Apoorv Mishra
34e8a64b50 Share env vars client-side using @Public decorator (#6627)
* fix: public env vars using decorator

* fix: relocate

* fix: use env.public

* fix: register public env vars across plugins

* fix: test

* fix: tsc

* fix: mark remaining ones as public

* fix: move oidc ones to plugin

* fix: prevent overwrite

* fix: review
2024-03-09 14:48:59 +05:30
Tom Moor
f9a11a28d8 chore: Plugin registration (#6623)
* first pass

* test

* test

* priority

* Reduce boilerplate further

* Update server/utils/PluginManager.ts

Co-authored-by: Apoorv Mishra <apoorvmishra101092@gmail.com>

* fix: matchesNode error in destroyed editor transaction

* fix: Individual imported files do not display source correctly in 'Insights'

* chore: Add sleep before Slack notification

* docs

* fix: Error logged about missing plugin.json

* Remove email template glob

---------

Co-authored-by: Apoorv Mishra <apoorvmishra101092@gmail.com>
2024-03-08 20:32:05 -08:00
Tom Moor
df9f8cbabc Display import source data on documents (#6651)
* Display import source in Insights

* Ensure sourceMetadata is not returned on public requests

* Support createdByName

* Prefer display source name
2024-03-07 16:33:56 -08:00