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

chore(atomic): add index & lazy-index file in every use case #4927

Merged
merged 4 commits into from
Feb 5, 2025

Conversation

alexprudhomme
Copy link
Contributor

@alexprudhomme alexprudhomme commented Feb 3, 2025

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

This PR adds the index.ts & lazy-index.ts file in every sub package of atomic.

It was also required to change how some headless import worked in insight & recommendations to clean up the index files.

@coveo/service-integration @coveo/service-core We need an index.ts & a lazy-index.ts file for every sub package of atomic (commerce, insight, ipx, ...) for the Lit migration and for going forward with Lit. This will enable us to better organize the code and also make it possible for implementers to only import a sub package specifically by doing import '@coveo/atomic/insight' for example.

For insight and recommendations, there were special exports in the index.ts file. I took the time to remove them and rework the imports in the files affected. No functionality is lost, only small refactor.

Copy link

github-actions bot commented Feb 3, 2025

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 244 244 0
commerce 355.3 355.3 0
search 415.2 415.2 0
insight 406.4 406.4 0
recommendation 256.2 256.2 0
ssr 409 409 0
ssr-commerce 373 373 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

Copy link
Collaborator

@louis-bompart louis-bompart left a comment

Choose a reason for hiding this comment

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

LGTM, but could you explain to Contributors & component owners what we are doing here?

packages/atomic/src/components/insight/index.ts Outdated Show resolved Hide resolved
packages/atomic/src/components/lazy-index.ts Outdated Show resolved Hide resolved
@alexprudhomme alexprudhomme added this pull request to the merge queue Feb 5, 2025
Merged via the queue into master with commit cf5ce1d Feb 5, 2025
118 checks passed
@alexprudhomme alexprudhomme deleted the KIT-3923 branch February 5, 2025 15:48
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