Skip to content

Commit bed9431

Browse files
coreymartinLightspark Eng
authored andcommitted
[site] Support filtering by payment hash in transactions table (#23014)
Adding filtering by payment hash per request from Chivo: <img width="1500" height="1342" alt="Screenshot 2026-01-12 at 1 59 30 PM" src="https://github.com/user-attachments/assets/b7b888a6-90c5-4367-86a3-edcb5e731307" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a "Payment Hash" column to Transactions and a "Payment Hash" string filter (64-character hex) to search and filter transactions by payment hash. * **Style** * Consolidated filter action button layout into a shared component for consistent spacing, wrapping, and max-width across table filters. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> GitOrigin-RevId: 5c51f07e6a4bc347492fafd60e38aacb0a6cc107
1 parent 8792bec commit bed9431

File tree

4 files changed

+17
-27
lines changed

4 files changed

+17
-27
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import styled from "@emotion/styled";
2+
import { Spacing } from "../../styles/tokens/spacing.js";
3+
import { ButtonSelector } from "../Button.js";
4+
5+
export const AppliedButtonsContainer = styled.div`
6+
margin-top: ${Spacing.px.sm};
7+
display: flex;
8+
gap: ${Spacing.px.xs};
9+
flex-wrap: wrap;
10+
11+
${ButtonSelector()} {
12+
max-width: 100%;
13+
}
14+
`;

packages/ui/src/components/DataManagerTable/EnumFilter.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import styled from "@emotion/styled";
21
import { ensureArray } from "@lightsparkdev/core";
3-
import { Spacing } from "../../styles/tokens/spacing.js";
42
import { z } from "../../styles/z-index.js";
53
import { Button } from "../Button.js";
64
import Select from "../Select.js";
5+
import { AppliedButtonsContainer } from "./AppliedButtonsContainer.js";
76
import { Filter, type FilterState } from "./Filter.js";
87
import { FilterType, type EnumFilterValue } from "./filters.js";
98

@@ -105,10 +104,3 @@ export const EnumFilter = ({
105104
</>
106105
);
107106
};
108-
109-
const AppliedButtonsContainer = styled.div`
110-
margin-top: ${Spacing.px.sm};
111-
display: flex;
112-
gap: ${Spacing.px.xs};
113-
flex-wrap: wrap;
114-
`;

packages/ui/src/components/DataManagerTable/IdFilter.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import styled from "@emotion/styled";
2-
import { Spacing } from "../../styles/tokens/spacing.js";
31
import { Button } from "../Button.js";
42
import { TextInput } from "../TextInput.js";
3+
import { AppliedButtonsContainer } from "./AppliedButtonsContainer.js";
54
import { Filter, type FilterState } from "./Filter.js";
65
import { FilterType } from "./filters.js";
76

@@ -148,10 +147,3 @@ export const IdFilter = ({
148147
</>
149148
);
150149
};
151-
152-
const AppliedButtonsContainer = styled.div`
153-
margin-top: ${Spacing.px.sm};
154-
display: flex;
155-
gap: ${Spacing.px.xs};
156-
flex-wrap: wrap;
157-
`;

packages/ui/src/components/DataManagerTable/StringFilter.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import styled from "@emotion/styled";
2-
import { Spacing } from "../../styles/tokens/spacing.js";
31
import { Button } from "../Button.js";
42
import { TextInput } from "../TextInput.js";
3+
import { AppliedButtonsContainer } from "./AppliedButtonsContainer.js";
54
import { Filter, type FilterState } from "./Filter.js";
65
import { FilterType } from "./filters.js";
76

@@ -82,10 +81,3 @@ export const StringFilter = ({
8281
</>
8382
);
8483
};
85-
86-
const AppliedButtonsContainer = styled.div`
87-
margin-top: ${Spacing.px.sm};
88-
display: flex;
89-
gap: ${Spacing.px.xs};
90-
flex-wrap: wrap;
91-
`;

0 commit comments

Comments
 (0)