Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): new create connection page #3072

Merged
merged 13 commits into from
Dec 4, 2024

Conversation

bodinsamuel
Copy link
Collaborator

@bodinsamuel bodinsamuel commented Nov 27, 2024

😘 Changes

Fixes https://linear.app/nango/issue/NAN-2188/test-connection-ui

  • UI: New create connection page
    The goal is to give the opportunity for customers to change the EndUser (also education time) and display links to documentation. It's one more click but yeah.

  • UI: Keep the legacy page to a new endpoint for a moment

  • UI: add new style for Button, Input, Select
    https://www.figma.com/design/pMnSC7rhSM79Dqwhm7MFhd

  • POST /api/v1/connect/sessions now accepts the same payload as the public one

  • GET /api/v1/meta expose user UUID
    Not sure what the use of id but it's handy to have static-random id for the endUser profile without exposing our auto-incremented number. unused in the end

🧪 Tests

  • Go to UI > Connections > Create
  • Also go to Integrations > any > Add connection

Screenshot 2024-12-02 at 13 17 52

@bodinsamuel bodinsamuel self-assigned this Nov 27, 2024
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff is incorrect, it's a brand new file

const dateRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{1,6}Z$/;
const dateRegexWithTZ = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{1,6}\+\d{2}:\d{2}$/;
const dateRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(.\d{1,6})?Z$/;
const dateRegexWithTZ = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(.\d{1,6})?\+\d{2}:\d{2}$/;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had an issue with integrations tests, if you are very unlucky and the test is on the clock there will be no microsecond

@bodinsamuel bodinsamuel requested a review from a team November 27, 2024 14:44
Copy link

linear bot commented Nov 27, 2024

@nalanj
Copy link
Contributor

nalanj commented Nov 27, 2024

image

This is a textual nitpick, but would "All configured integrations" make more sense here?

@nalanj
Copy link
Contributor

nalanj commented Nov 27, 2024

And another textual nitpick?

image

"Add to your app directly" feels like it skips on what you're adding. Would something like "Connect from your app" be clearer?

@nalanj
Copy link
Contributor

nalanj commented Nov 27, 2024

😄 Just ran though the UI (haven't read the code yet) but wanted to say that I really like this change!

Copy link
Contributor

@nalanj nalanj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -1,12 +1,14 @@
import { asyncWrapper } from '../../../../utils/asyncWrapper.js';
import { requireEmptyQuery, zodErrorToHTTP } from '@nangohq/utils';
import type { PostConnectSessions, PostInternalConnectSessions } from '@nangohq/types';
import { postConnectSessions } from '../../../connect/postSessions.js';
import { bodySchema as originalBodySchema, postConnectSessions } from '../../../connect/postSessions.js';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not completely sure, but would postConnectBodySchema be clearer here?

Copy link
Collaborator

@TBonnin TBonnin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good from a code point of view.
UX wise I find 2 things a bit confusing:

  1. The Integration ID and dropdown is the first thing I see but even for me who know what it is about it is not clear why I am asked about it first and what it means. Since it is kind of optional I would put it below the create test connection with an explanation about what it is. Same thing about the test user info
    I understand it is here for educational purpose but in this context it doesn't make much sense since me, the user, is the same person selecting the integration constraint and actually logging in. I think it is more confusing than anything and I would even vote in favor of not showing this option.

  2. on the right part, the 3 components (docs button, outer Connect/Custom UI and the bulb/tag) all look like different clickable buttons but they all lead to the same url, the docs. I find that confusing

@bodinsamuel
Copy link
Collaborator Author

Putting in draft until we improve the UX

@bodinsamuel bodinsamuel marked this pull request as draft November 28, 2024 10:10
@bodinsamuel bodinsamuel marked this pull request as ready for review December 2, 2024 12:23
@bodinsamuel
Copy link
Collaborator Author

We have revamped the revamp: removed the end user profile (it's not entirely disabled just in case we change our mind again), clarify docs cards, improved the wording

@TBonnin
Copy link
Collaborator

TBonnin commented Dec 2, 2024

We have revamped the revamp: removed the end user profile (it's not entirely disabled just in case we change our mind again), clarify docs cards, improved the wording

It is definitely better.
The info block is quite big though. Maybe we could have a simple Test connection user: user info is automatically populated with your Nango account details. and have the rest as a (?) button hover.

Also I feel like the dropdown and the authorize button should be next to each other or at least close. Right now drop down and authorize button are quite far away even though they are related while the 2 authorize buttons are close to each other even though they are not (OR situation). What about something like to mark the difference between new and old flow:

Create a test connection
Pick an integration
|------------------------|  |-----------| 
|      dropdown          |  | Authorize |
|------------------------|  |-----------|

(i) For test connections, the user info is automatically populated with your Nango account details. (?)

OR DEPRECATED FLOW
|-----------| 
| Authorize |
|-----------|

bodinsamuel added a commit that referenced this pull request Dec 2, 2024
## Context

Extracted from #3072

- Clarify our use of user's session
`req.user` is painful because session can be out of date, and it's hard
to add/remove fields from session. It's easier to always use
`res.locals[user] that's always fresh.

- Pass UUID, will be used later
- Fix regex for integration tests
@bodinsamuel
Copy link
Collaborator Author

@bastienbeurier for the UX feedback

@bastienbeurier
Copy link
Member

We have revamped the revamp: removed the end user profile (it's not entirely disabled just in case we change our mind again), clarify docs cards, improved the wording

It is definitely better. The info block is quite big though. Maybe we could have a simple Test connection user: user info is automatically populated with your Nango account details. and have the rest as a (?) button hover.

Also I feel like the dropdown and the authorize button should be next to each other or at least close. Right now drop down and authorize button are quite far away even though they are related while the 2 authorize buttons are close to each other even though they are not (OR situation). What about something like to mark the difference between new and old flow:

Create a test connection
Pick an integration
|------------------------|  |-----------| 
|      dropdown          |  | Authorize |
|------------------------|  |-----------|

(i) For test connections, the user info is automatically populated with your Nango account details. (?)

OR DEPRECATED FLOW
|-----------| 
| Authorize |
|-----------|

Haha, @TBonnin, you're going to have to be involved in the design phase.

@TBonnin
Copy link
Collaborator

TBonnin commented Dec 3, 2024

Haha, @TBonnin, you're going to have to be involved in the design phase.

No please no! 🤣

Copy link
Collaborator

@TBonnin TBonnin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@bodinsamuel bodinsamuel merged commit 7b0a7c2 into master Dec 4, 2024
21 checks passed
@bodinsamuel bodinsamuel deleted the sam/24_11_17/feat/connection-create-v2 branch December 4, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants