-
Notifications
You must be signed in to change notification settings - Fork 2
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(SupportedDevicesTable): Group list by brands #251
Conversation
Is there a way to add some additional devices to the seed data, so that the story can capture the overlay behavior? |
The section expansion / compression logic is a bit wrong. The section is supposed to compress back down to the 3-item view. See the prototype here: https://www.figma.com/proto/6nCfNVHmYQ7wxhnFOpFBm6/Supported-devices?type=design&node-id=171-37116&t=qUp24hA279bNHfHY-0&scaling=min-zoom&page-id=167%3A15042&starting-point-node-id=171%3A37116 |
Example data can be updated here https://github.com/seamapi/fake-seam-connect/blob/main/src/pages/api/internal/device_models/list.ts |
And the fake will need the |
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.
Still working though it, but leaving some comments for now. We need to address the fake updates and api usage first anyway.
src/lib/seam/components/SupportedDeviceTable/SupportedDeviceContent.tsx
Outdated
Show resolved
Hide resolved
src/lib/seam/components/SupportedDeviceTable/HiddenDevicesOverlay.tsx
Outdated
Show resolved
Hide resolved
src/lib/seam/components/SupportedDeviceTable/ShowAllDevicesButton.tsx
Outdated
Show resolved
Hide resolved
src/lib/seam/components/SupportedDeviceTable/ShowAllDevicesButton.tsx
Outdated
Show resolved
Hide resolved
src/lib/seam/components/SupportedDeviceTable/ShowAllDevicesButton.tsx
Outdated
Show resolved
Hide resolved
src/lib/seam/components/SupportedDeviceTable/SupportedDeviceBrandSection.tsx
Outdated
Show resolved
Hide resolved
bbbe5a1
to
fa47612
Compare
aac91c1
to
5bc1774
Compare
my bad! I thought it was weird that there was no spec for the spacing. Updated in 031af09 CleanShot.2023-06-29.at.11.46.06.mp4 |
ok! This should be ready for re-review: CleanShot.2023-06-29.at.12.50.18.mp4 |
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.
We do need to update the fake seam connect version so we can review the storybook and then we should get a review from @dawnho before merge. So consider this blocked until then.
Found a few quick code suggestions. The naming stuff is non-blocking as it's all internal, but always fun to chat about. Otherwise nothing else major blocking from me.
src/lib/seam/components/SupportedDeviceTable/SupportedDeviceBrandSection.tsx
Outdated
Show resolved
Hide resolved
src/lib/seam/components/SupportedDeviceTable/SupportedDeviceBrandSection.tsx
Show resolved
Hide resolved
src/lib/seam/components/SupportedDeviceTable/SupportedDeviceBrandSection.tsx
Outdated
Show resolved
Hide resolved
src/lib/seam/components/SupportedDeviceTable/SupportedDeviceContent.tsx
Outdated
Show resolved
Hide resolved
src/lib/seam/components/SupportedDeviceTable/SupportedDeviceContentRows.tsx
Outdated
Show resolved
Hide resolved
src/lib/seam/components/SupportedDeviceTable/SupportedDeviceContentRows.tsx
Outdated
Show resolved
Hide resolved
src/lib/seam/components/SupportedDeviceTable/SupportedDeviceContent.tsx
Outdated
Show resolved
Hide resolved
src/lib/seam/components/SupportedDeviceTable/SupportedDeviceContent.tsx
Outdated
Show resolved
Hide resolved
Can we add the |
The accordion looks 🔥 ! Thanks for the fixes! |
Not sure where this needs to be updated for it to work in the Preview. It's already updated in package.json |
…ntent.tsx Co-authored-by: Evan Sosenko <evan@getseam.com>
|
||
import { useDeviceProviders } from 'lib/seam/devices/use-device-providers.js' | ||
|
||
export function useDeviceProvider(brand: string): DeviceProvider { |
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 was going to suggest we return null or isLoading while the hook is loading, but maybe the behavior that the provider will show as unknown until it loads or in case it fails is better UX since things will still partially render if this is loading or fails.
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.
@mikewuu Will merge this now but leave this comment open to discuses if we want to change this or not.
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.
Looks great! What does the filter button do, btw? I know nino added that in the designs, but he hadn't got around to creating a filter menu yet. We can hide that if it's not an active button.
@dawnho You should be able to play with the Filter button in the storybook. It looks like this |
closes #234
Notable things
> 1
device, but it's actually set to 3.<= 3
devices, it will just show all the models.Wasn't sure about the spacing when a brand is collapsed, opted to remove theNo longer relevant, see feat(SupportedDevicesTable): Group list by brands #251 (comment).32px
spacing.Screenshots
CleanShot.2023-06-29.at.04.06.28.mp4