aglinxinyuan opened a new pull request, #8661:
URL: https://github.com/apache/texera/pull/8661

   ### What changes were proposed in this PR?
   
   Removes the three `SearchResultsComponent` inputs that it never reads 
(`searchKeywords`, `showResourceTypes`, `pid`), the parent code that still 
computes and binds them, and the CSS in `search-results.component.scss` and 
`section-style.scss` that matches no element it can reach. Pure deletion, no 
behaviour change: **−172 / +10 lines**.
   
   ### History
   
   | | |
   | --- | --- |
   | **Reads removed by** | #2793 (2024-08-20) — "Generalize List Item" 
replaced the per-type list items, and the `nz-layout` / `nz-sider` 
resource-type icon around each one, with the generic `ListItemComponent`, 
deleting every template read of the three inputs |
   | **Never matched** | #2776 (2024-08-19) — `.section-title 
.management-panel` and `.section-title .go-back-button` arrived with the 
extraction of `section-style.scss` and never matched a template that includes 
it |
   
   > Reviewer note — the keyword chain. `searchKeywords` fed each old list 
item's `[keywords]` input, which drove the search-term highlight. 
`SearchComponent` and `HubSearchResultComponent` kept recomputing it from the 
filter bar on every search and binding it into the results list, where nothing 
read it. The field and its assignments go in both parents. The two 
`SearchComponent` tests that only pinned the field go too. The tests that 
asserted on it alongside something still live now assert on that: the `?q=` 
tests check the filter bar's master list, the hub early-return test checks 
`getSearchFilterParameters`, and the hub binding test checks `currentUid` 
alone. `FiltersComponent.getSearchKeywords()` stays, because the search 
requests still call it.
   
   > Reviewer note — `detectChanges()` stays. `SearchComponent.ngAfterViewInit` 
assigned the keywords and then called `this.cdr.detectChanges()`. Only the 
assignment goes. The call also re-renders after a `?q=` param is pushed into 
the filter bar, so it is not part of the dead chain.
   
   > Reviewer note — the CSS. Component styles use Emulated encapsulation, so a 
rule in `search-results.component.scss` can only match that component's own 
template: a card, a virtual-scroll list of `texera-list-item`s, and two 
text-only "Load more" buttons. `nz-sider`, `nz-content` and 
`.resource-type-icon` styled the wrapper #2793 removed. `.dataset-search-bar`, 
the `.dataset-list-item { … }` block, `.subsection-grid-container` and 
`.ant-btn-icon-only` match nothing there. The last two also duplicate the 
identical rules in `section-style.scss`, which the stylesheet already `@use`s. 
In `section-style.scss`, none of the nine stylesheets that include it belongs 
to a template containing `management-panel` or `go-back-button`. The search 
page's back button is in `SearchComponent`, whose stylesheet does not include 
`section-style.scss`, and the hub detail page styles its own. The commented-out 
`.utility-button-group` rule goes too. The header comment that called the 
layout "shared be
 tween workflows and files section" now says it is shared by the user 
dashboard's resource sections.
   
   ### Any related issues, documentation, discussions?
   
   Closes #8660
   
   ### How was this PR tested?
   
   Existing tests, updated where they asserted on the removed field or inputs.
   
   From `frontend/`:
   
   - `npx ng build` — **success**. This is the gate that matters: a leftover 
`[searchKeywords]` or `[showResourceTypes]` binding on `texera-search-results` 
fails only under AOT, since template diagnostics are AOT-only.
   - `npx ng test --watch=false --include='**/search.component.spec.ts' 
--include='**/hub-search-result.component.spec.ts' 
--include='**/search-results.component.spec.ts'` — 81 tests pass (3 files).
   - `yarn format:ci` — clean.
   
   Verification, re-runnable by a reviewer (both return nothing):
   
   ```
   git grep -n "searchKeywords\|showResourceTypes" -- frontend/src
   git grep -n 
"resource-type-icon\|dataset-search-bar\|dataset-list-item\|management-panel" 
-- frontend/src
   ```
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 5.5)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to