Skip to content

Alex/150 table component - #158

Merged
Sectonic merged 8 commits into
mainfrom
alex/150-table-component
Sep 14, 2025
Merged

Sectonic merged 8 commits into
mainfrom
alex/150-table-component

Conversation

@alexdcdc

@alexdcdc alexdcdc commented Sep 8, 2025 •

Copy link
Copy Markdown
Collaborator

Description

Resolves #150

Tracking refactor as I go

Checklist

  • The ticket is mentioned above
  • The changes fulfill the success criteria of the ticket
  • The changes were self-reviewed
  • A review was requested

@netlify

netlify Bot commented Sep 8, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for hope-for-haiti ready!

Name Link
🔨 Latest commit afbbd3a
🔍 Latest deploy log https://app.netlify.com/projects/hope-for-haiti/deploys/68c60e65fa504b000875229d
😎 Deploy Preview https://deploy-preview-158--hope-for-haiti.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Sectonic
Sectonic self-requested a review September 10, 2025 14:04
Comment thread src/components/BaseTable.tsx Outdated
Comment thread src/screens/DonorOfferItemRequestsScreen.tsx Outdated
Comment thread src/screens/DonorOffersScreens/AdminDonorOffersScreen.tsx Outdated
@alexdcdc
alexdcdc requested a review from Sectonic September 12, 2025 06:34
@alexdcdc

Copy link
Copy Markdown
Collaborator Author

todo (possibly in next tickets):

  • fix unit price formatting? currently it only displays as raw decimal

  • get horizontal table scrolling to work with context menus: currently if you allow horizontal scrolling on the table the context menu that shows up when you click the options button will get clipped by the table boundaries. have not figured out a fix for that yet.

  • bulk add table untested b/c i don't have a sample excel sheet to upload.

can you make sure all the table row onClick effects got preserved in the refactor? i think i got all of them but would love to have a second pair of eyes.

@alexdcdc
alexdcdc marked this pull request as ready for review September 12, 2025 06:34

@Sectonic Sectonic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great work overall! This was a tough but needed ticket lol.

Comment thread src/screens/DonorOffersScreens/AdminDynamicDonorOfferScreen.tsx Outdated
</div>,
],
}))}
headerClassName="bg-blue-primary opacity-80 text-white"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

make all tables standard, so remove the custom styling for header classes and make all tables look how the accountManagement table looks.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This doesn't mean remove headerClassName as it could prove beneficial in other ways like dynamic styling, but generally the styling of tables should be standard.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If theres any clean way you can also provide styling to a single row, that would be beneficial as well.

Comment thread src/screens/DonorOffersScreens/PartnerDonorOffersScreen.tsx Outdated
Comment thread src/screens/DonorOffersScreens/PartnerDonorOffersScreen.tsx Outdated
@Sectonic

Copy link
Copy Markdown
Contributor

One other concern I have with the table row onClick is will other onClicks in the row be affected by it? I want to make sure there is a hierarchy of clicks, so if a button inside the row has an onclick it has priority over the row. Also maybe clicking the row itself is not the best UX in general, and that the onclick should be in the first cell of the row.

@alexdcdc

Copy link
Copy Markdown
Collaborator Author

Child onClick will need to explicitly call e.stopPropagation() to stop the parent onClick from happening, so requires a small extra step but is perfectly doable.

@Sectonic
Sectonic merged commit b5405ba into main Sep 14, 2025
5 checks passed
@Sectonic
Sectonic deleted the alex/150-table-component branch September 14, 2025 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generalizable Table with Pagination

2 participants