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(category): make category page configuration model generic #783

Merged
merged 1 commit into from
Apr 9, 2020

Conversation

lderrickable
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

The category page configuration state model is not actually generic.

Does this PR introduce a breaking change?

[x] Yes
[ ] No

@lderrickable lderrickable added the package: category @daffodil/category label Apr 9, 2020
@lderrickable lderrickable requested a review from a team as a code owner April 9, 2020 19:44
@lderrickable lderrickable self-assigned this Apr 9, 2020
@@ -2,7 +2,7 @@ import { DaffCategoryFilter } from './category-filter';
import { DaffCategorySortOption } from './category-sort-option';
import { DaffCategoryRequest } from './requests/category-request';

export interface DaffCategoryPageConfigurationState extends DaffCategoryRequest {
export type DaffCategoryPageConfigurationState<T extends DaffCategoryRequest> = T & {
Copy link
Contributor Author

@lderrickable lderrickable Apr 9, 2020

Choose a reason for hiding this comment

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

This is the main change. In typescript you can't do DaffCategoryPageConfigurationState<T extends DaffCategoyRequest> extends T (microsoft/TypeScript#2225)

@griest024
Copy link
Member

@lderrickable are there any functional changes beyond just type changes?

@lderrickable
Copy link
Contributor Author

@lderrickable are there any functional changes beyond just type changes?

No, just the model change. Another PR is coming that will address the effects typing issue you brought up in the other PR.

Copy link
Member

@griest024 griest024 left a comment

Choose a reason for hiding this comment

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

lgtm

@lderrickable lderrickable merged commit 6722e48 into develop Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: category @daffodil/category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants