-
Notifications
You must be signed in to change notification settings - Fork 8
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(pie-thumbnail): DSW-2580 add basic thumbnail functionality #2138
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 2444f43 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
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 |
|
58dd0bd
to
e88a86c
Compare
|
||
type ThumbnailStoryMeta = Meta<ThumbnailProps>; | ||
|
||
const defaultArgs: ThumbnailProps = {}; |
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 think we need to revert this line and assign the default values from the component itself
it will be something like
const defaultArgs: ThumbnailProps = { ...defaultProps, };
and defaultProps is imported from '@justeattakeaway/pie-thumbnail'
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.
The defaults for storybook are
const defaultArgs: ThumbnailProps = {
...defaultProps,
src: 'https://www.takeaway.com/consumer-web/images/takeaway-brand.61e55e0b.svg',
alt: 'JET logo',
};
do you think we should use the same for tests? (Component defaults for src and alt are now empty strings)
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.
Yes we can use the same for tests
'o-tn': true, | ||
[`o-tn--${variant}`]: true, |
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.
the classes names should be prefixed with .c-thumbnail where c stands for component. this should make it easier to search if someone would like to find a specific classname.
'o-tn': true, | |
[`o-tn--${variant}`]: true, | |
'c-thumbnail': true, | |
[`c-thumbnail--${variant}`]: true, |
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.
Thats something I wanted to ask actually - what does the 'o-' prefix stand for in pie-button scss for example?
Is there a specific convention that you follow? I took it from there as is, also used abbreviation of 'tn' because of that, but was wondering about how classes should be named.
Will make the suggested updates!
/test-aperture |
Starting a new snapshot build. You can view the logs here. |
@bntsv Your snapshots have been published to npm! Test the snapshots by updating your Note If you have more than one of these packages installed, we suggest using the new snapshots for all of them to help avoid version conflicts. yarn up @justeattakeaway/[email protected] --mode=update-lockfile yarn up @justeattakeaway/[email protected] --mode=update-lockfile Then finally: yarn install |
Describe your changes (can list changeset entries if preferable)
Author Checklist (complete before requesting a review, do not delete any)
PIE Storybook
/PIE Docs
PR preview.Not-applicable Checklist items
Please move any Author checklist items that do not apply to this pull request here.
/test-aperture
command.Testing
How do I test my changes?
Reviewer checklists (complete before approving)
Mark items as
[-] N/A
if not applicable.Reviewer 1
PIE Storybook
/PIE Docs
PR preview.Reviewer 2
PIE Storybook
/PIE Docs
PR preview.