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: Update UI of signup / login pages #16710

Merged
merged 17 commits into from
Sep 23, 2024
Merged

feat: Update UI of signup / login pages #16710

merged 17 commits into from
Sep 23, 2024

Conversation

hbjORbj
Copy link
Contributor

@hbjORbj hbjORbj commented Sep 19, 2024

What does this PR do?

  • Fixes CAL-4365, 4366
  • Change styling of SAML button from login / signup pages
  • Rearrange components according to design
  • Change the style / text of Google Sign-in button
  • Decouple google sign-in from email sign-up form values (disabled prop or searchQueryParams that is added to Google auth url no longer depend on sign-up form values)

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A - I have added a Docs issue here if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Test /signup and /auth/login

@graphite-app graphite-app bot requested a review from a team September 19, 2024 04:47
Copy link
Contributor

github-actions bot commented Sep 19, 2024

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

Unknown release type "feature" found in pull request title "feature: Update UI of signup / login pages". 

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

@keithwillcode keithwillcode added consumer core area: core, team members only labels Sep 19, 2024
@dosubot dosubot bot added ui area: UI, frontend, button, form, input ✨ feature New feature or request labels Sep 19, 2024
Copy link

linear bot commented Sep 19, 2024

Copy link

graphite-app bot commented Sep 19, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (09/19/24)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add foundation team as reviewer" took an action on this PR • (09/20/24)

1 reviewer was added to this PR based on Keith Williams's automation.

Copy link

vercel bot commented Sep 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Sep 23, 2024 3:20pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Sep 23, 2024 3:20pm

{isGoogleLoginEnabled ? (
<Button
color="secondary"
disabled={!!formMethods.formState.errors.username || premiumUsername}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this because this will look buggy now that the email form and google sign-in button are not on the same page. Lmk what you think cc @sean-brydon

Copy link
Member

Choose a reason for hiding this comment

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

Seems fine to me!

@hbjORbj hbjORbj changed the title feature: Update UI of signup / login pages feat: Update UI of signup / login pages Sep 19, 2024
Comment on lines +213 to +221
<div className="my-8">
<div className="relative flex items-center">
<div className="border-subtle flex-grow border-t" />
<span className="text-subtle mx-2 flex-shrink text-sm font-normal leading-none">
{t("or").toLocaleLowerCase()}
</span>
<div className="border-subtle flex-grow border-t" />
</div>
</div>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

new code added

<div className="space-y-3">
{isGoogleLoginEnabled && (
<Button
color="primary"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

style change

</Form>
</div>
)}
{!displaySignupForm && (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Buttons Container starts here

orgSlug
? `${getOrgFullOrigin(orgSlug, { protocol: true }).replace(URL_PROTOCOL_REGEX, "")}/`
: `${process.env.NEXT_PUBLIC_WEBSITE_URL.replace(URL_PROTOCOL_REGEX, "")}/`
{displaySignupForm && (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Form Container starts here

@@ -39,15 +38,12 @@ interface LoginValues {
}

const GoogleIcon = () => (
<img className="text-subtle mr-2 h-4 w-4 dark:invert" src="/google-icon.svg" alt="" />
<img className="text-subtle mr-2 h-4 w-4 dark:invert" src="/google-icon-colored.svg" alt="" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I confirmed with Peer. No issues with icon licensing

Copy link
Contributor

github-actions bot commented Sep 19, 2024

E2E results are ready!

}
className={classNames(
"w-full justify-center rounded-md text-center",
formMethods.formState.errors.username ? "opacity-50" : ""
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this for the same reason as above

Comment on lines 479 to 483
if (prepopulateFormValues?.username) {
// If username is present we save it in query params to check for premium
searchQueryParams.set("username", prepopulateFormValues.username);
localStorage.setItem("username", prepopulateFormValues.username);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I introduced changes here for username

@@ -10,7 +10,7 @@ import { expectInvitationEmailToBeReceived } from "./team/expects";

test.describe.configure({ mode: "parallel" });

test.describe("Signup Flow Test", async () => {
test.describe("Email Signup Flow Test", async () => {
Copy link
Contributor Author

@hbjORbj hbjORbj Sep 19, 2024

Choose a reason for hiding this comment

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

Because this test is specific for email signup flow test. We should create a new test for the new /signup page. I created a linear ticket here: https://linear.app/calcom/issue/CAL-4366/create-a-new-test-for-the-new-signup-page

UPDATE: Just did the job in this PR

@hbjORbj
Copy link
Contributor Author

hbjORbj commented Sep 20, 2024

Next step (a separate PR): Look into what I need to change in order for org/team invites work with Google Signin; For now, the email form will appear when users open links for org/team invites

Copy link
Contributor

@keithwillcode keithwillcode left a comment

Choose a reason for hiding this comment

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

We should revert the yarn.lock changes

@hbjORbj hbjORbj merged commit b879aee into main Sep 23, 2024
40 checks passed
@hbjORbj hbjORbj deleted the feature/new-signup-flow branch September 23, 2024 17:27
hbjORbj added a commit that referenced this pull request Sep 24, 2024
emrysal pushed a commit that referenced this pull request Sep 24, 2024
* Revert "feat: Update UI of signup / login pages (#16710)"

This reverts commit b879aee.

* revert
@hbjORbj hbjORbj restored the feature/new-signup-flow branch September 24, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authentication area: authentication, auth, google sign in, password, SAML, password reset, can't log in consumer core area: core, team members only ✨ feature New feature or request ready-for-e2e ui area: UI, frontend, button, form, input
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants