-
Notifications
You must be signed in to change notification settings - Fork 39
chore (atomic): migrated atomic-result-template to lit #6159
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
Merged
Merged
Changes from 31 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
7ef605d
changed file name
jmazzah-coveo 397b0c5
migrated result template to Reactive controller
jmazzah-coveo 6faf0f1
unit tests for result templace common and controller
jmazzah-coveo 7547a67
naming
jmazzah-coveo c119e3b
Merge branch 'main' into KIT-4962
jmazzah-coveo d3113c3
moved table element utils to common package
jmazzah-coveo 0bd8252
parent template controller for result and product templates
jmazzah-coveo 56e23a1
product template inheriting from base template
jmazzah-coveo f0ccc24
result template inheriting from base template
jmazzah-coveo 5006a54
removed utils from result and product template since they now use comβ¦
jmazzah-coveo 230ec88
template utils
jmazzah-coveo 109fe7e
Merge branch 'main' into KIT-4962
jmazzah-coveo 4a0ebd0
import errors
jmazzah-coveo 0a89224
unnecessary snapshot file
jmazzah-coveo e649e42
import fix
jmazzah-coveo fb6feb1
atomic-product-template test fix to have right parameters for the newβ¦
jmazzah-coveo 795ee59
import fix
jmazzah-coveo 09f4ba8
useless mock
jmazzah-coveo 90fb011
migrated atomic-result-template to lit
jmazzah-coveo e3b0593
atomic-result-template unit tests
jmazzah-coveo d288ce6
Documentation
jmazzah-coveo f3c2d89
moved to search package
jmazzah-coveo 8eec648
atomic result template documentation
jmazzah-coveo 8294b84
tests fix
jmazzah-coveo bada99a
removed tsx file
jmazzah-coveo e28a96a
Merge branch 'main' into KIT-4963
jmazzah-coveo 6fcffa7
Add generated files
developer-experience-bot[bot] 196b4e0
e2e tests
jmazzah-coveo ba9c2f9
Merge branch 'KIT-4963' of https://github.com/coveo/ui-kit into KIT-4963
jmazzah-coveo 350ce30
Merge branch 'main' into KIT-4963
jmazzah-coveo 5eaa9c1
compilation error fix
jmazzah-coveo 8839a48
test pr fix
jmazzah-coveo e2bf5b9
doc pr fix
jmazzah-coveo 9259f9e
Doc fix
jmazzah-coveo 29519a3
pr test fix
jmazzah-coveo aa78089
doc harmonizing
jmazzah-coveo c5d0b46
conditions documentation
jmazzah-coveo a304b57
Merge branch 'main' into KIT-4963
jmazzah-coveo 8732abc
Merge branch 'main' into KIT-4963
jmazzah-coveo fa0625d
search interface wrapper fix
jmazzah-coveo b7873e6
Add generated files
developer-experience-bot[bot] 739134f
Merge branch 'main' into KIT-4963
jmazzah-coveo 5df9a4b
doc update
jmazzah-coveo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 28 additions & 25 deletions
53
packages/atomic-angular/projects/atomic-angular/src/lib/stencil-generated/components.ts
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
117 changes: 117 additions & 0 deletions
117
.../atomic/src/components/search/atomic-result-template/atomic-result-template.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| import { Meta } from '@storybook/addon-docs/blocks'; | ||
| import * as AtomicResultTemplateStories from './atomic-result-template.new.stories'; | ||
| import { AtomicDocTemplate } from '../../../../storybook-utils/documentation/atomic-doc-template'; | ||
|
|
||
|
|
||
| <Meta of={AtomicResultTemplateStories} /> | ||
|
|
||
| <AtomicDocTemplate | ||
| stories={AtomicResultTemplateStories} | ||
| defaultStory="Default" | ||
| githubPath="search/atomic-result-template/atomic-result-template.ts" | ||
| tagName="atomic-result-template" | ||
| className="AtomicResultTemplate" | ||
| > | ||
|
|
||
| This component defines the UI display of your search results. | ||
| It can be used inside `atomic-result-list`, `atomic-folded-result-list`, or `atomic-search-box-instant-results`, and it must have a `<template>` as its child. | ||
|
|
||
| Example using the `atomic-result-list`: | ||
| ```html | ||
| <atomic-result-list> | ||
| <atomic-result-template> | ||
| <template> | ||
| <atomic-result-section-visual> | ||
| <atomic-result-image field="ytthumbnailurl" fallback="https://picsum.photos/350"></atomic-result-image> | ||
| </atomic-result-section-visual> | ||
|
|
||
| <atomic-result-section-badges> | ||
| <atomic-field-condition must-match-sourcetype="YouTube"> | ||
| <atomic-result-badge | ||
| label="YouTube" | ||
| class="youtube-badge" | ||
| ></atomic-result-badge> | ||
| </atomic-field-condition> | ||
|
|
||
| <atomic-result-badge | ||
| icon="https://raw.githubusercontent.com/Rush/Font-Awesome-SVG-PNG/master/black/svg/language.svg" | ||
| > | ||
| <atomic-result-multi-value-text | ||
| field="language" | ||
| ></atomic-result-multi-value-text> | ||
| </atomic-result-badge> | ||
| </atomic-result-section-badges> | ||
|
|
||
| <atomic-result-section-title> | ||
| <atomic-result-link></atomic-result-link> | ||
| </atomic-result-section-title> | ||
|
|
||
| <atomic-result-section-excerpt> | ||
| <atomic-result-text field="excerpt"></atomic-result-text> | ||
| </atomic-result-section-excerpt> | ||
|
|
||
| <atomic-result-section-bottom-metadata> | ||
| <atomic-result-fields-list> | ||
| <atomic-field-condition class="field" if-defined="source"> | ||
| <span class="field-label"> | ||
| <atomic-text value="source"></atomic-text>: | ||
| </span> | ||
| <atomic-result-text field="source"></atomic-result-text> | ||
| </atomic-field-condition> | ||
|
|
||
| <atomic-field-condition class="field" if-defined="author"> | ||
| <span class="field-label"> | ||
| <atomic-text value="author"></atomic-text>: | ||
| </span> | ||
| <atomic-result-text field="author"></atomic-result-text> | ||
| </atomic-field-condition> | ||
|
|
||
| <atomic-field-condition class="field" if-defined="date"> | ||
| <span class="field-label"> | ||
| <atomic-text value="date"></atomic-text>: | ||
| </span> | ||
| <atomic-result-date></atomic-result-date> | ||
| </atomic-field-condition> | ||
| </atomic-result-fields-list> | ||
| </atomic-result-section-bottom-metadata> | ||
| </template> | ||
| </atomic-result-template> | ||
| </atomic-result-list> | ||
| ``` | ||
|
|
||
| ## Template Conditions | ||
|
|
||
| You can use conditions to display different templates based on result properties: | ||
jmazzah-coveo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ```html | ||
| <atomic-result-list> | ||
| <!-- Template for YouTube videos --> | ||
| <atomic-result-template must-match-sourcetype="YouTube"> | ||
| <template> | ||
| <atomic-result-section-visual> | ||
| <atomic-result-image field="ytthumbnailurl"></atomic-result-image> | ||
| </atomic-result-section-visual> | ||
| <atomic-result-section-title> | ||
| <atomic-result-link></atomic-result-link> | ||
| </atomic-result-section-title> | ||
| <atomic-result-section-excerpt> | ||
| <atomic-result-text field="excerpt"></atomic-result-text> | ||
| </atomic-result-section-excerpt> | ||
| </template> | ||
| </atomic-result-template> | ||
|
|
||
| <!-- Default template for all other results --> | ||
| <atomic-result-template> | ||
| <template> | ||
| <atomic-result-section-title> | ||
| <atomic-result-link></atomic-result-link> | ||
| </atomic-result-section-title> | ||
| <atomic-result-section-excerpt> | ||
| <atomic-result-text field="excerpt"></atomic-result-text> | ||
| </atomic-result-section-excerpt> | ||
| </template> | ||
| </atomic-result-template> | ||
| </atomic-result-list> | ||
| ``` | ||
|
|
||
| </AtomicDocTemplate> | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.