Skip to content

Moved General Search from the Sidebar to the Top Bar - #2776

Merged
GspikeHalo merged 28 commits into
masterfrom
refactor-general-search
Aug 20, 2024
Merged

GspikeHalo merged 28 commits into
masterfrom
refactor-general-search

Conversation

@GspikeHalo

@GspikeHalo GspikeHalo commented Aug 14, 2024 •

Copy link
Copy Markdown
Contributor

Purpose:
The goal of this change is to make the General Search feature more accessible to users by relocating it to a prominent position at the top of the page.

Changes:

  1. General Search Position Adjustment: Moved the General Search feature from the sidebar to the Top Bar, allowing users to search at any time from any page.
  2. User Interface Update: Removed the original General Search option from the sidebar. The new search box allows users to enter search keywords directly and perform searches by pressing the Enter key.
  3. Style Adjustments: Made minor adjustments to the styles of the General Search to better fit the new Top Bar layout.
  4. Refactored stylesheet dependency: extract the section style from the old search component stylesheet into a separate file.

Dashboard:
Previous dashboard component:
image
New dashboard component:
image

Search Result:
image

@GspikeHalo GspikeHalo changed the title Moved General Search from the Sidebar to the Top Bar to Improve User Experience and Added Autocomplete Functionality Moved General Search from the Sidebar to the Top Bar Aug 14, 2024
@GspikeHalo GspikeHalo added starter-task frontend Changes related to the frontend GUI gui and removed frontend Changes related to the frontend GUI labels Aug 14, 2024
@GspikeHalo GspikeHalo added the frontend Changes related to the frontend GUI label Aug 14, 2024
@YS0meone
YS0meone requested a review from aglinxinyuan August 15, 2024 06:10
@chenlica

Copy link
Copy Markdown
Contributor

I see two search boxes in the new interface. Is that correct.

For changes 3 - 5, can we raise a separate PR for 3, and another PR for 4 and 5?

@YS0meone

Copy link
Copy Markdown
Contributor

I see two search boxes in the new interface. Is that correct.

For changes 3 - 5, can we raise a separate PR for 3, and another PR for 4 and 5?

For two search boxes, I think the behavior is correct. Since we haven't implemented the filter for different resources, user won't be able to perform search on a particular resource type. While the old search bar does the work, so we kept it.
For prs: yeah, we will raise one pr for 3 and another for 4&5

@chenlica

Copy link
Copy Markdown
Contributor

Agreed. Let's study later how to remove the second search box.

@YS0meone

Copy link
Copy Markdown
Contributor

After discussion we decide to keep the changes 1 2 4 5 in the current PR and raise another pr just for the change 3.

@aglinxinyuan aglinxinyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Base automatically changed from add-left-panel-in-workspace to master August 20, 2024 05:42
@GspikeHalo
GspikeHalo merged commit ad335cf into master Aug 20, 2024
@GspikeHalo
GspikeHalo deleted the refactor-general-search branch August 20, 2024 06:27
PurelyBlank pushed a commit that referenced this pull request Dec 4, 2024
**Purpose:**
The goal of this change is to make the General Search feature more
accessible to users by relocating it to a prominent position at the top
of the page.

**Changes:**
1. General Search Position Adjustment: Moved the General Search feature
from the sidebar to the Top Bar, allowing users to search at any time
from any page.
2. User Interface Update: Removed the original General Search option
from the sidebar. The new search box allows users to enter search
keywords directly and perform searches by pressing the Enter key.
3. Style Adjustments: Made minor adjustments to the styles of the
General Search to better fit the new Top Bar layout.
4. Refactored stylesheet dependency: extract the section style from the
old search component stylesheet into a separate file.

**Dashboard:**
Previous dashboard component:

![image](https://github.com/user-attachments/assets/168e288b-b07e-4177-a2db-4a9128721556)
New dashboard component:

![image](https://github.com/user-attachments/assets/efd1ba68-e818-4a82-ba7d-7cb3b1018b75)

**Search Result:**

![image](https://github.com/user-attachments/assets/7f4c9065-501a-45dc-beaf-6acf2e043720)

---------

Co-authored-by: sixsage <[email protected]>
Co-authored-by: YS0meone <[email protected]>
Co-authored-by: Xinyuan Lin <[email protected]>
@Yicong-Huang Yicong-Huang removed the gui label Jul 6, 2025
SarahAsad23 pushed a commit to madisonmlin/texera that referenced this pull request May 20, 2026
**Purpose:**
The goal of this change is to make the General Search feature more
accessible to users by relocating it to a prominent position at the top
of the page.

**Changes:**
1. General Search Position Adjustment: Moved the General Search feature
from the sidebar to the Top Bar, allowing users to search at any time
from any page.
2. User Interface Update: Removed the original General Search option
from the sidebar. The new search box allows users to enter search
keywords directly and perform searches by pressing the Enter key.
3. Style Adjustments: Made minor adjustments to the styles of the
General Search to better fit the new Top Bar layout.
4. Refactored stylesheet dependency: extract the section style from the
old search component stylesheet into a separate file.

**Dashboard:**
Previous dashboard component:

![image](https://github.com/user-attachments/assets/168e288b-b07e-4177-a2db-4a9128721556)
New dashboard component:

![image](https://github.com/user-attachments/assets/efd1ba68-e818-4a82-ba7d-7cb3b1018b75)

**Search Result:**

![image](https://github.com/user-attachments/assets/7f4c9065-501a-45dc-beaf-6acf2e043720)

---------

Co-authored-by: sixsage <[email protected]>
Co-authored-by: YS0meone <[email protected]>
Co-authored-by: Xinyuan Lin <[email protected]>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
**Purpose:**
The goal of this change is to make the General Search feature more
accessible to users by relocating it to a prominent position at the top
of the page.

**Changes:**
1. General Search Position Adjustment: Moved the General Search feature
from the sidebar to the Top Bar, allowing users to search at any time
from any page.
2. User Interface Update: Removed the original General Search option
from the sidebar. The new search box allows users to enter search
keywords directly and perform searches by pressing the Enter key.
3. Style Adjustments: Made minor adjustments to the styles of the
General Search to better fit the new Top Bar layout.
4. Refactored stylesheet dependency: extract the section style from the
old search component stylesheet into a separate file.

**Dashboard:**
Previous dashboard component:

![image](https://github.com/user-attachments/assets/168e288b-b07e-4177-a2db-4a9128721556)
New dashboard component:

![image](https://github.com/user-attachments/assets/efd1ba68-e818-4a82-ba7d-7cb3b1018b75)

**Search Result:**

![image](https://github.com/user-attachments/assets/7f4c9065-501a-45dc-beaf-6acf2e043720)

---------

Co-authored-by: sixsage <[email protected]>
Co-authored-by: YS0meone <[email protected]>
Co-authored-by: Xinyuan Lin <[email protected]>
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Sep 27, 2026
…#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** | apache#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** | apache#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 apache#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 between workflows and
files section" now says it is shared by the user dashboard's resource
sections.

### Any related issues, documentation, discussions?

Closes apache#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)
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Oct 27, 2026
### What changes were proposed in this PR?
Removes the `texera-filters-instructions { margin-right: 10px; }` rule
in `dashboard.component.scss`. **+0/-4 lines.** There is no behaviour
change. The dashboard template never renders
`<texera-filters-instructions>` (only the workflow, dataset and model
list templates do), and the dashboard's emulated encapsulation keeps the
rule from reaching them.

| | Commit / PR |
| --- | --- |
| Introduced by | apache#2776 (2024-08-19) Moved General Search from the
Sidebar to the Top Bar |
| Usage removed by | never used |

It has never matched an element (about 2 years).

### Any related issues, documentation, discussions?
Closes apache#9170.

### How was this PR tested?
`npx prettier --check` on the file passes from `frontend/`;
stylesheet-only deletion.
To re-check: `git grep -nw "texera-filters-instructions" --
frontend/src` returns no hits.

### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Antigravity (Claude Opus 5.5)
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 25, 2026
…9644)

### What changes were proposed in this PR?

Remove unused and inert SCSS rules, an empty component stylesheet,
unread callback and lifecycle parameters, and a duplicate module import
across the Angular frontend (**+13/-134 lines**). There is no observable
UI or runtime behavior change.

- **Detail-page SCSS selectors:** Remove unmatched `.file-title`,
`.file-size`, `.versions-tab-content`, `nz-layout`, `html, body`,
`.grayed-out`, `.disabled-click`, and `.ant-collapse-content-box` rules
from `DatasetDetailComponent` SCSS, and unmatched
`.versions-tab-content` and `nz-layout` rules from
`ModelDetailComponent` SCSS. Both components use Angular's default
`ViewEncapsulation.Emulated`, `apache#8942` moved the version browser markup
and styles to `VersionsFilesBrowserComponent`, and zero matching
elements remain in either component template.
- **Unused and inert cross-component SCSS rules:** Remove unmatched
`#googleButton`, `.hidden` (dashboard and hub templates use HTML
`hidden` / `[hidden]` / `aria-hidden` attributes rather than a CSS
class), unused Sass variable `$dashboard-navigation-height`,
`.uploaded-files-list`, empty `.file-uploader-banner {}`,
`.dataset-menu-bar`, `.condition-input-popup.fade-out`, and
`.ai-fix-field` (zero template or TypeScript references in
`frontend/src`), along with the `opacity: 1` and `transition: opacity 1s
ease-in-out` declarations on `.condition-input-popup` that only existed
to animate `.fade-out`. Remove emulated `.ant-table-thead > tr > th` and
`.ant-table` rules in `WorkflowExecutionHistoryComponent` SCSS (default
`ViewEncapsulation.Emulated` scopes them to host attributes that cannot
match `nz-table` internal DOM without `::ng-deep`), remove obsolete
`.ant-collapse-content-box` overrides in global `styles.scss`
(`ng-zorro-antd` 21 emits `.ant-collapse-body` with zero
`.ant-collapse-content-box` occurrences), and delete the empty
license-only `hub.component.scss` along with its `styleUrls` entry in
`HubComponent`.
- **Unread subscriber callback parameters:** Drop six unread `(res:
Response)` and `(err: unknown)` parameters in `DatasetDetailComponent`
(`onPublicStatusChange`, `onDownloadableStatusChange`, and
`onPreviouslyUploadedFileDeleted`) that were never read in their
callback bodies.
- **Unread lifecycle parameter and import:** Drop the unread `changes:
SimpleChanges` parameter and orphaned `SimpleChanges` import in
`BrowseSectionComponent.ngOnChanges`, along with two placeholder `{} as
any` arguments in `browse-section.component.spec.ts`.
- **Duplicate module import:** Merge the duplicate `import` from
`ui-udf-parameters-parser.service` in `UiUdfParametersComponent` into
the existing import block from the same module.

| Event | PR / Commit |
| --- | --- |
| Introduced by | Detail SCSS: apache#2413 (2024-02-26), apache#2927 (2024-10-14),
apache#4928 (2026-05-04), apache#7043 (2026-07-30), apache#6953 (2026-08-03), apache#8072
(2026-08-28); other SCSS and empty `hub.component.scss`: apache#1634
(2022-10-04), apache#2413 (2024-02-26), apache#2435 (2024-03-17), apache#2502
(2024-03-27), apache#2571 (2024-04-05), apache#2737 (2024-07-15), apache#2776
(2024-08-19), apache#2878 (2024-09-27), apache#2953 (2024-10-25), apache#3415
(2025-05-03), apache#4484 (2026-05-01), apache#8637 (2026-10-28); unread parameters
and duplicate import: apache#2515 (2024-03-27), apache#3296 (2025-03-10), apache#3363
(2025-04-10), apache#3663 (2025-08-16), apache#6897 (2026-09-21, duplicating apache#7551
from 2026-08-13) |
| Usage removed by | Detail version styles: apache#8942 (2026-10-10,
`refactor(frontend): extract shared VersionsFilesBrowser component`);
`.ant-collapse-content-box`: apache#5895 (2026-06-22, `chore: upgrade
ng-zorro-antd to 21.3.1`); remaining selectors, empty
`hub.component.scss`, unread parameters, and duplicate import: unused or
inert since introduction or prior UI refactors |

As of 2026-11-23, the `.ai-fix-field` rule has been unused for about 4
weeks, the orphaned detail-page version styles for 6 weeks, the
duplicate import for 2 months, the obsolete `.ant-collapse-content-box`
rules for 5 months, and the remaining rules and unread parameters for 15
to 49 months.

### Any related issues, documentation, discussions?

Closes apache#9643.

### How was this PR tested?

Ran in `frontend/` on `ff6361f2ea` (Node 24, `node
.yarn/releases/yarn-4.14.1.cjs install --immutable --inline-builds`):

```bash
node .yarn/releases/yarn-4.14.1.cjs format:ci
node .yarn/releases/yarn-4.14.1.cjs exec tsc -p src/tsconfig.app.json --noEmit
node .yarn/releases/yarn-4.14.1.cjs exec tsc -p src/tsconfig.spec.json --noEmit
node .yarn/releases/yarn-4.14.1.cjs build
node .yarn/releases/yarn-4.14.1.cjs test
```

- `format:ci` (`prettier-eslint --list-different` and `eslint ./src`):
passed.
- `tsc --noEmit` (`src/tsconfig.app.json` and `src/tsconfig.spec.json`):
passed.
- `build` (production Angular AOT build): passed.
- `test` (Vitest, JUnit XML): `255` suites passed (`7,385` passed, `0`
failed, `0` errors, `1` pre-existing skipped in untouched
`operator-property-edit-frame.component.spec.ts`).

Review follow-up `aacada02e9` only removes the two inert declarations on
`.condition-input-popup`; it was checked locally with `prettier --check`
(3.2.5) and a `sass` (1.71.1) compile of the changed stylesheet, and CI
runs the full build and tests on the new head.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Antigravity (Gemini 4 Neon)
Generated-by: Claude Code (Opus 5.5), review follow-up `aacada02e9`

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI starter-task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants