Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 2a26afe

Browse files
authored
Redesign room search interface (#12677)
* Extract SearchInfo interface and SearchScope enum Signed-off-by: Michael Telatynski <[email protected]> * Fix in-progress and update behaviour of RoomSearchView Signed-off-by: Michael Telatynski <[email protected]> * Remove search button from legacy header Signed-off-by: Michael Telatynski <[email protected]> * Move search from aux panel to room summary card Signed-off-by: Michael Telatynski <[email protected]> * Wire up Cmd/Ctrl F for moved search field Signed-off-by: Michael Telatynski <[email protected]> * Use cpd space tokens Signed-off-by: Michael Telatynski <[email protected]> * Remove stale props Signed-off-by: Michael Telatynski <[email protected]> * Fix ctrl/cmd f search shortcut Signed-off-by: Michael Telatynski <[email protected]> * Tests Signed-off-by: Michael Telatynski <[email protected]> * Tests Signed-off-by: Michael Telatynski <[email protected]> * Update Compound Signed-off-by: Michael Telatynski <[email protected]> * Revert the back button for now Signed-off-by: Michael Telatynski <[email protected]> * i18n Signed-off-by: Michael Telatynski <[email protected]> * Iterate Signed-off-by: Michael Telatynski <[email protected]> * Iterate Signed-off-by: Michael Telatynski <[email protected]> * Iterate Signed-off-by: Michael Telatynski <[email protected]> * Iterate Signed-off-by: Michael Telatynski <[email protected]> * Cancel search on escape Signed-off-by: Michael Telatynski <[email protected]> * Fix missing X Signed-off-by: Michael Telatynski <[email protected]> * Improve coverage Signed-off-by: Michael Telatynski <[email protected]> * Extract SearchScope and SearchInfo into Searching Signed-off-by: Michael Telatynski <[email protected]> * delint Signed-off-by: Michael Telatynski <[email protected]> * delint Signed-off-by: Michael Telatynski <[email protected]> * Fix test Signed-off-by: Michael Telatynski <[email protected]> * Switch to icon button for cancel search Signed-off-by: Michael Telatynski <[email protected]> * Iterate Signed-off-by: Michael Telatynski <[email protected]> * yarn.lock Signed-off-by: Michael Telatynski <[email protected]> * Iterate Signed-off-by: Michael Telatynski <[email protected]> * lint Signed-off-by: Michael Telatynski <[email protected]> * Iterate Signed-off-by: Michael Telatynski <[email protected]> * Iterate Signed-off-by: Michael Telatynski <[email protected]> * Update screenshots Signed-off-by: Michael Telatynski <[email protected]> * i18n Signed-off-by: Michael Telatynski <[email protected]> * Update screenshots Signed-off-by: Michael Telatynski <[email protected]> * Update screenshots Signed-off-by: Michael Telatynski <[email protected]> * Update locators Signed-off-by: Michael Telatynski <[email protected]> * Revert screenshots Signed-off-by: Michael Telatynski <[email protected]> * Update screenshots Signed-off-by: Michael Telatynski <[email protected]> * Update snapshots * Discard changes to package.json * i18n Signed-off-by: Michael Telatynski <[email protected]> * Snapshots Signed-off-by: Michael Telatynski <[email protected]> * Handle narrow viewports Signed-off-by: Michael Telatynski <[email protected]> * Iterate Signed-off-by: Michael Telatynski <[email protected]> * Improve coverage Signed-off-by: Michael Telatynski <[email protected]> * Improve coverage Signed-off-by: Michael Telatynski <[email protected]> * Iterate Signed-off-by: Michael Telatynski <[email protected]> * Revert copy Signed-off-by: Michael Telatynski <[email protected]> --------- Signed-off-by: Michael Telatynski <[email protected]>
1 parent 596ad38 commit 2a26afe

33 files changed

+679
-503
lines changed

playwright/e2e/timeline/timeline.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -781,10 +781,10 @@ test.describe("Timeline", () => {
781781

782782
await page.locator(".mx_LegacyRoomHeader").getByRole("button", { name: "Search" }).click();
783783

784-
await expect(page.locator(".mx_SearchBar")).toMatchScreenshot("search-bar-on-timeline.png");
784+
await page.locator(".mx_RoomSummaryCard_search").getByRole("searchbox").fill("Message");
785+
await page.locator(".mx_RoomSummaryCard_search").getByRole("searchbox").press("Enter");
785786

786-
await page.locator(".mx_SearchBar_input").getByRole("textbox").fill("Message");
787-
await page.locator(".mx_SearchBar_input").getByRole("textbox").press("Enter");
787+
await expect(page.locator(".mx_RoomSearchAuxPanel")).toMatchScreenshot("search-aux-panel.png");
788788

789789
for (const locator of await page
790790
.locator(".mx_EventTile:not(.mx_EventTile_contextual) .mx_EventTile_searchHighlight")
@@ -822,8 +822,8 @@ test.describe("Timeline", () => {
822822
await page.locator(".mx_LegacyRoomHeader").getByRole("button", { name: "Search" }).click();
823823

824824
// Search the string to display both the message and TextualEvent on search results panel
825-
await page.locator(".mx_SearchBar").getByRole("textbox").fill(stringToSearch);
826-
await page.locator(".mx_SearchBar").getByRole("textbox").press("Enter");
825+
await page.locator(".mx_RoomSummaryCard_search").getByRole("searchbox").fill(stringToSearch);
826+
await page.locator(".mx_RoomSummaryCard_search").getByRole("searchbox").press("Enter");
827827

828828
// On search results panel
829829
const resultsPanel = page.locator(".mx_RoomView_searchResultsPanel");
2 KB
Loading
-2.03 KB
Loading
-1.56 KB
Loading
1.72 KB
Loading
-828 Bytes
Loading
5.56 KB
Loading
-5 KB
Binary file not shown.
-3.44 KB
Loading

res/css/_common.pcss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ a:visited {
177177
color: $accent-alt;
178178
}
179179

180-
input[type="text"],
181-
input[type="search"],
182-
input[type="password"] {
180+
:not(.mx_no_textinput):not(.mx_textinput):not(.mx_Field) > input[type="text"],
181+
:not(.mx_no_textinput):not(.mx_textinput):not(.mx_Field) > input[type="search"],
182+
:not(.mx_no_textinput):not(.mx_textinput):not(.mx_Field) > input[type="password"] {
183183
padding: 9px;
184184
font: var(--cpd-font-body-md-semibold);
185185
font-weight: var(--cpd-font-weight-semibold);

0 commit comments

Comments
 (0)