-
Notifications
You must be signed in to change notification settings - Fork 1
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
[MPDX-7853] Add contact details designation account column #871
Conversation
@@ -29,30 +29,20 @@ export const ContactHeaderPartnerSection: React.FC<Props> = ({ | |||
<TextSkeleton variant="text" /> | |||
</ContactHeaderSection> | |||
); | |||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No functionality is changed here, I just reduced some nesting and removed the unnecessary <Fragment>
and <span>
.
This pull request is automatically being deployed by Amplify Hosting (learn more). |
@dr-bizz You can hold off on reviewing this. Scott wants the visibility of this column to be user-configurable instead of automatic. |
6dd838a
to
1d5f7d6
Compare
@caleballdrin @dr-bizz Let me know if you have any UX suggestions. One thing I noticed is that it's hard to get the totals columns to line up with the data grid columns when the user hides columns. I added explicit Amount and Foreign Amount columns just in case they don't line up so that it's still obvious what the totals numbers are. I think it's an overall improvement though because the old version didn't show the totals at all. Also, I cherry-picked the commit that adds support for |
3b33149
to
795cac0
Compare
@j2trumpet might also have UX suggestions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on this! This is 95% done, just some finishing touches to make it look better.
|
||
export const useLocalStorage = <T>( | ||
key: string, | ||
initialValue: T, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the initialValue be optional? or default to undefined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initialValue
provides the value if the item is not currently saved in localStorage
. If you want the initialValue to be undefined, I would think you would make that explicit with useLocalStorage<Value | undefined>('key', undefined)
.
Right now, there is only one place that uses useLocalStorage
. Are you OK with considering making initialValue
optional if/when we have a need for that in the app? I'd rather not make this hook support use cases that we aren't using right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be stored in the database so that if people log in on different computers their configuration remains?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@caleballdrin Ultimately, probably so. Adding a new preference will require a server-side change. I was trying to get an MVP working that I could get feedback on from Scott.
src/components/Contacts/ContactDetails/ContactDonationsTab/ContactDonationsTab.tsx
Outdated
Show resolved
Hide resolved
Yeah, that's the problem. Most people don't need all the columns, but a few people are asking for all the original columns, which is more than fits on smaller screens. I'm honestly not sure how to satisfy both constraints.
Can you scroll to show the rest of it? I was able to. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't touched MPDX for a while, so I'm not sure what the exact requirements or scope are for this ticket, but a few things stood out to me.
This is a little nit-picky, but when you hover over a column header, the sorting arrow fades in but the three dots pop in immediately. Could those be synced?
Do we really need the "hide column" functionality in both the column header dropdown and through the "Show columns" menu toggles? I feel like we could get rid of the "Hide" menu option and run everything through "Show columns" which I might rename to "Manage columns".
After opening a column header menu, should the three dots close the menu on a second click?
I thought date sorting wasn't working, but then I noticed that every entry on the report I'm looking at was logged on the same date.
The gray tone difference for the sorting arrow is so minimal between descending and unsorted that I didn't realize what was happening. It looked like there were two different sorts that showed an up arrow. Maybe we could find a more obvious difference for the states?
To the concern about not having enough horizontal room for all the columns, maybe we could add a note somewhere that says "Not seeing all your data columns? Double check that the desired column is set to show or try scrolling/swiping right." |
@dr-bizz What do you think about setting a minimum width on all of the columns to keep them from getting too small and then if there isn't enough space, they will just have to scroll horizontally to view all the columns? |
@j2trumpet All of the header functionality is provided by MUI X Data Grid.
I believe this is possible.
I believe that removing the "Hide" menu option will require upgrading to MUI X v6.
I don't think that this is configurable.
That's a valid point, at least if applying a sort order doesn't change the order of the items much. I believe the arrow can be styled. What kind of a different state would you recommend? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving this because none of my thoughts are deal-breaking for approval.
I think that's a good idea. |
795cac0
to
165f309
Compare
@@ -115,7 +115,7 @@ export const SidePanelsLayout: FC<SidePanelsLayoutProps> = ({ | |||
headerHeight = '0px', | |||
}) => { | |||
const isMobile = useMediaQuery((theme: Theme) => | |||
theme.breakpoints.down('sm'), | |||
theme.breakpoints.down('md'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breakpoint made the detail pretty small on small screens, like ones around 700px. I increased the breakpoint to hide the list and just show the panel on those small screens.
@dr-bizz I finally got around to updating this based on your feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spotted some issues (donations flashing onLoad), but overall it looked good.
What is the need for the MUI patch?
src/components/Contacts/ContactDetails/ContactDonationsTab/DonationsGraph/DonationsGraph.tsx
Show resolved
Hide resolved
src/components/Contacts/ContactDetails/ContactDonationsTab/ContactDonationsTab.tsx
Outdated
Show resolved
Hide resolved
@dr-bizz By default, the data grid preferences popup opens down, which causes the weird scrolling and clipping issues I believe you were seeing when you said "Also the column popup is cut off by the screen." I couldn't find a way to fix it because of how our layout is designed, so I patched MUI to open the popup up instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left one comment, but it's looking good so I'm approving it
Bundle sizes [mpdx-react]Compared against aad2df0
|
2bdfa98
to
ebcba43
Compare
Description
https://jira.cru.org/browse/MPDX-7853
Checklist: