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

refactor(atomic): split the atomic store into composable parts #4806

Merged
merged 16 commits into from
Jan 15, 2025

Conversation

alexprudhomme
Copy link
Contributor

@alexprudhomme alexprudhomme commented Dec 23, 2024

https://coveord.atlassian.net/browse/KIT-3814

The atomic store was messy. The common store was way too big. There was no need for all that stuff in every store.

Copy link

github-actions bot commented Dec 23, 2024

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 243.8 243.8 0
commerce 355 355 0
search 414.9 414.9 0
insight 406.2 406.2 0
recommendation 256.1 256.1 0
ssr 408.8 408.8 0
ssr-commerce 372.7 372.7 0

SSR Progress

Use case SSR (#) CSR (#) Progress (%)
search 39 44 89
recommendation 0 4 0
case-assist 0 6 0
insight 0 27 0
commerce 0 15 0
Detailed logs search : buildInteractiveResult
search : buildInteractiveInstantResult
search : buildInteractiveRecentResult
search : buildInteractiveCitation
search : buildGeneratedAnswer
recommendation : missing SSR support
case-assist : missing SSR support
insight : missing SSR support
commerce : missing SSR support

@alexprudhomme alexprudhomme marked this pull request as ready for review December 27, 2024 15:20
@alexprudhomme alexprudhomme requested review from a team as code owners December 27, 2024 15:20
Copy link
Contributor

@fbeaudoincoveo fbeaudoincoveo left a comment

Choose a reason for hiding this comment

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

Isn't this a breaking change? Custom components can rely on store functions / attributes.

@alexprudhomme
Copy link
Contributor Author

alexprudhomme commented Jan 6, 2025

Isn't this a breaking change? Custom components can rely on store functions / attributes.

Maybe it is but this could be considered as a bug.

For example, all of those should not be available to use in the commerce store... They are only used in search & insight. Someone using them as of now in a custom component would be querying empty objects ?

    facets: {},
    numericFacets: {},
    dateFacets: {},
    categoryFacets: {},

@alexprudhomme
Copy link
Contributor Author

Isn't this a breaking change? Custom components can rely on store functions / attributes.

Maybe it is but this could be considered as a bug.

For example, all of those should not be available to use in the commerce store... They are only used in search & insight.

    facets: {},
    numericFacets: {},
    dateFacets: {},
    categoryFacets: {},

only real breaking change would be this imo https://github.com/coveo/ui-kit/pull/4806/files#r1904333364

@alexprudhomme
Copy link
Contributor Author

alexprudhomme commented Jan 8, 2025

@fbeaudoincoveo I personally feel comfortable making all the possible breaking changes in this PR. Even if a custom component was using the store, They should have never used those I removed in this PR. Someone using AtomicRecs should have never used store.facets and even if they did, that constant would have been an empty object... This is a bug. Exposed stuff that should have never been there in the first place and that are useless.

I will re add the get & set functions tho. I do agree that those could have been used for a good reason.

@alexprudhomme alexprudhomme added this pull request to the merge queue Jan 15, 2025
Merged via the queue into master with commit de2a920 Jan 15, 2025
118 checks passed
@alexprudhomme alexprudhomme deleted the store-refactor branch January 15, 2025 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants