Skip to content

Refactor resize event payload to ResizeEventArgs#34

Merged
zxyao145 merged 1 commit into
refactor/module-10.0.0from
codex/wrap-resize-event-in-resizeeventargs
Mar 7, 2026
Merged

Refactor resize event payload to ResizeEventArgs#34
zxyao145 merged 1 commit into
refactor/module-10.0.0from
codex/wrap-resize-event-in-resizeeventargs

Conversation

@zxyao145
Copy link
Copy Markdown
Owner

@zxyao145 zxyao145 commented Mar 7, 2026

Motivation

  • Consolidate the window.onresize payload into a single typed object to simplify event signatures and caller code.
  • Remove the two-parameter event plumbing (EventSlot<T1, T2>) which is no longer needed once resize uses an object.

Description

  • Added ResizeEventArgs DTO with Width and Height properties (src/BQuery/Dtos/ResizeEventArgs.cs).
  • Switched WindowEvent.OnResize metadata to use ResizeEventArgs instead of two double arguments (src/BQuery/Constants/WindowEvents.cs).
  • Removed the unused EventSlot<T1, T2> implementation from BqEvents and retained the single-argument EventSlot<T> (src/BQuery/BqEvents.cs).
  • Updated JS interop to invoke WindowResize with an object payload { width, height } and rebuilt the JS bundle (src/BQuery/wwwroot/src/module/eventHelper.ts, src/BQuery/wwwroot/bQuery.min.js).
  • Updated the sample handler to accept ResizeEventArgs and updated README/API docs to reflect the new signatures (Sample/BQuery.Sample.Common/Pages/Index.razor, README.md, API.md).

Testing

  • Ran pnpm install in src/BQuery/wwwroot and it completed successfully.
  • Ran pnpm build in src/BQuery/wwwroot and the frontend bundle was built successfully producing an updated bQuery.min.js.
  • Attempted dotnet build /workspace/BQuery/BQuery.sln but the command could not be executed in this environment because dotnet is not installed.

Codex Task

@zxyao145 zxyao145 merged commit 7eeb186 into refactor/module-10.0.0 Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant