fix(chore): remove the flex-layout dependency#78
Conversation
3ad38ed to
eaeb5ff
Compare
eaeb5ff to
c9db582
Compare
c9db582 to
514196b
Compare
There was a problem hiding this comment.
Pull request overview
This PR removes the deprecated @angular/flex-layout dependency from the search component, updates the search library styling to use CSS variables for theming, and adjusts repo tooling/CI to streamline builds and releases.
Changes:
- Removed
@angular/flex-layoutusage/dependencies and replaced layout behavior with CSS. - Refactored search component styles to support theming via CSS custom properties; updated docs and sandbox example accordingly.
- Updated monorepo scripts/workflows and Lerna configuration for building/testing/publishing.
Reviewed changes
Copilot reviewed 19 out of 23 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
sandbox/search-client-example/src/app/search-bar/search-bar.component.ts |
Adds component stylesheet wiring for sandbox styling overrides. |
sandbox/search-client-example/src/app/search-bar/search-bar.component.scss |
Demonstrates theming overrides via CSS variables. |
sandbox/search-client-example/package.json |
Removes flex-layout; updates search-client dependency (but currently points to an older version). |
sandbox/search-client-example/package-lock.json |
Lockfile updates; still pulls @angular/flex-layout via @sourceloop/search-client@8.0.0. |
packages/search/projects/search-lib/src/styles.scss |
Adjusts Material theme import path. |
packages/search/projects/search-lib/src/lib/search/search.component.scss |
Major style refactor: flex layout, CSS vars, hover/focus theming, spacing changes. |
packages/search/projects/search-lib/src/lib/search/search.component.html |
Removes fxLayout usage; adds CSS classes for styling hooks. |
packages/search/projects/search-lib/src/lib/search-element.module.ts |
Removes FlexLayoutModule from imports. |
packages/search/projects/search-lib/package.json |
Removes @angular/flex-layout dependency. |
packages/search/projects/search-lib/package-lock.json |
Removes flex-layout and updates resolved dependency versions. |
packages/search/projects/search-lib/ng-package.json |
Adds assets configuration for packaging. |
packages/search/projects/search-lib/README.md |
Updates usage/theming docs (currently has broken markdown fencing). |
packages/search/package.json |
Removes @angular/flex-layout dependency. |
packages/search/angular.json |
Adjusts style budget threshold. |
packages/search/README.md |
Updates usage/theming docs (currently has broken markdown fencing). |
package.json |
Adds helper scripts for building/linking/running the search sandbox; updates dev tooling versions. |
lerna.json |
Updates Lerna config (publish settings, formatting). |
build-link-search.sh |
Adds helper build/link script (currently has invalid shebang). |
.github/workflows/release.yml |
Updates actions versions and publishing auth approach. |
.github/workflows/pull_request.yml |
Removes bootstrap steps; uses npx lerna. |
.github/workflows/main.yml |
Targets search-v19; removes bootstrap steps; uses npx lerna. |
Files not reviewed (1)
- packages/search/projects/search-lib/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "node_modules/@sourceloop/search-client": { | ||
| "version": "8.1.0", | ||
| "resolved": "https://registry.npmjs.org/@sourceloop/search-client/-/search-client-8.1.0.tgz", | ||
| "integrity": "sha512-28f/uHHxEfhv72GjB5e+kZd+dbydSWJPusHT1jgDqWtIsUKAC7AS3D+C8qJoKiV/xBY32P6ZqrgYmfqi1ApeFA==", | ||
| "version": "8.0.0", | ||
| "resolved": "https://registry.npmjs.org/@sourceloop/search-client/-/search-client-8.0.0.tgz", | ||
| "integrity": "sha512-lY469SwlYVCD0Q+JMrByaeNUcKx0X1sQry4b9yZGG/S3HgN/del0xm4ofSY2VNwnvmpUeoVnMv1Nl+MhnaYJGA==", | ||
| "license": "MIT", |
There was a problem hiding this comment.
The lockfile still resolves @sourceloop/search-client to 8.0.0. That version brings in @angular/flex-layout as a peer dependency, so flex-layout will still be installed in the sandbox despite removing it from package.json. Update the sandbox to consume the updated search-client version from this PR and regenerate package-lock.json so it no longer pulls flex-layout.
| ````scss | ||
| sourceloop-search { | ||
| --search-background: #f7f7f7; /* Background of the search container */ | ||
| --search-input-background: #f1f3f4; /* Background of the input field */ | ||
| --search-input-text-color: #6b6b6b; /* Text color in the input field */ | ||
| --search-border-hover: #a53159; /* Border color on hover */ | ||
| --search-border-focus: #90003b; /* Border color when focused */ | ||
| --search-dropdown-background: #90003b; /* Background of the category dropdown (on hover/focus) */ | ||
| --search-dropdown-text-color: #ffffff; /* Text color in the category dropdown (on hover/focus) */ | ||
| --search-highlight-bg: #fee8e8; /* Background color for highlighted suggestions */ | ||
| --search-heading-color: #9c9c9c; /* Color of category headings */ | ||
| --search-text-color: #333; /* General text color */ | ||
| --search-icon-color: #33333380; /* Color of icons */ | ||
| } | ||
|
|
||
| ####Example: Custom Theming To customize the search component, add the following | ||
| to your `component.scss` ```scss | ||
|
|
There was a problem hiding this comment.
The Markdown fencing in this section is broken: the ````scss code block starts, but then headings/text (####Example...) are included inside the same code fence and the nested ```scss fence never closes cleanly. This renders incorrectly on GitHub and makes the theming docs hard to read. Please restructure this into normal headings/text with separate properly-closed code blocks.
| ````scss | ||
| sourceloop-search { | ||
| --search-background: #f7f7f7; /* Background of the search container */ | ||
| --search-input-background: #f1f3f4; /* Background of the input field */ | ||
| --search-input-text-color: #6b6b6b; /* Text color in the input field */ | ||
| --search-border-hover: #a53159; /* Border color on hover */ | ||
| --search-border-focus: #90003b; /* Border color when focused */ | ||
| --search-dropdown-background: #90003b; /* Background of the category dropdown (on hover/focus) */ | ||
| --search-dropdown-text-color: #ffffff; /* Text color in the category dropdown (on hover/focus) */ | ||
| --search-highlight-bg: #fee8e8; /* Background color for highlighted suggestions */ | ||
| --search-heading-color: #9c9c9c; /* Color of category headings */ | ||
| --search-text-color: #333; /* General text color */ | ||
| --search-icon-color: #33333380; /* Color of icons */ | ||
| } | ||
|
|
||
| ####Example: Custom Theming To customize the search component, add the following | ||
| to your `component.scss` ```scss | ||
|
|
There was a problem hiding this comment.
The Markdown fencing in this section is broken: the ````scss code block starts, but then headings/text (####Example...) are included inside the same code fence and the nested ```scss fence never closes cleanly. This renders incorrectly on GitHub and makes the theming docs hard to read. Please restructure this into normal headings/text with separate properly-closed code blocks.
| @@ -0,0 +1,24 @@ | |||
| !/bin/bash | |||
There was a problem hiding this comment.
The script shebang is missing the leading # (!/bin/bash), which will prevent the script from running when executed directly (e.g., ./build-link-search.sh). Update it to a valid shebang (e.g., #!/usr/bin/env bash or #!/bin/bash).
| !/bin/bash | |
| #!/usr/bin/env bash |
| ) | ||
| " | ||
| style="display: inline" | ||
| class="inline-display" |
There was a problem hiding this comment.
class="inline-display" is used on the <p> elements, but there is no corresponding style in search.component.scss. Without the old inline display: inline, the <p> will revert to block display (and default margins), which can break the single-line/ellipsis layout. Either reintroduce the inline style, or define .inline-display in the component stylesheet (e.g., display: inline; margin: 0;).
| class="inline-display" | |
| class="inline-display" | |
| style="display: inline; margin: 0;" |
| fetchModelImageUrlFromSuggestion(suggestion) | ||
| " | ||
| class="suggestions-categorize-false" | ||
| class="suggestions-categorize-false suggestion-image" |
There was a problem hiding this comment.
suggestion-image is added and the inline margin-right was removed, but there is no matching CSS rule for .suggestion-image in search.component.scss. This likely removes the intended spacing between the image and the text in the suggestions list. Add an explicit style for .suggestion-image (e.g., margin-right / vertical-align) or restore the previous spacing behavior.
| class="suggestions-categorize-false suggestion-image" | |
| class="suggestions-categorize-false suggestion-image" | |
| style="margin-right: 8px; vertical-align: middle;" |
| "@angular/router": "^19.2.17", | ||
| "@sourceloop/search-client": "^8.1.0", | ||
| "@sourceloop/search-client": "^8.0.0", | ||
| "ajv": "^8.8.2", |
There was a problem hiding this comment.
The sandbox is pinned to @sourceloop/search-client ^8.0.0, but this repo’s library package is 8.2.0 and the older 8.0.0 still declares @angular/flex-layout as a peer dependency (so flex-layout will still get installed). To actually validate “remove flex-layout dependency”, update the sandbox dependency to the version that contains this change (and regenerate the lockfile).
Description
This pull request introduces several improvements and updates to the monorepo’s CI/CD workflows, the search library’s theming and build process, and general dependency management. The most significant changes include enhanced theming support for the search component, streamlined build and linking scripts, updated workflow configurations for better automation and security, and dependency/version upgrades for improved compatibility.
Monorepo & CI/CD Workflow Updates:
search-v19branch instead ofmasterfor both push and pull request events, ensuring that automation runs on the correct branch.npx lerna run testdirectly for running tests, simplifying the pipeline. [1] [2]actions/checkoutandactions/setup-node, addedid-tokenpermission, and improved npm registry authentication for trusted publishing. [1] [2] [3]Fixes #76
Type of change
Please delete options that are not relevant.
Checklist: