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

feat(core): add tabs for customer account #719

Merged
merged 1 commit into from
Apr 9, 2024
Merged

Conversation

bc-alexsaiannyi
Copy link
Contributor

What/Why?

This PR adds tabs for Customer's account page.

Testing

Locally

@bc-alexsaiannyi bc-alexsaiannyi requested a review from a team as a code owner April 1, 2024 14:30
Copy link

changeset-bot bot commented Apr 1, 2024

🦋 Changeset detected

Latest commit: e0c25ec

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Apr 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
catalyst-latest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2024 2:06pm
catalyst-testbed ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2024 2:06pm
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
catalyst-1millionproducts-store ⬜️ Ignored (Inspect) Visit Preview Apr 9, 2024 2:06pm
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Apr 9, 2024 2:06pm
catalyst-storybook ⬜️ Ignored (Inspect) Visit Preview Apr 9, 2024 2:06pm
catalyst-uk ⬜️ Ignored (Inspect) Visit Preview Apr 9, 2024 2:06pm

Comment on lines 6 to 13

export type TabType =
| 'orders'
| 'messages'
| 'addresses'
| 'wishlists'
| 'recently-viewed'
| 'settings';
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can make this a single source of truth?

Suggested change
export type TabType =
| 'orders'
| 'messages'
| 'addresses'
| 'wishlists'
| 'recently-viewed'
| 'settings';
export const tabList = ['orders', 'messages', 'addresses', 'wishlists', 'recently-viewed', 'settings'] as const
export type TabType = keyof tabList;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, Chance. I've updated but with small changes. while trying to export tabList I got an error ... is not a valid Next.js entry export value and since we use tablist as prop in <AccountTabs/> so I moved both of them to layout and export only TabType across page & component. What do you think?

@jorgemoya
Copy link
Contributor

jorgemoya commented Apr 3, 2024

I was playing with it on the demo site and it seems like there's a delay between when a tab is selected vs when the content renders. Wondering if we can do something about it so that it looks like an exact match, like using the path to select the tab.

Kapture.2024-04-02.at.20.08.21.mp4

Copy link
Contributor

@bc-azvierieva bc-azvierieva left a comment

Choose a reason for hiding this comment

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

Nice job!

Copy link
Contributor

github-actions bot commented Apr 9, 2024

⚡️🏠 Lighthouse report

Lighthouse ran against https://catalyst-latest-hdlaxeeer-bigcommerce-platform.vercel.app

🖥️ Desktop

We ran Lighthouse against the changes on a desktop and produced this report. Here's the summary:

Category Score
🟢 Performance 100
🟢 Accessibility 100
🟠 Best practices 78
🟢 SEO 90

📱 Mobile

We ran Lighthouse against the changes on a mobile and produced this report. Here's the summary:

Category Score
🟢 Performance 98
🟢 Accessibility 100
🟠 Best practices 78
🟢 SEO 92

@bc-alexsaiannyi bc-alexsaiannyi added this pull request to the merge queue Apr 9, 2024
Merged via the queue into main with commit ab67b34 Apr 9, 2024
15 checks passed
@bc-alexsaiannyi bc-alexsaiannyi deleted the account-tabs branch April 9, 2024 14:10
@github-actions github-actions bot mentioned this pull request Apr 8, 2024
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.

5 participants