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

452 UI improvements #453

Merged
merged 7 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from 5 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
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "./CustomTextFieldStyles.css";
const CustomTextField = ({
id = "",
name = "",
className,
MandeepPaul marked this conversation as resolved.
Show resolved Hide resolved
checkCircleIconVisible = false,
displayCheckCircleIcon = false,
labelText = "",
Expand Down Expand Up @@ -37,7 +38,7 @@ const CustomTextField = ({
const computedFullWidth = fullWidth ||
["full", "100%", "stretch"].some(value => TextFieldWidth.toLowerCase().includes(value));
return (
<div style={{ ...style, ...(computedFullWidth && { width: '100%' })}}>
<div className={className} style={{ ...style, ...(computedFullWidth && { width: '100%' })}}>
{!checkCircleIconVisible &&
<div>
<InputLabel sx={{ fontWeight: labelFontWeight, margin: 0 }}>{labelText}</InputLabel>
Expand Down Expand Up @@ -100,6 +101,7 @@ const CustomTextField = ({
};

CustomTextField.propTypes = {
className: PropTypes.string,
labelText: PropTypes.string,
value: PropTypes.string,
onChange: PropTypes.func,
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/scenes/settings/ProfileTab/ProfileTab.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const ProfileTab = () => {
value={formData.name}
onChange={handleInputChange}
placeholder="Enter your first name"
style={{ flexGrow: 1, textAlign: 'right' }}
className={styles.textField}
TextFieldWidth="350px"
/>
</div>
Expand All @@ -148,7 +148,7 @@ const ProfileTab = () => {
placeholder="Enter your last name"
value={formData.surname}
onChange={handleInputChange}
style={{ flexGrow: 1, textAlign: 'right' }}
className={styles.textField}
TextFieldWidth="350px"
/>
</div>
Expand All @@ -168,7 +168,7 @@ const ProfileTab = () => {
placeholder="Enter your email"
value={userInfo.email}
disabled={true} // Disabled since it cannot be changed
style={{ flexGrow: 1, textAlign: 'right' }}
className={styles.textField}
TextFieldWidth="350px"
/>
</div>
Expand Down
26 changes: 17 additions & 9 deletions frontend/src/scenes/settings/ProfileTab/ProfileTab.module.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.form {
padding-bottom: 20px;
width: 864px;
erenfn marked this conversation as resolved.
Show resolved Hide resolved
border-bottom: 1px solid #EEEEEE;
}

Expand All @@ -18,7 +19,17 @@
.photoAlign{
display: flex;
align-items: center;
gap: 2.5rem;
gap: 7rem;
MandeepPaul marked this conversation as resolved.
Show resolved Hide resolved
}

.supportText {
margin: 0;
min-width: 400px;
color: var(--second-text-color);
font-size: var(--font-regular);
font-weight: 400;
line-height: 20px;
margin-top: 6px;
}

.photoOptions {
Expand All @@ -38,22 +49,19 @@

.label {
font-size: var(--font-regular);
min-width: 400px;
font-weight: 700;
line-height: 20px;
text-align: left;
flex-grow: 1;
margin: 0;
}

.supportText {
margin: 0;
color: var(--second-text-color);
font-size: var(--font-regular);
font-weight: 400;
line-height: 20px;
margin-top: 6px;
.textField {
flex-grow: 1;
text-align: right;
}

.update,
.delete{
border: none;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,42 @@
import React from "react";
import PropTypes from "prop-types";
import Button from "../../../../components/Button/Button";
import { dialogStyles } from "./ConfirmationPopupStyles.js";
import {
Dialog,
DialogActions,
DialogContent,
DialogContentText,
DialogTitle,
Button,
} from "@mui/material";

const ConfirmationPopup = ({ open, onConfirm, onCancel }) => {
return (
<Dialog open={open} onClose={onCancel} closeAfterTransition={open}>
<DialogTitle>Confirm Action</DialogTitle>
<DialogContent>
<Dialog
PaperProps={{ sx: { padding: dialogStyles.paper } }}
open={open}
onClose={onCancel}
closeAfterTransition={open}
MandeepPaul marked this conversation as resolved.
Show resolved Hide resolved
>
<DialogTitle sx={dialogStyles.title}>Confirm Action</DialogTitle>
<DialogContent sx={dialogStyles.content}>
<DialogContentText>
Are you sure you want to perform this action?
</DialogContentText>
</DialogContent>
<DialogActions>
<Button onClick={onCancel}>Cancel</Button>
<Button onClick={onConfirm} color="primary">
Confirm
</Button>
<DialogActions sx={dialogStyles.actions}>
<Button
text="Cancel"
buttonType="secondary"
variant="text"
onClick={onCancel}
/>
<Button
text="Confirm"
onClick={onConfirm}
variant="contained"
buttonType="secondary"
/>
</DialogActions>
</Dialog>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export const dialogStyles = {
erenfn marked this conversation as resolved.
Show resolved Hide resolved
paper: {
padding: "16px",
},
title: {
padding: 0,
},
content: {
paddingLeft: 0,
},
actions: {
paddingBottom: 0,
paddingRight: 0,
},
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.product-page-container {
padding: 2% 3%;
width: 100%;
}

.product-page-header {
Expand Down
Loading