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

[Onboarding Flow]- Created two input fields, 'firstname' and 'lastname' in signup Details page #607

Merged
merged 40 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
35254fc
feat: Set up StepperSignupComponent with initial step handling
shubhamsinghbundela Aug 28, 2023
f1a424c
revert url.js file code
shubhamsinghbundela Aug 28, 2023
5eddc12
test: Verify initial step handling in StepperSignupComponent
shubhamsinghbundela Aug 28, 2023
8f4351b
revert url.js file code
shubhamsinghbundela Aug 28, 2023
6d3d139
feat: Add firstname and lastname input fields
shubhamsinghbundela Aug 29, 2023
f764a98
skip the test of stepper-signup-test.js
shubhamsinghbundela Aug 29, 2023
991ae18
modify test of stepper-signup-test.js
shubhamsinghbundela Aug 29, 2023
3e868fe
Test input field interaction and combined action behavior
shubhamsinghbundela Aug 30, 2023
235bfdc
test: Verify interaction between SignupSteps::StepOne and parent comp…
shubhamsinghbundela Aug 31, 2023
dbd1ce2
remove console.log
shubhamsinghbundela Aug 31, 2023
97beb86
Design: Create Onboarding Card Component
shubhamsinghbundela Sep 2, 2023
c43fe88
Merge branch 'feature/card' of https://github.com/Real-Dev-Squad/webs…
shubhamsinghbundela Sep 2, 2023
88fb023
Enhancement: Added Input Field to Onboarding Card Component
shubhamsinghbundela Sep 2, 2023
ba7d6ae
Add logo to onboarding card component
shubhamsinghbundela Sep 3, 2023
e043455
Added heading on signup details onboarding card
shubhamsinghbundela Sep 3, 2023
5f3dc43
Refactor input styles to align with new design
shubhamsinghbundela Sep 3, 2023
74b8bde
fix linking rds and github linking logo
shubhamsinghbundela Sep 3, 2023
a551058
minor change on onboarding card component
shubhamsinghbundela Sep 3, 2023
08f45dc
Update logo classname to adhere to BEM convention
shubhamsinghbundela Sep 3, 2023
d810ebe
revert urls.js file
shubhamsinghbundela Sep 3, 2023
90d1ab8
Addressed feedback from the Satyam code review
shubhamsinghbundela Sep 3, 2023
1c74744
Added test for rendering Onboarding Card during SignupStep component …
shubhamsinghbundela Sep 3, 2023
ed69ade
Create 'signup-steps/step-zero' component and separate logo in partic…
shubhamsinghbundela Sep 3, 2023
6859950
Add tests for rendering 'RealSevSquad' logo and heading on signupDeta…
shubhamsinghbundela Sep 3, 2023
c8ecbd6
Add tests for rendering 'all logo' on github login page
shubhamsinghbundela Sep 3, 2023
e9340ae
Addressed feedback from the Sumit code review
shubhamsinghbundela Sep 4, 2023
b099e66
Addressed feedback from the Satyam code review
shubhamsinghbundela Sep 4, 2023
4bb2377
change in step-zero test file
shubhamsinghbundela Sep 4, 2023
8be9ba8
revert constant/urls.js file
shubhamsinghbundela Sep 4, 2023
7b7c7d9
px to rem
shubhamsinghbundela Sep 4, 2023
e2ecdaa
revert constant/urls.js file
shubhamsinghbundela Sep 4, 2023
06c430a
added feature flag
shubhamsinghbundela Sep 4, 2023
7d52d21
change input style
shubhamsinghbundela Sep 4, 2023
e51e1e8
change select style
shubhamsinghbundela Sep 4, 2023
a70833f
Addressed feedback from the vinit code review
shubhamsinghbundela Sep 4, 2023
dadcb4b
Addressed feedback from the satyam code review
shubhamsinghbundela Sep 4, 2023
6f60a5a
remove redundant rds-logo
shubhamsinghbundela Sep 4, 2023
a13956a
remove redundant rds-logo
shubhamsinghbundela Sep 4, 2023
2a4d174
changes in signup-steps/step-1 test
shubhamsinghbundela Sep 4, 2023
db11dc8
Addressed feedback from the rohan code review
shubhamsinghbundela Sep 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/components/onboarding-card.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div data-test-onboarding-card-modal class="onboarding-card">
<div data-test-onboarding-card-modal class='onboarding-card'>
{{yield}}
</div>
</div>
28 changes: 28 additions & 0 deletions app/components/signup-steps/step-one.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<img
src='assets/icons/rds-logo.jpg'
shubhamsinghbundela marked this conversation as resolved.
Show resolved Hide resolved
alt='RDS-Logo'
class='signup-details__rds-logo'
data-test-rds-logo
/>
<h3 data-test-required-heading class='signup-page-heading'>
Sign up to your account
</h3>

