-
Notifications
You must be signed in to change notification settings - Fork 54
Use selectedService
prop in psammead-radio-schedules & psammead-most-read stories
#3291
Conversation
Blocked on #3279. Once this is merged, the new withServicesKnob version can be pulled in here. UPDATE: Above issue has now been merged. |
selectedService
prop in psammead-radio-schedules & psammead-most-read
selectedService
prop in psammead-radio-schedules & psammead-most-readselectedService
prop in psammead-radio-schedules & psammead-most-read stories
package-lock.json
Outdated
@@ -15317,7 +15317,7 @@ | |||
"dependencies": { | |||
"abbrev": { | |||
"version": "1.1.1", | |||
"resolved": "", | |||
"resolved": false, |
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.
Can you please remove these "resolved": false
changes? I think they just get added when we run npm install/npm ci
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.
This has been resolved
@@ -82,7 +82,7 @@ | |||
"@bbc/psammead-sitewide-links": "^4.0.10", | |||
"@bbc/psammead-story-promo": "^5.1.0", | |||
"@bbc/psammead-story-promo-list": "^4.0.5", | |||
"@bbc/psammead-storybook-helpers": "^8.2.5", | |||
"@bbc/psammead-storybook-helpers": "^8.2.6", |
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.
Since this was bumped up, CHANGELOG.md
should be updated in psammead too
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 CHANGELOG, package-lock.json and package.json are now updated.
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.
Removed updates to CHANGELOG, package-lock.json and package.json as since the version change in psammead-stoybook-helpers is minor, the changes in the package are already in use. This means psammead-stoybook-helpers doesn't need to be upgraded && this resolves the issue highlighted above
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.
Thank you for the updates 👍 I can still see some changes in package-lock.json
though, Jenkins should stop complaining after you remove them
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.
My statement above was a bit off. Since the minor change is still being noted and being installed, an update to the CHANGELOG and version numbers is still required.
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.
Sounds good. Can you make sure that psammead-storybook-helpers
version is bumped up in package.json
too, not just in package-lock.json
?
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.
Bumped the version. Sorry for the back and forth.
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.
Thanks for the cleanup 💅🏼
Going through the stories to double-check we don't get the error anymore I found the following warning in the MostRead->Rank->default
story because the listIndex
knob is a string but it expects to be a number.
You could also fix it in this PR or we can do it in a separate one ;)
import { MostReadRank, MostReadLink, MostReadList } from './index'; | ||
import notes from '../README.md'; | ||
|
||
const newsServiceDecorator = withServicesKnob({ | ||
defaultService: 'news', | ||
}); | ||
const listIndexRange = { |
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.
Nice one 👍
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 good 👍
LGTM. |
Resolves #3183
Overall change: Fixes the stories broken for variants on the RadioSchedule component by using the withServicesKnob
selectedService
prop added here. Remove workaround for stories with variants being broken in psammead-most-read stories.Code changes:
selectedService
prop inpsammead-radio-schedule
andpsammead-most-read
stories.psammead-storybook-helpers
.Radio schedule stories with variants should be appearing as expected on storybook.