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

Core: Pass denormalized stories to the sort function #11572

Merged
merged 2 commits into from
Jul 17, 2020

Conversation

tmeasday
Copy link
Member

Issue: #11010

What I did

Denormalize stories before sorting

How to test

  • Is this testable with Jest or Chromatic screenshots? YEP

TODO

I think I should memoize the denorming part otherwise there is no point in memoizing the sorting.

@tmeasday tmeasday requested a review from shilman July 16, 2020 06:59
@github-actions
Copy link
Contributor

github-actions bot commented Jul 16, 2020

Fails
🚫

PR is not labeled with one of: ["cleanup","doc-dependencies:update","BREAKING CHANGE","feature request","bug","documentation","maintenance","dependencies:update","dependencies","other"]

Generated by 🚫 dangerJS against ea9786c

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

Minor suggestions.

I didn't get the memoization part. Can you elaborate?

@tmeasday
Copy link
Member Author

sortedStories() calls getSortedStoryIds which is memoized (once). But the first argument is an object that is recreated each time you call sortedStories. So I think that means it'll never reuse the memoized result, which makes the whole thing pointless. I'll double check.

@tmeasday
Copy link
Member Author

ok the memoizing wasn't doing anything to start off with.

@shilman shilman added this to the 6.0 args milestone Jul 16, 2020
@shilman shilman changed the title Pass stories denormalized to the sort function. Core: Pass denormalized stories to the sort function Jul 17, 2020
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

LGTM!

@shilman shilman merged commit 840ea68 into next Jul 17, 2020
@stof stof deleted the 11010-denorm-parameters-for-storysort branch May 25, 2022 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants