Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create Rollup filter & FilterPanel #496

Merged
merged 35 commits into from
Aug 31, 2024
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
663957a
refactor(web): create Option type for Dropdown options
xFJA Aug 6, 2024
2e4d6a1
chore(web): update changeset
xFJA Aug 6, 2024
852efc5
refactor(web): use label in Dropdown selected option display
xFJA Aug 6, 2024
a8745ee
refactor(web): update Dropdown component main filename
xFJA Aug 19, 2024
177585e
refactor(web): remove nested /components folder in Dropdown
xFJA Aug 19, 2024
07c857f
feat(web): render value when no label in Dropdown
xFJA Aug 21, 2024
cfe321e
feat(web): add prefix slot to Dropdown option
xFJA Aug 8, 2024
16257bd
feat(web): add filter panel with rollup filter in PaginatedTable
xFJA Aug 8, 2024
0e972a5
chore(web): update changeset
xFJA Aug 11, 2024
aa84252
refactor(web): rename main PaginedTable filename
xFJA Aug 19, 2024
623b413
refactor(web): rename main FilersPanel filename
xFJA Aug 19, 2024
3e4f4d6
refactor(web): update RollupFilter component to fetch rollups from API
luis-herasme Aug 20, 2024
19c8482
feat(web): add filters to query params
xFJA Aug 21, 2024
693ff22
fix(web): pages number calculation in PaginatedTable
xFJA Aug 21, 2024
97040d3
fix(web): pages number calculation in PaginatedTable
xFJA Aug 21, 2024
2270db2
Merge branch 'main' into 490-refactor-dropdown
xFJA Aug 26, 2024
9b1926a
refactor(web): simplify dropdowns options
xFJA Aug 26, 2024
324549c
Merge branch '490-refactor-dropdown' into create-rollup-filter
xFJA Aug 26, 2024
553388b
feat(web): add clear button for filter
xFJA Aug 28, 2024
70e36e5
Separate Prisma enums to their own file (#523)
PJColombo Aug 28, 2024
f173b57
Abstract rollup addresses into its own package (#524)
PJColombo Aug 28, 2024
a707285
Merge branch 'main' into create-rollup-filter
PJColombo Aug 29, 2024
9bd7c35
chore: fix `@blobscan/rollups` version
PJColombo Aug 29, 2024
de3c235
refactor(web): display selected rollup icon on rollup dropdown
PJColombo Aug 29, 2024
5ff8f98
refactor(web): refactor `Filters` component
PJColombo Aug 29, 2024
8849eb6
feat(web): add support for filtering by no rollup
PJColombo Aug 29, 2024
2031a51
feat(web): add clear button to dropdown + make rollup filter clearable
PJColombo Aug 29, 2024
08c976a
chore: add changeset
PJColombo Aug 29, 2024
886b83c
refactor(web): extract query parameter logic into a custom hook
PJColombo Aug 30, 2024
7aa964c
fix(web): sync rollup filter dropdown with URL query parameter for co…
PJColombo Aug 30, 2024
7f8a525
feat(rollups): return rollup's address and name when fetching chain's…
PJColombo Aug 30, 2024
dbe1906
chore: add changeset
PJColombo Aug 30, 2024
df550e2
fix(web): use rollup's address when filtering elements by rollup
PJColombo Aug 30, 2024
390c8cb
chore: add changeset
PJColombo Aug 30, 2024
27c687e
fix(web): ensure rollup address query parameter stays consistent with…
PJColombo Aug 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor(web): simplify dropdowns options
  • Loading branch information
xFJA committed Aug 26, 2024
commit 9b1926a108f480319d0764d468cd38aa01018591
2 changes: 1 addition & 1 deletion apps/web/src/components/Dropdown/index.tsx
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ export const Dropdown: React.FC<DropdownProps> = function ({
} cursor-pointer rounded-lg border border-transparent bg-controlBackground-light pl-2 pr-8 text-left text-sm shadow-md hover:border hover:border-controlBackground-light focus:outline-none focus-visible:border-indigo-500 focus-visible:ring-2 focus-visible:ring-white active:border-controlBorderHighlight-dark ui-open:border-controlActive-light dark:bg-controlBackground-dark dark:hover:border-controlBorderHighlight-dark dark:ui-open:border-controlActive-dark`}
>
<span className="block truncate align-middle font-normal">
{selected.label}
{selected.label ? selected.label : selected.value}
</span>
<span className="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2">
<ChevronUpDownIcon
8 changes: 4 additions & 4 deletions apps/web/src/components/Layouts/PaginatedListLayout.tsx
Original file line number Diff line number Diff line change
@@ -21,10 +21,10 @@ export type PaginatedListLayoutProps = {
};

const PAGE_SIZES_OPTIONS: DropdownProps["options"] = [
{ value: 10, label: "10" },
{ value: 25, label: "25" },
{ value: 50, label: "50" },
{ value: 100, label: "100" },
{ value: 10 },
{ value: 25 },
{ value: 50 },
{ value: 100 },
];

export const PaginatedListLayout: FC<PaginatedListLayoutProps> = function ({
10 changes: 5 additions & 5 deletions apps/web/src/components/PaginatedTable/PaginatedTable.tsx
xFJA marked this conversation as resolved.
Show resolved Hide resolved
xFJA marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -14,10 +14,10 @@ import { Table } from "~/components/Table";

const DEFAULT_TABLE_EMPTY_STATE = "No items";
const PAGE_SIZES_OPTIONS: DropdownProps["options"] = [
{ value: 10, label: "10" },
{ value: 25, label: "25" },
{ value: 50, label: "50" },
{ value: 100, label: "100" },
{ value: 10 },
{ value: 25 },
{ value: 50 },
{ value: 100 },
];
const DEFAULT_ROW_SKELETON_HEIGHT = 22;

@@ -139,7 +139,7 @@ export const PaginatedTable: FC<PaginatedTableProps> = function ({
Displayed items:
<Dropdown
options={PAGE_SIZES_OPTIONS}
selected={{ value: pageSize, label: pageSize.toString() }}
selected={{ value: pageSize }}
width="w-full"
onChange={handlePageSizeSelection}
/>
2 changes: 1 addition & 1 deletion apps/web/src/pages/blob/[hash].tsx
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ const Blob: NextPage = function () {
...DEFAULT_BLOB_VIEW_MODES,
];
const blobViewModesOptions: DropdownProps["options"] = blobViewModes.map(
(blobViewMode) => ({ label: blobViewMode, value: blobViewMode })
(blobViewMode) => ({ value: blobViewMode })
);

useEffect(() => {
Loading