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(atomic): add heading function for lit components #4861

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

y-lakhdar
Copy link
Contributor

  • Added heading function to replace the <Heading> functional component.
  • Renamed hidden.tsx function component to stencil-hidden.tsx (to be consistent)

Usage

with Stencil

<Heading level={level} class="truncate">
  {label}
</Heading>

with Lit

html`${heading(
  {level, class: "truncate"},
  label
)}`

Notes

Using unsafeStatic since we need to interpolate non-literal statics.

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

Copy link

github-actions bot commented Jan 15, 2025

Pull Request Report

PR Title

❌ Title should follow the conventional commit spec:
<type>(optional scope): <description>

Example: feat(headless): add result-list controller

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 243.9 243.9 0
commerce 355.1 355.1 0
search 415 415 0
insight 406.3 406.3 0
recommendation 256.2 256.2 0
ssr 408.9 408.9 0
ssr-commerce 372.9 372.9 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

@fbeaudoincoveo
Copy link
Contributor

  • Added heading function to replace the <Heading> functional component.
  • Renamed hidden.tsx function component to stencil-hidden.tsx (to be consistent)

ATM this PR actually renames both heading.tsx to stencil-heading.tsx and hidden.tsx to stencil-hidden.tsx.

The hidden renamal seems out of scope, but I guess it will have to be done anyways, so it's not a big deal.

@y-lakhdar
Copy link
Contributor Author

ATM this PR actually renames both heading.tsx to stencil-heading.tsx and hidden.tsx to stencil-hidden.tsx.
The hidden renamal seems out of scope, but I guess it will have to be done anyways, so it's not a big deal.

Yeah, sorry. It was something I forgot to do in previous PRs

@@ -0,0 +1,33 @@
// import {spread} from '@open-wc/lit-helpers';
Copy link
Collaborator

Choose a reason for hiding this comment

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

?

part?: string;
}

// TODO: KIT-3822: add unit tests to this function
Copy link
Collaborator

Choose a reason for hiding this comment

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

  • unit tests

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