<Reusables::InputBox
@field='First Name'
@name='firstname'
@placeHolder='Write your first name'
@type='text'
@required={{true}}
@value={{this.data.firstname}}
@onInput={{this.inputHandler}}
/>
<Reusables::InputBox
@field='Last Name'
@name='lastname'
@placeHolder='Write your last name'
@type='text'
@required={{true}}
@value={{this.data.lastname}}
@onInput={{this.inputHandler}}
/>
15 changes: 15 additions & 0 deletions app/components/signup-steps/step-one.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { debounce } from '@ember/runloop';
import { JOIN_DEBOUNCE_TIME } from '../../constants/join';
shubhamsinghbundela marked this conversation as resolved.
Show resolved Hide resolved

export default class SignupStepsStepOneComponent extends Component {
@action inputHandler(e) {
const { onChange } = this.args;
const passVal = () => {
onChange(e.target.name, e.target.value);
};

debounce(passVal, JOIN_DEBOUNCE_TIME);
}
}
26 changes: 26 additions & 0 deletions app/components/signup-steps/step-zero.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<div class='logos-container' data-test-logos-container>
<div class='logo logos-container__github' data-test-github-logo>
<img
src='assets/icons/onboarding-card-github-logo.png'
alt='GitHub-Logo'
class='logo__img--github'
data-test-github-logo-img
/>
</div>
<div class='logo logos-container__link' data-test-link-logo>
<img
src='assets/icons/link-logo.png'
alt='Link-Logo'
shubhamsinghbundela marked this conversation as resolved.
Show resolved Hide resolved
class='logo__img--link'
data-test-link-logo-img
/>
</div>
<div class='logo logos-container__rds' data-test-rds-logo>
<img
src='assets/icons/onboarding-card-rds-logo.png'
alt='RDS-Logo'
class='logo__img--rds'
data-test-rds-logo-img
/>
</div>
</div>
7 changes: 7 additions & 0 deletions app/components/stepper-signup.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<OnboardingCard>
{{#if (eq this.currentStep 0)}}
<SignupSteps::StepZero />
{{else if (eq this.currentStep 1)}}
<SignupSteps::StepOne @onChange={{this.handleInputChange}} />
{{/if}}
</OnboardingCard>
22 changes: 22 additions & 0 deletions app/components/stepper-signup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action, set } from '@ember/object';

export default class StepperSignupComponent extends Component {
constructor() {
super(...arguments);

this.currentStep = Number(
new URLSearchParams(window.location.search).get('step')
);
}

@tracked signupDetails = {
firstname: '',
lastname: '',
};

@action handleInputChange(key, value) {
set(this.signupDetails, key, value);
}
}
6 changes: 6 additions & 0 deletions app/controllers/join.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,11 @@ import { inject as service } from '@ember/service';
export default class JoinController extends Controller {
@service router;
@service login;
@service featureFlag;

queryParams = ['step'];

get isDevMode() {
return this.featureFlag.isDevMode;
}
}
11 changes: 11 additions & 0 deletions app/services/feature-flag.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Service from '@ember/service';
import { inject as service } from '@ember/service';

export default class FeatureFlagService extends Service {
@service router;

get isDevMode() {
const queryParams = this.router?.currentRoute?.queryParams;
return queryParams?.dev === 'true';
}
}
8 changes: 4 additions & 4 deletions app/styles/dropdown.module.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
.select {
font-weight: 300;
font-size: 1rem;
width: 35.875rem;
width: 31rem;
height: 3.125rem;
display: flex;
justify-content: space-between;
line-height: 32px;
border-radius: 9px;
margin-top: 0.2rem;
padding: 0 0.5rem;
background-color: var(--color-white);
border: 3px solid var(--color-navyblue);
outline: none;
transition: all 0.1s;
border-radius: 8px;
border: 1px solid var(--neutral-neutral-500, #ABABAB);
background: var(--White, #FFF);
shubhamsinghbundela marked this conversation as resolved.
Show resolved Hide resolved
}

.select:focus {
Expand Down
8 changes: 4 additions & 4 deletions app/styles/input.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
.user-input {
font-weight: 300;
font-size: 1rem;
width: 34.5rem;
width: 30rem;
line-height: 32px;
border-radius: 10px;
margin-top: 0.5rem;
padding: 0 0.5rem;
background-color: var(--color-white);
border: 3px solid var(--color-navyblue);
outline: none;
transition: all 0.1s;
border-radius: 8px;
border: 1px solid var(--neutral-neutral-500, #ABABAB);
background: var(--White, #FFF);
shubhamsinghbundela marked this conversation as resolved.
Show resolved Hide resolved
}

.user-input:focus {
Expand Down
94 changes: 85 additions & 9 deletions app/styles/onboarding-card.module.css
Original file line number Diff line number Diff line change
@@ -1,19 +1,95 @@
.onboarding-card{
min-height: 60vh;
min-height: 55vh;
min-width: 40vw;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border: 2px solid var(--color-lightgrey);
background-color: var(--color-cultured);
border-radius: 10px;
margin-top: 80px;
background-color: #FFF;
border-radius: 24px;
position: relative;
padding: 0 1rem;
box-shadow: 0px 4px 10px -2px rgba(16, 24, 40, 0.06), 0px 6px 15px -2px rgba(16, 24, 40, 0.10);
}
@media screen and (max-width: 625px) {

.signup-details__rds-logo{
display: block;
position: absolute;
transform: translateX(-50%);
left: 50%;
top: -10%;
}

.logos-container{
padding: 1.5rem;
display: flex;
flex-direction: row;
position: absolute;
transform: translateX(-50%);
left: 50%;
top: 3%;
}
shubhamsinghbundela marked this conversation as resolved.
Show resolved Hide resolved
.logos-container__github{
padding: 0.5rem;
}

.logos-container__link{
position: absolute;
top: 35%;
left: 42%;
width: 20%;
height: 30%;
}

.logos-container__rds{
margin-left: 1rem;
padding: 0.5rem;
}

.logo__img--link{
width: 3.2rem;
height: 3.2rem;
}

.signup-page-heading{
color: var(--neutral-neutral-700, #272626);
text-align: center;
font-size: 1.4rem;
font-style: normal;
font-weight: 700;
line-height: 24px;
}
@media (max-width: 800px) {
.onboarding-card{
min-height: 50vh;
max-width: 90vw;
margin: 40px auto;
min-width: 60vh;
}
}


@media (max-width: 625px) {
.onboarding-card{
min-height: 30vh;
min-width: 75vw;
padding: 3.5rem 1rem;
margin-top: -5rem;
}
.signup-details__rds-logo{
width: 5rem;
height: 5rem;
}

.logo__img--github{
height: 5rem;
width: 5rem;
}

.logo__img--rds{
width: 5rem;
height: 5rem;
}

.logo__img--link{
width: 2.8rem;
height: 2.5rem;
}
}
11 changes: 6 additions & 5 deletions app/styles/stepper.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@
}

.label {
color: var(--color-black);
font-weight: 700;
font-size: 1.25rem;
margin: 0 0 2px 2px;
color: var(--neutral-neutral-800, #1F1F1F);
font-size: 1rem;
font-style: normal;
font-weight: 550;
shubhamsinghbundela marked this conversation as resolved.
Show resolved Hide resolved
line-height: 20px;
}

.required {
font-size: 1.5rem;
font-size: 1rem;
margin: 0;
padding: 0;
color: var(--color-pink);
Expand Down
32 changes: 18 additions & 14 deletions app/templates/join.hbs
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
{{page-title 'Join'}}
shubhamsinghbundela marked this conversation as resolved.
Show resolved Hide resolved
<section class="join__container">
{{#if this.login.isLoading}}
<div data-test-loading class='intro__loading'>
<Fa-Icon @size='2x' @icon='circle-notch' @spin={{true}} />
</div>
{{else}}
{{#if this.login.userData.roles.archived}}
<OnboardingCard>
<h3 class="archived__heading">Archived User</h3>
</OnboardingCard>
{{else}}
<Stepper />
{{/if}}
{{/if}}
<section class='join__container'>
{{#if this.login.isLoading}}
<div data-test-loading class='intro__loading'>
<Fa-Icon @size='2x' @icon='circle-notch' @spin={{true}} />
</div>
{{else}}
{{#if this.login.userData.roles.archived}}
shubhamsinghbundela marked this conversation as resolved.
Show resolved Hide resolved
<OnboardingCard>
<h3 class='archived__heading'>Archived User</h3>
shubhamsinghbundela marked this conversation as resolved.
Show resolved Hide resolved
</OnboardingCard>
{{else}}
{{#if this.isDevMode}}
<StepperSignup />
{{else}}
<Stepper />
{{/if}}
{{/if}}
{{/if}}
</section>
Binary file added public/assets/icons/link-logo.png
vinit717 marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/icons/onboarding-card-rds-logo.png
shubhamsinghbundela marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/icons/rds-logo.jpg
shubhamsinghbundela marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading