Atomic Angular — Doc interne

Recent searches

An automatically populated, paginated list of the user's past searches — the same shape as saved searches, with nothing to save explicitly.

<recent-searches> lists the searches a user has actually run, most recent first — populated automatically by UserSettingsStore as the user searches, with no explicit "save" step. It shares its row shape (filter-count badge, relative date) and its reopen mechanism with saved searches.

Minimal example

The recent-searches list
sample.component.ts
import { Component } from "@angular/core";
import { RecentSearchesComponent } from "@sinequa/atomic-angular";

@Component({
  selector: "sample-component",
  imports: [RecentSearchesComponent],
  template: `<recent-searches />`,
})
export class SampleComponent {}

How it works

records each run search reads recentSearches() itemClick(search) delete({item, index}) UserSettingsStore recentSearches() RecentSearchesComponent navigateToSearch() — parses the stored URL

Reopening a recent search and deleting one both work exactly like their saved searches counterparts — the two components are effectively the same list shape over two different backing arrays.

Keyboard

The list is a single tab stop: Tab enters it, and the keys below do the rest. Saved searches, bookmarks and collections share this behaviour — they are the same list.

  • ↑ / ↓ move from one row to the next.
  • Enter (or Space) opens the row, as a click does.
  • Delete removes it, as the trash icon does — and Backspace too on a Mac, whose keyboard has no dedicated Delete key.

Nothing in a bare list says so, which is why the interface does, only while the keyboard focus is in the list (a mouse click on a row never shows it):

  • the row grows by one line that reads "Press Del to delete", the key drawn as a keycap, while its tag and trash icon stay centred on the whole row;
  • the footer, to the left of "See all", reads "↑ ↓ to navigate" and "Enter to open", the keys drawn as keycaps.

A screen reader is told differently, so that nothing is announced twice: the row carries the delete sentence as its description (read when the row takes focus), and the footer hint is hidden from assistive technology since the listbox already announces its own navigation. All of it is translated (en, fr, de).

Options

Prop

Type

What's next

On this page