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:added location field #270

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 9 additions & 1 deletion app/components/form-input.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<div class="field">
<label for={{@for}}>{{@label}}:</label>
<Input
<div class="field">
<Input
Comment on lines -3 to +4
Copy link
Contributor

@vinayak-trivedi vinayak-trivedi Sep 13, 2022

Choose a reason for hiding this comment

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

Do we need this div field for each input, can we put a separate if statement which check if the field is location, and then renders a different form input which is inside a div and contains a button

Copy link
Author

Choose a reason for hiding this comment

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

@vinayak-trivedi If we are doing this it is breaking whole form css of the form

@id={{@id}}
@type={{@type}}
@value={{@value}}
Expand All @@ -9,6 +10,13 @@
@class={{if @showError 'input errorBorder' 'input'}}
{{on 'input' (fn this.inputFieldChanged)}}
/>
{{#if @buttonupload }}
<button class="upload" type="submit">update location</button>
Copy link
Contributor

@rohan09-raj rohan09-raj Nov 23, 2022

Choose a reason for hiding this comment

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

update location -> Update, as the user already knows they are updating the location from the Input Label

{{/if}}
</div>



Comment on lines +18 to +19
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we please remove these extra spaces?

{{#if @helpMsg}}
<em class="help-msg">{{@helpMsg}}</em>
{{/if}}
Expand Down
8 changes: 8 additions & 0 deletions app/controllers/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ export default class ProfileController extends Controller {
showError: false,
disabled: true,
},
{
id: 'location',
label: 'Location',
type: 'text',
placeholder: 'bangalore',
buttonupload: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we please follow CamelCase here?

disabled: true,
},
{
id: 'email',
label: 'Email',
Expand Down
89 changes: 88 additions & 1 deletion app/styles/signup.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ h1 {
flex-direction: column;
justify-content: center;
align-items: flex-start;
position: relative;
}
.field_right{
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we please put a single line space after the CSS block?

position: relative;
}

.field label {
Expand Down Expand Up @@ -78,4 +82,87 @@ h1 {
.help-msg {
font-size: 10px;
text-align: left;
}
}

/* New Signup flow styles */

.container {
width: 100%;
color: #666;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we please use CSS variables here?
Please follow the pattern in variables.css file

text-align: center;
padding: 1em 0;
}

.user-details {
display: flex;
flex-direction: column;
justify-content: center;
align-content: center;
height: 80vh;
width: 70%;
margin: auto;
}

.user-details>* {
padding: 2rem;
}

.user-details__heading {
font-size: 2rem;
color: black;
Copy link
Contributor

Choose a reason for hiding this comment

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

text-align: left;
}

.user-details__field input {
padding: 1rem 2rem;
width: 100%;
border-radius: 10px;
border: 2px solid darkgray;
Copy link
Contributor

Choose a reason for hiding this comment

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

font-size: 3rem;
}

.signup-action__btn button {
padding: .75rem 2rem;
border-radius: 10px;
outline: none;
background-color: green;
Copy link
Contributor

Choose a reason for hiding this comment

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

color: white;
Copy link
Contributor

Choose a reason for hiding this comment

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

text-decoration: none;
cursor: pointer;
width: 40%;
display: block;
margin: auto;
font-size: 2rem;
border: none;
}

.signup-action__btn button.btn-disabled {
background: #ccc;
Copy link
Contributor

Choose a reason for hiding this comment

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

}

@media (max-width: 768px) {
.user-details {
width: 80%;
}
}

@media (max-width: 568px) {
.user-details {
width: 100%;
}
}

@media (max-width: 520px) {
.signup-action__btn button {
width: 70%;
}
}
.upload{
position: absolute;
top:0;
right: 0;
height: 100%;
color: blue;
Copy link
Contributor

Choose a reason for hiding this comment

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

font-weight: bold;
padding: .5rem;
}
5 changes: 4 additions & 1 deletion app/templates/profile.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
@helpMsg={{field.helpMsg}}
@onChange={{this.handleFieldChange}}
@validator={{field.validator}}
@disabled={{field.disabled}} />
@disabled={{field.disabled}}
@buttonupload={{field.buttonupload}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we please follow CamelCase here?

/>

{{/each}}

<button class='submitButton' type="submit" {{on 'click' (fn this.handleSubmit)}}>
Expand Down