Skip to content

Version Update from 1.0.0-alpha to 1.1.0-alpha #685

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

Merged
merged 24 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b76a9e7
Update version to 1.0.1 for hotfix; Adjusted contact state for contac…
leekahung Sep 19, 2024
9cc603d
Updating unit tests to match with hotfixes
leekahung Sep 19, 2024
3a0b62d
Merge pull request #675 from codeforpdx/hotfix-contacts-and-messages
leekahung Sep 19, 2024
ed21cd4
added vercel.json with redirects
Jared-Krajewski Sep 20, 2024
007d6e6
Merge pull request #677 from codeforpdx/676-vercel-404-routing-fix
Jared-Krajewski Sep 20, 2024
fa325f3
fixed vercel.json to allow redirects in vercel
Jared-Krajewski Sep 20, 2024
5951db7
Update webcam modal to include a directional button for user-facing a…
leekahung Sep 20, 2024
2a8aa54
Merge pull request #678 from codeforpdx/676-vercel-404-routing-fix-up…
leekahung Sep 20, 2024
c7524c6
Merge branch 'Development' into hotfix-take-picture-modal-size-and-in…
leekahung Sep 20, 2024
da991eb
Simplifying sorting function
andycwilliams Sep 25, 2024
45308ba
Adding basic sorting tests
andycwilliams Sep 25, 2024
ed386a3
Running prettier
andycwilliams Sep 25, 2024
6505239
Merge pull request #679 from codeforpdx/hotfix-take-picture-modal-siz…
leekahung Oct 1, 2024
2b8c5da
Merge pull request #681 from codeforpdx/663/add-mobile-contacts-search
leekahung Oct 1, 2024
33731a0
Migrated personal documents list to Documents; utilize state to manag…
leekahung Oct 10, 2024
c7a04cb
Created TODOs for unit tests that's breaking and the reasoning of why…
leekahung Oct 10, 2024
d0c5e32
Commenting out unused functions for unit tests that needs to be reworked
leekahung Oct 10, 2024
5fe0069
Update PASS version from 1.0.1 to 1.1.0
leekahung Oct 10, 2024
27e8cbc
Update requested changes for JSDocs and import fixes
leekahung Oct 31, 2024
7232ace
Update styling for certain pages and components to trigger a semi-mob…
leekahung Oct 31, 2024
6f49b99
Merge pull request #683 from codeforpdx/issue-682/create-documents-route
leekahung Nov 1, 2024
25c0c30
added word break to breadcrumbs to prevent side scroll bar and allow …
Jared-Krajewski Nov 13, 2024
ce55cd2
Merge pull request #684 from codeforpdx/issue-682/documents-styling-f…
leekahung Nov 13, 2024
0e896f0
Merge branch 'Master' into Development
leekahung Nov 14, 2024
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
90 changes: 54 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pass",
"homepage": ".",
"version": "1.0.0-alpha",
"version": "1.1.0-alpha",
"description": "",
"scripts": {
"start": "concurrently --kill-others \"npm run podserver\" \"npm run dev\"",
Expand Down
3 changes: 2 additions & 1 deletion src/AppRoutes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useSession } from '@hooks';
import { CIVIC_FORM_LIST, FormLayout } from '@components/CivicProfileForms';
import { MESSAGE_PAGES_LIST, MessagesLayout } from '@components/Messages';
// Page Imports
import { CivicProfile, Home, Contacts, Profile, Signup } from './pages';
import { CivicProfile, Documents, Home, Contacts, Profile, Signup } from './pages';

const ProtectedRoute = ({ isLoggedIn, children }) =>
isLoggedIn ? children ?? <Outlet /> : <Navigate to="/" replace />;
Expand Down Expand Up @@ -58,6 +58,7 @@ const AppRoutes = () => {
))}
</Route>
<Route path="/profile" element={<Profile />} />
<Route path="/documents" element={<Documents />} />
{/* TODO: Remove blank Civic Profile page, ensure it directs Basic Information instead */}
<Route path="/civic-profile" element={<CivicProfile />}>
{CIVIC_FORM_LIST.map((formProps) => (
Expand Down
18 changes: 9 additions & 9 deletions src/components/Contacts/ContactListTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ import ContactListTableMobile from './ContactListTableMobile';
* @param {Function} Props.addContact - from Contacts page
* @returns {React.JSX.Element} The ContactListTable Component
*/
const ContactListTable = ({ contacts, deleteContact, handleDeleteContact, addContact }) => {
const ContactListTable = ({ contacts = [], deleteContact, handleDeleteContact, addContact }) => {
const [showMessageModal, setShowMessageModal] = useState(false);
const [messageToField, setMessageToField] = useState('');
const theme = useTheme();
const isSmallScreen = useMediaQuery(theme.breakpoints.down('sm'));

const [showAddContactModal, setShowAddContactModal] = useState(false);
const [contactToEdit, setContactToEdit] = useState({});
const [contactToEdit, setContactToEdit] = useState(null);
const [isEditing, setIsEditing] = useState(false);
const contactWebIds = contacts.map(({ webId }) => webId);
const theme = useTheme();
const isSmallScreen = useMediaQuery(theme.breakpoints.down('sm'));
const isSmallScreenHeight = useMediaQuery('(max-height: 600px)');

const handleSendMessage = (contactId) => {
setShowMessageModal(!showMessageModal);
Expand All @@ -47,17 +48,15 @@ const ContactListTable = ({ contacts, deleteContact, handleDeleteContact, addCon
setIsEditing(true);
};

const contactWebIds = contacts.map(({ webId }) => webId);

return (
<Box
sx={{
margin: '20px 0',
width: '95vw',
height: '500px'
minHeight: '500px'
}}
>
{isSmallScreen ? (
{isSmallScreen || isSmallScreenHeight ? (
<ContactListTableMobile
data-testid="ContactListTableMobile"
contacts={contacts}
Expand Down Expand Up @@ -89,6 +88,7 @@ const ContactListTable = ({ contacts, deleteContact, handleDeleteContact, addCon
handleDeleteContact={handleDeleteContact}
contactWebIds={contactWebIds}
contacts={contacts}
setContactToEdit={setContactToEdit}
/>
</Box>
);
Expand Down
1 change: 0 additions & 1 deletion src/components/Contacts/ContactListTableDesktop.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ const CustomToolbar = () => (
* @param {Function} Props.editContact - Function to edit a contact
* @param {Function} Props.handleSendMessage - Function to handle sending a message
* @param {string} Props.'data-testid' - Test ID
// * @param {Function} Props.handleProfileClick - Function to handle profile click
* @returns {React.JSX.Element} The ContactListTableDesktop component
*/
const ContactListTableDesktop = ({
Expand Down
40 changes: 24 additions & 16 deletions src/components/Documents/DocumentCard.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// React Imports
import React, { useState } from 'react';
import { useLocation } from 'react-router-dom';
// Material UI Imports
import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
Expand Down Expand Up @@ -41,6 +42,9 @@ import { truncateText, getTypeText } from '@utils';
* @returns {React.JSX.Element} The DocumentCard component
*/
const DocumentCard = ({ document, onShare, onDelete, onPreview }) => {
const location = useLocation();
const profileWebId = decodeURIComponent(location.pathname.split('/')[2]);

const [anchorEl, setAnchorEl] = useState(null);
const [openMenu, setOpenMenu] = useState(null);

Expand Down Expand Up @@ -149,22 +153,26 @@ const DocumentCard = ({ document, onShare, onDelete, onPreview }) => {
>
Preview
</MenuItem>
<MenuItem
component={Button}
onClick={handleMenuItemClick(onShare, document)}
startIcon={<ShareIcon sx={iconSize} />}
sx={iconStyling}
>
Share
</MenuItem>
<MenuItem
component={Button}
onClick={handleMenuItemClick(onDelete, document)}
startIcon={<DeleteOutlineOutlinedIcon sx={iconSize} />}
sx={iconStyling}
>
Delete
</MenuItem>
{`${profileWebId}` === 'undefined' && (
<MenuItem
component={Button}
onClick={handleMenuItemClick(onShare, document)}
startIcon={<ShareIcon sx={iconSize} />}
sx={iconStyling}
>
Share
</MenuItem>
)}
{`${profileWebId}` === 'undefined' && (
<MenuItem
component={Button}
onClick={handleMenuItemClick(onDelete, document)}
startIcon={<DeleteOutlineOutlinedIcon sx={iconSize} />}
sx={iconStyling}
>
Delete
</MenuItem>
)}
</Menu>
</Card>
</Box>
Expand Down
3 changes: 2 additions & 1 deletion src/components/Documents/DocumentTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const DocumentTable = ({ handleAclPermissionsModal, handleSelectDeleteDoc }) =>
const { documentListObject, loadingDocuments } = useContext(DocumentListContext);

const isMobile = useMediaQuery(theme.breakpoints.down('sm'));
const isSmallScreenHeight = useMediaQuery('(max-height: 600px)');

/**
* Handles the local display of a document by opening it in a new window.
Expand Down Expand Up @@ -98,7 +99,7 @@ const DocumentTable = ({ handleAclPermissionsModal, handleSelectDeleteDoc }) =>
}}
data-testid="document-table"
>
{isMobile ? (
{isMobile || isSmallScreenHeight ? (
<DocumentsMobile documents={documents} handlers={handlers} data-testid="documents-mobile" />
) : (
<DocumentsDesktop
Expand Down
Loading
Loading