Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

[feat] 按照protocol monitor的样式来设计,简直是量身定做 #11

Closed
tyn1998 opened this issue Jul 9, 2022 · 7 comments · Fixed by #21
Closed

[feat] 按照protocol monitor的样式来设计,简直是量身定做 #11

tyn1998 opened this issue Jul 9, 2022 · 7 comments · Fixed by #21
Assignees

Comments

@tyn1998
Copy link
Owner

tyn1998 commented Jul 9, 2022

image

method在sendRequest/sendNotification/onRequest/onNotification都能拿到,要解决的问题是sendRequest和requestResult怎么对应起来。

@tyn1998 tyn1998 self-assigned this Jul 9, 2022
@tyn1998
Copy link
Owner Author

tyn1998 commented Jul 9, 2022

还有消息的size,这个size先直接算parse后的字符串的size,具体发送的时候怎么压缩的不去管。

@tyn1998
Copy link
Owner Author

tyn1998 commented Jul 9, 2022

要解决的问题是sendRequest和requestResult怎么对应起来。

已搞定:

image

@tyn1998
Copy link
Owner Author

tyn1998 commented Jul 9, 2022

  • onRequest如果method不存在会return一个{data: NOTREGISTERMETHOD}
  • requestResult也有result.error的情况

这两种情况在呈现的时候可以考虑单元格背景会红色表示出错(或其他方式)

@tyn1998
Copy link
Owner Author

tyn1998 commented Jul 9, 2022

找到了protocol monitor的源码:https://github.com/ChromeDevTools/devtools-frontend/blob/main/front_end/panels/protocol_monitor/ProtocolMonitor.ts

但是,这是属于devtools-fronted的一部分,看上去直接抄是不大有戏的。

@tyn1998
Copy link
Owner Author

tyn1998 commented Jul 12, 2022

@tyn1998
Copy link
Owner Author

tyn1998 commented Jul 13, 2022

如果不搞JSON view,则横向可能会有滚动条,这个时候要加冻结表格列功能(参考antd)。

@tyn1998
Copy link
Owner Author

tyn1998 commented Jul 13, 2022

把devtools-frontend的代码改写成react实在不是个简单的事情,于是相中了react-data-grid组件:支持调整宽度和冻结。

image

@tyn1998 tyn1998 changed the title 按照protocol monitor的样式来设计,简直是量身定做 [feat] 按照protocol monitor的样式来设计,简直是量身定做 Jul 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant