Skip to content

Add useTrackingDetails as sharable component#1077

Merged
gciotola merged 4 commits intomainfrom
tracking-details-modal
Apr 14, 2026
Merged

Add useTrackingDetails as sharable component#1077
gciotola merged 4 commits intomainfrom
tracking-details-modal

Conversation

@gciotola
Copy link
Copy Markdown
Contributor

@gciotola gciotola commented Apr 13, 2026

Related to commercelayer/issues-app#25

What I did

useTrackingDetails is now a standalone component, before it was used only internally in ResourceShipmentParcel.
It's also rendered within a Modal (it was an Overlay).

image

How to test

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests).
  • Make sure to add/update documentation regarding your changes.
  • You are NOT deprecating/removing a feature.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 13, 2026

Deploy Preview for commercelayer-app-elements ready!

Name Link
🔨 Latest commit 7d8519a
🔍 Latest deploy log https://app.netlify.com/projects/commercelayer-app-elements/deploys/69ddff5d08cd600008dd4790
😎 Deploy Preview https://deploy-preview-1077--commercelayer-app-elements.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.

@gciotola gciotola self-assigned this Apr 13, 2026
@gciotola gciotola added the enhancement New feature or request label Apr 13, 2026
@gciotola gciotola force-pushed the tracking-details-modal branch from 1fb1586 to 1d6bbcc Compare April 13, 2026 16:03
@gciotola gciotola requested a review from Copilot April 13, 2026 16:04
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 13, 2026

npm i https://pkg.pr.new/commercelayer/app-elements/@commercelayer/app-elements@1077

commit: 7d8519a

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extracts the shipment parcel tracking-details UI into a standalone useTrackingDetails hook so it can be reused outside of ResourceShipmentParcels, and switches the presentation from an Overlay to a Modal. It also adds a Storybook story demonstrating the new hook.

Changes:

  • Added a new reusable useTrackingDetails hook that renders tracking history inside a Modal.
  • Updated ResourceShipmentParcels to use the new hook and modal-based UI.
  • Added a Storybook story and exported the hook from the package entrypoint.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/docs/src/stories/resources/useTrackingDetails.stories.tsx Adds a Storybook example to open/inspect the tracking-details modal via the new hook.
packages/app-elements/src/ui/resources/useTrackingDetails.tsx Introduces the reusable hook + modal UI for tracking history/details.
packages/app-elements/src/ui/resources/ResourceShipmentParcels.tsx Replaces the previous internal overlay implementation with the new shared hook/modal.
packages/app-elements/src/main.ts Exports useTrackingDetails from the library entrypoint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/app-elements/src/ui/resources/useTrackingDetails.tsx Outdated
Comment thread packages/app-elements/src/ui/resources/useTrackingDetails.tsx
pfferrari
pfferrari previously approved these changes Apr 13, 2026
Copy link
Copy Markdown
Contributor

@pfferrari pfferrari left a comment

Choose a reason for hiding this comment

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

💯

pfferrari
pfferrari previously approved these changes Apr 14, 2026
malessani
malessani previously approved these changes Apr 14, 2026
@gciotola gciotola dismissed stale reviews from malessani and pfferrari via 7d8519a April 14, 2026 08:48
@gciotola gciotola requested review from malessani and pfferrari April 14, 2026 08:48
@gciotola gciotola merged commit 7994bef into main Apr 14, 2026
7 checks passed
@gciotola gciotola deleted the tracking-details-modal branch April 14, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants