Skip to content

Commit

Permalink
- Msic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Franck Cornu committed Jan 15, 2024
1 parent 86b104a commit 79d9664
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 294 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export abstract class BaseFilterComponent extends BaseComponent {
</fast-button>
<fast-anchored-region
class=${`${this.isExpanded ? "visible " : "invisible"} z-10`}
class=${`${this.isExpanded ? "visible " : "invisible"} z-10 border-style: solid`}
.anchorElement=${this.renderRoot.querySelector("[id='filter-anchor'")}
@mousedown=${(e: Event) => {
e.preventDefault();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ describe("pnp-checkbox-filter ", () => {
item.click();
});

el.requestUpdate();
el.requestUpdate();
await elementUpdated(el);

assert.isNotNull(getResetButton(el));
Expand All @@ -222,7 +222,7 @@ describe("pnp-checkbox-filter ", () => {
onApplyFiltersSpy.resetHistory();

// Needed to be able to click on the "apply" button (disabled otherwise)
el.requestUpdate();
el.requestUpdate();
await elementUpdated(el);

// Apply filters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ describe("pnp-search-sort", () => {
`);

getSortFieldOption(el, "Relevance")?.click();
el.requestUpdate();
el.requestUpdate();
await elementUpdated(el);

assert.isEmpty(onSort.getCall(0).args[0]); // Should be an empty array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ describe("pnp-search-filters", () => {
assert.isNotNull(getDebugBarBtn(el));
getDebugBarBtn(el)?.click();

await el.requestUpdate();
el.requestUpdate();
await elementUpdated(el);

assert.isNotNull(getMonacoEditor(el));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,7 @@ export class SearchResultsComponent extends BaseComponent {
this.tokenService.setTokenValue(BuiltinTokenNames.searchTerms, searchKeywords);

this.searchQuery.requests[0].query.queryString = searchKeywords;
this.searchQuery.requests[0].query.queryTemplate = this.tokenService.resolveTokens(this.queryTemplate);

this.resetFilters();
this.resetPagination();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe("pnp-search-verticals", async () => {
window.history.pushState({path:newUrl}, "", newUrl);

LocalizationHelper.strings = stringsEn;
el.requestUpdate();
el.requestUpdate();
await elementUpdated(el);
});

Expand Down Expand Up @@ -110,7 +110,7 @@ describe("pnp-search-verticals", async () => {
assert.equal(el?.querySelector<HTMLDivElement>("div[data-ref='vertical-selected']")?.innerText, "tab1");

el?.querySelector<HTMLDivElement>("div[data-ref='vertical-tab-tab2']")?.click();
await el.requestUpdate();
el.requestUpdate();
await elementUpdated(el);

assert.equal(el?.querySelector<HTMLDivElement>("div[data-ref='vertical-selected']")?.innerText, "tab2");
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/helpers/SearchResultsHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export enum WellKnownSearchProperties {
export const sanitizeSummary = (summary: string) => {
// Special case with HitHighlightedSummary field
// eslint-disable-next-line no-useless-escape
return summary.replace(/<c0\>/g, `<span style='color:var(${ThemeInternalCSSVariables.colorPrimary});font-weight:600'>`).replace(/<\/c0\>/g, "</span>").replace(/<ddd\/>/g, "&#8230;");
return summary?.replace(/<c0\>/g, `<span style='color:var(${ThemeInternalCSSVariables.colorPrimary});font-weight:600'>`).replace(/<\/c0\>/g, "</span>").replace(/<ddd\/>/g, "&#8230;");
};

export class SearchResultsHelper {
Expand Down
3 changes: 3 additions & 0 deletions packages/components/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ module.exports = {
darkMode: "class",
theme: {
extend: {
gridTemplateColumns: {
"searchResult": "32px 2fr 0fr"
},
fontFamily: {
primary: ["var(--pnpsearch-internal-fontFamilyPrimary)","'Segoe UI'", "'Arial, sans-serif'"],
sans: ["var(--pnpsearch-internal-fontFamilySecondary)", "Roboto", ...defaultTheme.fontFamily.sans]
Expand Down
Loading

0 comments on commit 79d9664

Please sign in to comment.