Commit Graph

7 Commits

Author SHA1 Message Date
Tom Moor
33afa2f029 Plugin architecture (#4861)
* wip

* Refactor, tasks, processors, routes loading

* Move Slack settings config to plugin

* Fix translations in plugins

* Move Slack auth to plugin

* test

* Move other slack-related files into plugin

* Forgot to save

* refactor
2023-02-12 10:11:30 -08:00
Apoorv Mishra
79829a3129 Ability to create share url slug (#4550)
* 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
2022-12-13 17:26:36 -08:00
Nan Yu
e0d2b6cace feat: allow personal gmail accounts to be used to sign into teams with an existing invite (#3652)
* feat: allow personal gmail accounts to be used to sign into teams with an existing invite

* address comments

* add comment for appDomain

* address comments
2022-06-20 01:33:16 -07:00
Tom Moor
3c002f82cc chore: Centralize env parsing, validation, defaults, and deprecation notices (#3487)
* chore: Centralize env parsing, defaults, deprecation

* wip

* test

* test

* tsc

* docs, more validation

* fix: Allow empty REDIS_URL (defaults to localhost)

* test

* fix: SLACK_MESSAGE_ACTIONS not bool

* fix: Add SMTP port validation
2022-05-19 08:05:11 -07:00
Corey Alexander
2449434fef feat: Allow Document to be fetched without Slug (#3453)
* 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
2022-04-26 20:49:37 -07:00
Tom Moor
ff49c507db fix: Direct to contact page rather than mailto: link
closes #3265
2022-03-18 20:19:07 -07:00
Tom Moor
175857753e fix: Bag 'o fixes
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
2022-01-25 23:43:11 -08:00