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: add displayIf directive #4846

Merged
merged 46 commits into from
Jan 14, 2025
Merged

feat: add displayIf directive #4846

merged 46 commits into from
Jan 14, 2025

Conversation

y-lakhdar
Copy link
Contributor

@y-lakhdar y-lakhdar commented Jan 13, 2025

In Stencil we have

public render() {
  if (condition) {
    return <Hidden></Hidden>;
  }
  return <ChildrenElement></ChildrenElement>

Now, the <Hidden> functional component is replaced with a Custom Directive.

public render() {
  return displayIf(
    condition, 
    html`<children-element></children-element>`
  );
}

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

Copy link

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 243 0
commerce 354.1 354.1 0
search 414 414 0
insight 405.3 405.3 0
recommendation 255.2 255.2 0
ssr 407.5 407.5 0
ssr-commerce 371.4 371.4 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

Base automatically changed from chore/cohab-setup to master January 13, 2025 18:47
@y-lakhdar y-lakhdar requested a review from a team as a code owner January 13, 2025 18:47
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.

Seems like you accidentally picked a bunch of unrelated commits in this branch (or maybe you're not pointing to the correct base branch for merging), but otherwise LGTM! :D

packages/atomic/src/components/common/hidden.tsx Outdated Show resolved Hide resolved
packages/atomic/src/components/common/hidden.lit.ts Outdated Show resolved Hide resolved
packages/atomic/src/components/common/hidden.lit.ts Outdated Show resolved Hide resolved
@y-lakhdar y-lakhdar enabled auto-merge January 14, 2025 15:02
@y-lakhdar
Copy link
Contributor Author

Seems like you accidentally picked a bunch of unrelated commits in this branch (or maybe you're not pointing to the correct base branch for merging), but otherwise LGTM! :D

I created my from chore/cohab-setup... then it got merged... that's probably why

@y-lakhdar y-lakhdar added this pull request to the merge queue Jan 14, 2025
Merged via the queue into master with commit d9c9856 Jan 14, 2025
118 checks passed
@y-lakhdar y-lakhdar deleted the KIT-3829 branch January 14, 2025 15:52
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.

3 participants