* fix: Logic error in toast
fix: Remove useless component
* fix: Logout not clearing all stores
* Add icons to notification settings
* Add eslint rule to enforce spaced comment
* Add eslint rule for arrow-body-style
* Add eslint rule to enforce self-closing components
* Add menu to api key settings
Fix: Deleting webhook subscription does not remove from UI
Split webhook subscriptions into active and inactive
Styling updates
* Comment model
* Framework, model, policy, presenter, api endpoint etc
* Iteration, first pass of UI
* fixes, refactors
* Comment commands
* comment socket support
* typing indicators
* comment component, styling
* wip
* right sidebar resize
* fix: CMD+Enter submit
* Add usePersistedState
fix: Main page scrolling on comment highlight
* drafts
* Typing indicator
* refactor
* policies
* Click thread to highlight
Improve comment timestamps
* padding
* Comment menu v1
* Change comments to use editor
* Basic comment editing
* fix: Hide commenting button when disabled at team level
* Enable opening sidebar without mark
* Move selected comment to location state
* Add comment delete confirmation
* Add comment count to document meta
* fix: Comment sidebar togglable
Add copy link to comment
* stash
* Restore History changes
* Refactor right sidebar to allow for comment animation
* Update to new router best practices
* stash
* Various improvements
* stash
* Handle click outside
* Fix incorrect placeholder in input
fix: Input box appearing on other sessions erroneously
* stash
* fix: Don't leave orphaned child comments
* styling
* stash
* Enable comment toggling again
* Edit styling, merge conflicts
* fix: Cannot navigate from insights to comments
* Remove draft comment mark on click outside
* Fix: Empty comment sidebar, tsc
* Remove public toggle
* fix: All comments are recessed
fix: Comments should not be printed
* fix: Associated mark should be removed on comment delete
* Revert unused changes
* Empty state, basic RTL support
* Create dont toggle comment mark
* Make it feel more snappy
* Highlight active comment in text
* fix animation
* RTL support
* Add reply CTA
* Translations
* refactor: attaching emoji in tree node is unnecessary
* refactor: pass depth and hasChildren as separate props
* refactor: move tree impl into a separate hook
* refactor: separate out as DocumentExplorer for reuse
* fix: separate search and node
* fix: review comments
* fix: tsc
* fix: Pasting from Microsoft Office pastes image. Closes#3058
* fix: Use Storage wrapper implementation for all editor calls to localStorage
closes#4776
* feat: initial base structure
* feat: utils for constructing and flattening collection tree
* feat: basic demo to display tree-like structure with virtualization
* feat: make it searchable
* feat: row component
* fix: handle row selection
* fix: scroll jitter
* fix: popover max-height to eliminate extra scroll
* fix: position scrollbar correctly
* fix: do not sort to maintain correct tree-like view
* feat: footer
* fix: scroll to selected item
* fix: deselect item
* fix: display selected location in footer
* fix: deselect item if any upon search trigger
* fix: create draft without collection
* fix: pass down collectionId to all the nodes
* feat: publish document under selected location
* fix: move the doc post publish in case it is supposed to be a nested doc
* fix: wrap text for selected location
* fix: footer background in dark mode and unused css
* fix: popover height in small devices
* fix: no need to spread
* refactor: remove outline
* refactor: border-radius is common
* refactor: remove active and focus
* fix: do not shrink spacer
* fix: scroll list padding with correctly adjusted scrolling
* refactor: use constants
* fix: use padding in favor of spacer
* refactor: border attrs not needed
* refactor: control title padding and icon size centrally
* fix: rename param
* fix: import path
* fix: refactor styles, avoid magic numbers
* fix: type err
* feat: make rows collapsible
* fix: fully expanded without disclosure upon search
* fix: use modal in place of popover
* fix: collapse descendants
* fix: rename PublishPopover to PublishModal
* fix: adjust collapse icon as part of tree view
* fix: enable keyboard navigation
* not sure why collapse and expand shortcuts are not working
* fix: row expansion and search box focus and blur
* fix: remove css hover, handle it via active prop
* fix: discard tree like view for search results
* fix: minor tweaks
* refactor: no need to pass onPublish
* refactor: remove unnecessary attrs from search component
* fix: publish button text
* fix: reset intial scroll offset to 0 on search
* fix: remove search highlights
* fix: clean up search component
* refactor: search and row collapse
* refactor: PublishLocation
* fix: show emoji or star icon if present
* fix: shift focus only from top item
* fix: leading emoji
* fix: baseline text
* fix: make path tertiary
* fix: do not show path for collections
* fix: path text color upon selection
* fix: deleted collection case
* fix: no results found
* fix: space around slash
* Refinement, some small refactors
* fix: Publish shortcut, use Button action
* Allow new document creation from command menu without active collection
* fix: duplicate
* fix: Unneccessary truncation
* fix: Scroll on expand/collapse
Remove wraparound
* fix: tsc
* fix: Horizontal overflow on PublishLocation
Remove pointless moveTo method
* fix: Missing translation
* Remove method indirection
Show expanded collection icon in tree when expanded
* Shrink font size a point
* Remove feature flag
* fix: Path color contrast in light mode
Remove unused expanded/show attributes
* shrink -> collapse, fix expanded disclosure without items after searching
* Mobile styles
* fix: scroll just into view
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* feat: share url slug
* feat: add col urlId
* feat: allow updating urlId
* fix: typo
* fix: migrations
* fix: urlId model validation
* fix: input label
* fix: debounce slug request
* feat: link preview
* fix: send slug variant in response if available
* fix: temporary redirect to slug variant if available
* fix: move up the custom link field
* fix: process and display backend err
* fix: reset custom link state on popover close and remove isCopied
* fix: document link preview
* fix: set urlId when available
* fix: keep unique(urlId, teamId)
* fix: codeql
* fix: get rid of preview type
* fix: width not needed for block elem
* fix: migrations
* fix: array not required
* fix: use val
* fix: validation on shareId and test
* fix: allow clearing urlId
* fix: do not escape
* fix: unique error text
* fix: keep team
* tidy
* Add title to HTML export
* fix: Add compatability for documents without collab state
* Add HTML download option to UI
* docs
* fix nodes that required document to render
* Refactor to allow for styling of HTML export
* div>article for easier programatic content extraction
* Allow DocumentHelper to be used with Revisions
* Add revisions.diff endpoint, first version
* Allow arbitrary revisions to be compared
* test
* HTML driven revision viewer
* fix: Dark mode styles for document diffs
* Add revision restore button to header
* test
* Support RTL languages in revision history viewer
* fix: RTL support
Remove unneccessary API requests
* Prefetch revision data
* Animate history sidebar
* fix: Cannot toggle history from timestamp
fix: Animation on each revision click
* Clarify currently editing history item
* Improving the urls utils to not break dynamic protocols and testing the utils
Signed-off-by: iifawzi <iifawzie@gmail.com>
* Adding a list of blocked protocols
Signed-off-by: iifawzi <iifawzie@gmail.com>
* Update the way of sanitizing blocked protocols
Signed-off-by: iifawzi <iifawzie@gmail.com>
* Update shared/utils/urls.ts
Javascript pseudo protocol does not require the //
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* updating the javascript protocol sanitizing tests
Signed-off-by: iifawzi <iifawzie@gmail.com>
* Update shared/utils/urls.test.ts
Co-authored-by: Apoorv Mishra <apoorvmishra101092@gmail.com>
* Update shared/utils/urls.ts
Co-authored-by: Apoorv Mishra <apoorvmishra101092@gmail.com>
* Using toBe instead of toEqual in tests
Signed-off-by: iifawzi <iifawzie@gmail.com>
* Sanitizing data: and vbscript:
Signed-off-by: iifawzi <iifawzie@gmail.com>
* Using toBeUndefined instead of toEqual in tests
Signed-off-by: iifawzi <iifawzie@gmail.com>
* Using URL to check the protocols
Signed-off-by: iifawzi <iifawzie@gmail.com>
* Allowing sms, fax, and tel protocols
Signed-off-by: iifawzi <iifawzie@gmail.com>
* Update shared/utils/urls.ts
inlining the protocols in the same file
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* removing unused protocols constant
Signed-off-by: iifawzi <iifawzie@gmail.com>
Signed-off-by: iifawzi <iifawzie@gmail.com>
Co-authored-by: Tom Moor <tom.moor@gmail.com>
Co-authored-by: Apoorv Mishra <apoorvmishra101092@gmail.com>
* wip
* stash
* fix: make authenticationId nullable fk
* fix: apply generics to resolve compile time type errors
* fix: loosen integration settings
* chore: refactor into functional component
* feat: pass integrations all the way to embeds
* perf: avoid re-fetching integrations
* fix: change attr name to avoid type overlap
* feat: use hostname from embed settings in matcher
* Revert "feat: use hostname from embed settings in matcher"
This reverts commit e7485d9cda.
* feat: refactor into a class
* chore: refactor url regex formation as a util
* fix: escape regex special chars
* fix: remove in-house escapeRegExp in favor of lodash's
* fix: sanitize url
* perf: memoize embeds
* fix: rename hostname to url and allow spreading entire settings instead of just url
* fix: replace diagrams with drawio
* fix: rename
* fix: support self-hosted and saas both
* fix: assert on settings url
* fix: move embed integrations loading to hook
* fix: address review comments
* fix: use observer in favor of explicit state setters
* fix: refactor useEmbedIntegrations into useEmbeds
* fix: use translations for toasts
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* 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
* feat: allow personal gmail accounts to be used to sign into teams with an existing invite
* address comments
* add comment for appDomain
* address comments
* change the api of domain parsing to just parseDomain and getCookieDomain
* adds getBaseDomain as the method to get the domain after any official subdomains
* 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