Commit Graph

571 Commits

Author SHA1 Message Date
Sai Suhas Sawant
f386dd31a7 fix: user preview to lowercase (#1064)
changed the user preview in user-profile-skeleton to lowercase to match
ui of other components
2024-03-27 20:37:11 +08:00
David Nguyen
038370012f fix: render fields on document load (#1054)
## Description

Currently if you try to load the document edit page when fields need to
be rendered, you will not be able to see the fields until you proceed to
the next step.

This is because the fields require the document PDF to be loaded prior
to rendering them.

This PR resolves that issue by only rendering the fields after the PDF
is loaded.

## Changes Made

- Add a state to track whether the PDF is loaded
- Render the fields only after the PDF is loaded

## Testing Performed

Tested document flow manually and the fields are rendered correctly on
load.

## Checklist

- [X] I have tested these changes locally and they work as expected.
- [X] I have updated the documentation to reflect these changes, if
applicable.
2024-03-27 14:10:29 +08:00
David Nguyen
006b732edb fix: update document flow fetch logic (#1039)
## Description

**Fixes issues with mismatching state between document steps.**

For example, editing a recipient and proceeding to the next step may not
display the updated recipient. And going back will display the old
recipient instead of the updated values.

**This PR also improves mutation and query speeds by adding logic to
bypass query invalidation.**

```ts
export const trpc = createTRPCReact<AppRouter>({
  unstable_overrides: {
    useMutation: {
      async onSuccess(opts) {
        await opts.originalFn();

        // This forces mutations to wait for all the queries on the page to reload, and in
        // this case one of the queries is `searchDocument` for the command overlay, which
        // on average takes ~500ms. This means that every single mutation must wait for this.
        await opts.queryClient.invalidateQueries(); 
      },
    },
  },
});
```

I've added workarounds to allow us to bypass things such as batching and
invalidating queries. But I think we should instead remove this and
update all the mutations where a query is required for a more optimised
system.

## Example benchmarks

Using stg-app vs this preview there's an average 50% speed increase
across mutations.

**Set signer step:**
Average old speed: ~1100ms
Average new speed: ~550ms

**Set recipient step:**
Average old speed: ~1200ms
Average new speed: ~600ms

**Set fields step:**
Average old speed: ~1200ms
Average new speed: ~600ms

## Related Issue

This will resolve #470

## Changes Made

- Added ability to skip batch queries
- Added a state to store the required document data.
- Refetch the data between steps if/when required
- Optimise mutations and queries

## Checklist

- [X] I have tested these changes locally and they work as expected.
- [X] I have followed the project's coding style guidelines.

---------

Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
2024-03-26 21:12:41 +08:00
David Nguyen
5210fe2963 feat: add passkeys (#989)
## Description

Add support to login with passkeys.

Passkeys can be added via the user security settings page.

Note: Currently left out adding the type of authentication method for
the 'user security audit logs' because we're using the `signIn`
next-auth event which doesn't appear to provide the context. Will look
into it at another time.

## Changes Made

- Add passkeys to login
- Add passkeys feature flag
- Add page to manage passkeys
- Add audit logs relating to passkeys
- Updated prisma schema to support passkeys & anonymous verification
tokens

## Testing Performed

To be done.

MacOS:
- Safari  
- Chrome  
- Firefox 

Windows:
- Chrome [Untested] 
- Firefox [Untested]

Linux:
- Chrome [Untested]
- Firefox [Untested]

iOS:
- Safari 

## Checklist

<!--- Please check the boxes that apply to this pull request. -->
<!--- You can add or remove items as needed. -->

- [X] I have tested these changes locally and they work as expected.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced Passkey authentication, including creation, sign-in, and
management of passkeys.
- Added a Passkeys section in Security Settings for managing user
passkeys.
- Implemented UI updates for Passkey authentication, including a new
dialog for creating passkeys and a data table for managing them.
- Enhanced security settings with server-side feature flags to
conditionally display new security features.
- **Bug Fixes**
	- Improved UI consistency in the Settings Security Activity Page.
- Updated button styling in the 2FA Recovery Codes component for better
visibility.
- **Refactor**
- Streamlined authentication options to include WebAuthn credentials
provider.
- **Chores**
- Updated database schema to support passkeys and related functionality.
	- Added new audit log types for passkey-related activities.
- Enhanced server-only authentication utilities for passkey registration
and management.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-26 21:11:59 +08:00
David Nguyen
43400c07de feat: remove 2FA password requirement (#1053) 2024-03-25 11:34:50 +08:00
Anik Dhabal Babu
b95f7176e2 fix: username overflow issue 2024-03-18 18:25:04 +00:00
Lucas Smith
3598bd0139 fix: use tailwind for menu switcher ring 2024-03-16 12:18:12 +00:00
Adithya Krishna
17c6a4bd55 chore: updated focus state of menu switcher
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-03-15 09:18:51 +05:30
Adithya Krishna
d6668ad204 Merge branch 'main' of https://github.com/documenso/documenso into feat/swagger-styling 2024-03-15 09:17:01 +05:30
Lucas Smith
d5c4885c67 fix: update signup form to handle password managers better 2024-03-14 12:39:58 +00:00
Adithya Krishna
00c71fd66c chore: fixed focus ring
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-03-14 01:02:48 +05:30
Lucas Smith
d3f4e20f1c fix: update styling and e2e test 2024-03-12 02:57:22 +00:00
Gautam-Hegde
efb90ca5fb chore: use email confirmation 2024-03-11 23:17:11 +05:30
Adithya Krishna
f2aa0cd714 Merge branch 'main' into feat/typeInDeletion 2024-03-11 15:20:19 +05:30
Lucas Smith
c2cf25b138 fix: templates incorrectly linking when in a team 2024-03-11 01:46:19 +00:00
Lucas Smith
63c23301a9 Merge branch 'main' into feat/typeInDeletion 2024-03-11 12:19:10 +11:00
Lucas Smith
1a23744d2a fix: table layout shift while changing tabs (#921)
fixes: #875 



https://github.com/documenso/documenso/assets/28510494/083fd87a-ef62-40e6-9696-9c04b4411502
2024-03-11 12:16:19 +11:00
Lucas Smith
c744482b84 fix: add conditional to useEffects 2024-03-11 10:55:46 +11:00
Brayden Brayden
afe99e5ec9 fix: revert reset changes, reset on open state change instead 2024-03-10 09:36:54 +00:00
Brayden Brayden
6f958b9320 fix: update the dialog cancel to reset 2024-03-10 09:28:08 +00:00
Brayden Brayden
f646fa29d7 fix: ensure password input is cleared when 2fa enable dialog is closed 2024-03-10 07:01:18 +00:00
Gautam-Hegde
ad92b1ac23 feat: typeIn confirmation 2024-03-08 21:56:17 +05:30
Lucas Smith
4476cf8fd1 Merge branch 'main' into fix/layout-shift-on-table 2024-03-09 00:41:20 +11:00
Lucas Smith
40343d1c72 fix: add use client directive 2024-03-08 12:34:49 +00:00
Lucas Smith
08201240d2 Merge branch 'main' into update-documents-avatar 2024-03-08 23:26:28 +11:00
Lucas Smith
32b0b1bcda fix: revert api change and use mouseenter/mouseleave 2024-03-08 12:21:32 +00:00
Lucas Smith
6376112f9d fix: overflow issue with user name input (#991)
Before:-

![Screenshot 2024-03-06
203158](https://github.com/documenso/documenso/assets/81948346/17050582-454b-49af-8124-294d0a0be5bc)

After:-

![Screenshot 2024-03-06
202332](https://github.com/documenso/documenso/assets/81948346/7c346699-3bff-4847-95ef-fd7fdc8a89af)
2024-03-08 15:24:17 +11:00
Lucas Smith
ddfd4b9e1b fix: update styling 2024-03-08 03:59:15 +00:00
Lucas Smith
5bec549868 feat: improved ui of document dropzone for max quota state (#997)
**Description:**


[Dropzone.webm](https://github.com/documenso/documenso/assets/23498248/df2d3a54-0e39-4d2d-b792-bf4cd4a1e19d)
2024-03-08 14:38:27 +11:00
Lucas Smith
3b3346e6af fix: remove data-testid attributes 2024-03-08 13:47:59 +11:00
Lucas Smith
ee35b4a24b fix: update test to use getByRole 2024-03-08 02:46:25 +00:00
Ephraim Atta-Duncan
e47ca1d6b6 chore: add e2e test for deleting a user 2024-03-08 00:04:27 +00:00
Anik Dhabal Babu
f7e7c6dedf fix: overflow issue 2024-03-07 20:08:11 +05:30
Adithya Krishna
9ae51a0072 feat: improved ui of document dropzone for max quota state
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-03-07 19:04:58 +05:30
Anik Dhabal Babu
b5b74a788c fix: overflow issue with user name input 2024-03-06 14:52:59 +00:00
Lucas Smith
579a2f96e5 chore: rename community => early adopter 2024-03-05 13:04:46 +00:00
David Nguyen
70494fa5bb feat: add offline development support (#987)
## Description

Add support to develop without network access since TRPC by default will
prevent network requests when offline.

https://tanstack.com/query/v4/docs/framework/react/guides/network-mode#network-mode-always

## Changes Made

- Add dynamic logic to toggle offline development
- Removed teams feature flag
2024-03-05 22:06:48 +11:00
Mythie
73aae6f1e3 feat: improve admin panel 2024-03-03 01:55:33 +11:00
Lucas Smith
328d16483c chore: update profile claim dialog and modal (#983)
**Description:**

**Settings Page:**

<img width="668" alt="Screenshot 2024-03-01 at 19 12 40"
src="https://github.com/documenso/documenso/assets/23498248/08e48432-39a6-4ef0-bc53-931fc3c81545">

**Claim Modal:** 

<img width="588" alt="Screenshot 2024-03-01 at 19 14 17"
src="https://github.com/documenso/documenso/assets/23498248/69bc2d02-97c6-4a29-88a4-55ed8898ccf5">
2024-03-02 12:45:22 +11:00
Adithya Krishna
452545dab1 chore: updated button text
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-03-01 19:12:09 +05:30
Adithya Krishna
0f03ad4a6b chore: updated wordings for claimed ursers
Signed-off-by: Adithya Krishna <adithya@documenso.com>
2024-03-01 19:05:16 +05:30
McPizza
bfb1c65f98 remove debug logs
console.log on signup form
2024-03-01 11:25:21 +00:00
Mythie
85885b5ad5 fix: api documentation errors on ssr 2024-03-01 14:54:41 +11:00
Mythie
bd82ad7a0b fix: revert settings-header changes 2024-02-29 14:12:00 +11:00
Mythie
cc1b888174 chore: tidy changes 2024-02-29 14:09:17 +11:00
Lucas Smith
5576cdc2b0 Merge branch 'main' into feat/public-profile-1 2024-02-29 14:08:19 +11:00
Mythie
ecc9dc63ea feat: the rest of the owl 2024-02-29 13:22:21 +11:00
Lucas Smith
077da72b68 feat: implement webhooks (#913) 2024-02-28 18:31:48 +11:00
Catalin Pit
c8869b3088 chore: fixed UI for webhooks team 2024-02-28 09:18:05 +02:00
Catalin Pit
8bd1647a2d chore: fixed UI 2024-02-28 09:14:10 +02:00