Skip to content

Show block-level events in block details #990

Merged
csillag merged 4 commits into
masterfrom
csillag/block-level-events
Nov 8, 2023
Merged

Show block-level events in block details #990
csillag merged 4 commits into
masterfrom
csillag/block-level-events

Conversation

@csillag
Copy link
Copy Markdown
Contributor

@csillag csillag commented Oct 31, 2023

Built on top of #991 for some refactoring.

Requires (and includes) #893 in order to avoid crashing on new event types.

Design is here.

Can we tested with this path: /testnet/sapphire/block/3038913

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 31, 2023

Deployed to Cloudflare Pages

Latest commit: b8c35b057fb4cbe4d12a4cac2dd5d942893780da
Status:✅ Deploy successful!
Preview URL: https://9756a964.oasis-explorer.pages.dev

@csillag csillag force-pushed the csillag/block-level-events branch from dbe10db to c4b2960 Compare October 31, 2023 21:34
@csillag csillag marked this pull request as ready for review October 31, 2023 21:35
@csillag csillag changed the title Show block-level evens in block details Show block-level events in block details Oct 31, 2023
@csillag csillag force-pushed the csillag/block-level-events branch from c4b2960 to 881a9c6 Compare October 31, 2023 21:35
@csillag csillag marked this pull request as draft October 31, 2023 21:41
@csillag csillag force-pushed the csillag/block-level-events branch 5 times, most recently from cde7268 to caba9e7 Compare November 2, 2023 11:28
@csillag csillag force-pushed the csillag/block-level-events branch 2 times, most recently from 6c173a2 to 34fb4fb Compare November 7, 2023 22:27
@csillag
Copy link
Copy Markdown
Contributor Author

csillag commented Nov 7, 2023

We decided to do the tweaking of the event filter in a separate PR.

@csillag csillag marked this pull request as ready for review November 7, 2023 22:27
@csillag csillag enabled auto-merge November 7, 2023 22:28
@csillag csillag requested a review from lukaw3d November 7, 2023 22:34
@csillag
Copy link
Copy Markdown
Contributor Author

csillag commented Nov 7, 2023

@lukaw3d this is pretty similar to #992 (already approved), but it's for blocks (not accounts), has the extra filtering. Can you please review this one, too? Then I can merge both at the same time. (And use the same filtering.)

@csillag csillag disabled auto-merge November 7, 2023 23:18
}

// eslint-disable-next-line @typescript-eslint/no-redeclare
export type EventFilterMode = (typeof EventFilterMode)[keyof typeof EventFilterMode]
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.

How does this + export const EventFilterMode = { work

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

On is a type, the other is a const. TS compiler is smart enough to figure out which one we want in each situation. (The type is actually eliminated during the transpilation phase, so in the JS we only have the const.)

In any case, this is not something I came up with here, we already have a similar solution for Layer and other things, too.

Comment thread src/app/pages/BlockDetailPage/EventsCard.tsx Outdated
@csillag csillag force-pushed the csillag/block-level-events branch from 34fb4fb to 3126e3e Compare November 7, 2023 23:23
Comment thread src/app/pages/BlockDetailPage/EventsCard.tsx
W.I.P. because filtering out tx-level events is done on the client
@csillag csillag force-pushed the csillag/block-level-events branch from 2398743 to 51e2e75 Compare November 7, 2023 23:53
@csillag csillag force-pushed the csillag/block-level-events branch from 51e2e75 to b8c35b0 Compare November 7, 2023 23:56
@csillag csillag merged commit b0a1c13 into master Nov 8, 2023
@csillag csillag deleted the csillag/block-level-events branch November 8, 2023 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants