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

my testing of fixes to fix the mobile issue #68

Merged
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
9 changes: 4 additions & 5 deletions src/components/ListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,13 @@ export function ListItemCheckBox({ item, listPath }: Props) {
};

return (

<div className="d-flex flex-column justify-content-center mt-5">
<span
className={`UrgencyStatus text-nowrap ms-5 px-5 ${urgencyStatus.replace(/\s/g, "-")}`}
>
{urgencyStatus}
</span>
<section className="ListItemBox custom-borders d-flex p-2 m-1">
<section className="ListItemBox custom-borders d-flex p-2 m-1 align-items-center">
<section className="d-flex flex-grow-1 PurchaseItem">
<Form.Check
className="me-3"
Expand All @@ -142,14 +141,14 @@ export function ListItemCheckBox({ item, listPath }: Props) {
aria-checked={isChecked}
disabled={isChecked}
/>
<h4 className="text-nowrap me-1 mb-0"> {item.name} </h4>
<Form.Label className="">{item.name}</Form.Label>
Copy link
Collaborator

Choose a reason for hiding this comment

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

When I tested it, the larger text size pushes some content out. I'll use a responsive font size when I do merge!

item-text.mov

.item-text {
font-size: 0.75em;
}
}

</section>

<section className="EditItem d-flex gap-sm-4 align-items-end">
<section className="EditItem d-flex gap-2 align-items-end">
<ItemQuantityForm saveItemQuantity={editItemQuantity} item={item} />

<Button
className="DeleteButton mt-auto w-auto ms-2 "
className="DeleteButton w-auto"
variant="danger"
onClick={() => deleteItemHandler()}
>
Expand Down
6 changes: 3 additions & 3 deletions src/components/NavBar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
color: $secondary-blue;
}
}
}

.navbar .navbar-toggler {
background-color: $primary-beige;
}
.navbar .navbar-toggler {
background-color: $primary-beige;
}

.navbar button {
Expand Down
13 changes: 6 additions & 7 deletions src/components/forms/ItemQuantityForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,22 @@ export function ItemQuantityForm({
<div>
{edit ? (
<>
<Button className="custom-button" onClick={updateItemQuantity}>
<span className="d-none d-md-inline"> Save </span>
<Button variant="dark" onClick={updateItemQuantity}>
<span className="d-none d-md-inline text-primary">Save</span>
<IoMdCheckmark className="d-block d-md-none" />
</Button>{" "}
<Button className="custom-button" onClick={toggleEdit}>
<span className="d-none d-md-inline">Cancel</span>
<Button variant="dark" onClick={toggleEdit}>
<span className="d-none d-md-inline text-primary">Cancel</span>
<GiCancel className="d-block d-md-none" />
</Button>
</>
) : (
<Button className="custom-button" onClick={toggleEdit}>
<span className="d-none d-md-inline">Edit</span>
<Button variant="dark" onClick={toggleEdit}>
<span className="d-none d-md-inline text-primary">Edit</span>
<FaEdit className="d-block d-md-none" />
</Button>
)}
</div>
</div>

);
}
4 changes: 2 additions & 2 deletions src/styles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ $theme-colors: (
"secondary": $primary-blue,
"info": $tertiary-blue,
"dark": $secondary-blue,
"danger": #dc3545,
);

$font-size-root: null;
Expand All @@ -26,14 +27,13 @@ body {
text-align: center;
border: none;
padding: 0.5rem;
width: 11rem;

&:hover {
background-color: $secondary-blue;
color: $primary-beige;
}
}

a svg {
svg {
fill: $primary-beige;
}
9 changes: 6 additions & 3 deletions src/views/authenticated/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useState, useMemo, useRef } from "react";
import { ListItemCheckBox } from "../../components/ListItem";
import { FilterListInput } from "../../components/FilterListInput";
import { ListItem, comparePurchaseUrgency } from "../../api";
import { Container } from "react-bootstrap";
import Container from "react-bootstrap/Container";
import Button from "react-bootstrap/Button";
import ShareListForm from "../../components/forms/ShareListForm";
import { AddItemForm } from "../../components/forms/AddItemForm";
Expand Down Expand Up @@ -75,7 +75,7 @@ export function List({ data: unfilteredListItems, listPath }: Props) {

// Main content when list is not empty
return (
<Container className="ListPageContainer ">
<Container>
<div className="ListItemSection">
<header>
<h2 className="ListName p-1 m-2 mt-2">{listName}</h2>
Expand Down Expand Up @@ -104,7 +104,10 @@ export function List({ data: unfilteredListItems, listPath }: Props) {
</div>

<ShareListForm listPath={listPath} />
<Button className="d-md-none mt-3" onClick={scrollToViewList}>
<Button
className="d-md-none mt-3 custom-button align-self-center"
onClick={scrollToViewList}
>
{"View List"}
</Button>
</Container>
Expand Down