* 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>
* 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>
* 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>
- 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>
* 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>
* 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>
* 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>
* 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>
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
* 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>
* fix: Cannot unsubscribe from collection subscriptions via email token
* tests
* Separate redirect for pass through
* Delete both subscriptions
* Test draft documents
* 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
* 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.
* 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>
* 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
* 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
* 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>
* 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