-
Notifications
You must be signed in to change notification settings - Fork 292
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: Add ability to create guest links with password (SQSERVICES-1975) #15014
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## dev #15014 +/- ##
==========================================
- Coverage 45.57% 45.49% -0.09%
==========================================
Files 732 736 +4
Lines 23746 23964 +218
Branches 5405 5455 +50
==========================================
+ Hits 10823 10903 +80
- Misses 11549 11662 +113
- Partials 1374 1399 +25 |
Co-authored-by: Virgile <[email protected]>
… into feat/SQSERVICES-1975
We can't merge till other platforms catch up, at least they have to implement join flow for guest links with passwords! |
src/script/page/RightSidebar/GuestServicesOptions/components/GuestOptions/GuestOptions.tsx
Show resolved
Hide resolved
if (!codeOrMailInput.current) { | ||
return; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't move it to (isFetching || !codeOrMailInput.current) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in
4cab38d
src/i18n/en-US.json
Outdated
@@ -596,6 +613,11 @@ | |||
"guestRoomToggleInfoDisabled": "You can't disable the guest option in this conversation, as it has been created by someone from another team.", | |||
"guestRoomToggleInfoExtended": "Open this conversation to people outside your team. You can always change it later.", | |||
"guestRoomToggleInfoHead": "Guest Links", | |||
"guestLinkPasswordModal.headline": "[Group Conversation] \n Enter password", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this \n
really working 🤔 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah if you do white-space: pre or pre-line it works.
} | ||
} | ||
if (isBackendError(error)) { | ||
handleSubmitError(error as BackendError); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you really need the as BackendError
here? Seems like you have a typeguard above it should type it for you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Przemysław Jóźwik <[email protected]>
… into feat/SQSERVICES-1975
1d8e6a5
to
0976347
Compare
0976347
to
e8967d0
Compare
ae8d5c5
to
0c84609
Compare
73818a4
to
5e70571
Compare
* @param {string} password - The password to be checked. | ||
* @returns {boolean} True if the password meets all conditions, false otherwise. | ||
*/ | ||
export function isValidPassword(password: string): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to use the browser's built in method to validate inputs, you can also use regexp positive lookahead (see https://javascript.info/regexp-lookahead-lookbehind#lookahead).
The regexp would look like this
/(?=.*[a-z])(?=.*[A-Z])(?=.*[1-9])(?=.*[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?])/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in 45c45db
currentType: string; | ||
inputPlaceholder: string; | ||
messageHtml: string; | ||
messageText: string; | ||
messageText: React.ReactNode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we could call this one message
and deprecate the messageHtml
(since react node is way more suitable for the future)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ive updated this and the other modal comment in 1d4a248 but my sense is that this one is sort of unrelated to the main PR here.
modalUie: string; | ||
onBgClick: () => void; | ||
passwordGenerator?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a little too specific. The Modal component should not be aware that there is a password generator that exists. I think this API can be made more generic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one is removed, agreed its unnecessary.
1d4a248
to
772e337
Compare
9e201f8
to
59d4ab0
Compare
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
Adds a password option when using a guest link.
Causes (Optional)
Briefly describe the causes behind the issues. This could be helpful to understand the adopted solutions behind some nasty bugs or complex issues.
Solutions
Briefly describe the solutions you have implemented for the issues explained above.
Dependencies (Optional)
If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.
Needs releases with:
Testing
Test Coverage (Optional)
How to Test
Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.
Notes (Optional)
Specify here any other facts that you think are important for this issue.
Attachments (Optional)
Attachments like images, videos, etc. (drag and drop in the text box)
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.