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

[Enhancement] - add responsive mobile view for documents table #606

Closed
ogorman89 opened this issue Mar 28, 2024 · 11 comments · Fixed by #665
Closed

[Enhancement] - add responsive mobile view for documents table #606

ogorman89 opened this issue Mar 28, 2024 · 11 comments · Fixed by #665
Assignees
Labels
enhancement Enhancement of existing features MVP Issues related to MVP

Comments

@ogorman89
Copy link
Contributor

ogorman89 commented Mar 28, 2024

Describe the Current Behavior/Feature:

Implement a mobile layout for the profile document table using cards. With the existing list of objects implemented in PASS, while it would end up showing the metadata for all documents stored within the Documents container, users could technically still trigger user permissions to block other users from viewing specific files. As such, we could still utilize this list to generate our cards.

In PASS, we have an example of how cards are implemented from a list of objects, check out the existing implementation of message previews from our custom Inbox/Outbox and the MessagePreview component itself.

Rationale:

  • implements the desired layout from figma design

Proposed Changes:

  • add a mobile view for the document table
  • should switch to mobile when the table starts to have a horizontal scroll around 900px
  • mobile view should be cards like the current figma design [Update: see issue #626, also see: link to figma]
  • should be responsive
  • For the responsive breakpoint we could use the existing MUI breakpoint at theme.breakpoints.down('sm') which can be obtained by importing theme and calling const isSmallScreen = useMediaQuery(theme.breakpoints.down('sm'));.
  • should use MUI cards
Screenshot 2024-03-27 at 8 30 12 PM

Possible Drawbacks:

N/A

Alternatives Considered:

N/A

Additional Context:

N/A

@ogorman89 ogorman89 added the enhancement Enhancement of existing features label Mar 28, 2024
@joshua-cornett joshua-cornett self-assigned this Apr 4, 2024
@joshua-cornett
Copy link
Contributor

Suppose I'll take a stab at this

@leekahung
Copy link
Contributor

Updated issue description by including additional information that could be useful for implementation.

@andycwilliams
Copy link
Member

If you haven't already @joshua-cornett , you can check out how we style messages (should be in MessagePreview.jsx). The base of that might be useful when creating cards for documents. And if we want, we could even create a basic card component to import into both Messages and Documents, similar to how FormSection.jsx works.

If we do decide to go that route, such a refactoring can definitely be left for a separate issue. Just want to mention this since it could save us some effort in the long run. Especially since the Contacts table will likely need cards very similar to the Documents table here as well.

@andycwilliams
Copy link
Member

andycwilliams commented May 23, 2024

It hasn't been made super clear, so I wanted to mention how there will need to be additional work to finish the full design from Figma.

2024-05-22

On mobile at least, there is an additional screen to display the details for the selected contact or document (a driver's license, in this example). In Messages, the user simply clicks on a message to expand it and read the contents. That wouldn't work as well for these, since they may contain much more information (including images).

However, I think that can be left for a separate issue and not be included in this one. The scope might already be a bit too broad, or at least not detailed enough. Maybe even leave it for after MVP.

Edit: Proposed this in #644.

@andycwilliams
Copy link
Member

Hey. Just wondering if there's any update with this. Thanks.

@joshua-cornett
Copy link
Contributor

joshua-cornett commented Aug 15, 2024

Hey all, so it seems that having description among the cards' primary columns may be problematic given that it is the field with the greatest overflow potential, leaving little room for much else. Instead, I propose we have it beneath the other fields. This is likely best as an expandable element with a more distinct background so as to give it a clear separation from the columns above.

image

I will include a screenshot of the proposed alternative once I get that up. The primary columns will likely be:

[Name] [Type] [Upload Date] [Expiration Date] [Actions]
[Description] (expandable)

@leekahung
Copy link
Contributor

Hey all, so it seems that having description among the cards' primary columns may be problematic given that it is the field with the greatest overflow potential, leaving little room for much else. Instead, I propose we have it beneath the other fields. This is likely best as an expandable element with a more distinct background so as to give it a clear separation from the columns above.

image

I will include a screenshot of the proposed alternative once I get that up. The primary columns will likely be:

[Name] [Type] [Upload Date] [Expiration Date] [Actions]
[Description] (expandable)

Should be fine. I'm good with this idea

@andycwilliams
Copy link
Member

andycwilliams commented Aug 16, 2024

There's a text truncate util you could use

@leekahung
Copy link
Contributor

Another idea we could try is to use some sort of collapsible to expand the card so you can view more information.
https://dribbble.com/tags/expandable-cards

@joshua-cornett
Copy link
Contributor

Another idea we could try is to use some sort of collapsible to expand the card so you can view more information.
https://dribbble.com/tags/expandable-cards

Yeah having the description be the expandable bit is what I was thinking

@andycwilliams
Copy link
Member

We were thinking that since this is a stopgap measure (we'll be creating a separate document view page later anyway), it would be more effort than worthwhile to design and code an expandable section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of existing features MVP Issues related to MVP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants