Skip to content

Feature/comments web UI#6709

Merged
mhils merged 10 commits intomitmproxy:mainfrom
lups2000:feature/comments-webUI
Mar 11, 2024
Merged

Feature/comments web UI#6709
mhils merged 10 commits intomitmproxy:mainfrom
lups2000:feature/comments-webUI

Conversation

@lups2000
Copy link
Copy Markdown
Member

@lups2000 lups2000 commented Mar 4, 2024

Description

Added the possibility to add a comment as a column in the flow table. Then, added a section in the flow details panel where we can see and modify the comment. I modified the backend as well since we were not supporting the modification of a comment. I hope the way I did it is correct :)

closes : #6708

Checklist

  • I have updated tests where applicable.
  • I have added an entry to the CHANGELOG.

@lups2000
Copy link
Copy Markdown
Member Author

lups2000 commented Mar 4, 2024

if you like it, I can then update the tests. Let me know :) thank you

Copy link
Copy Markdown
Member

@mhils mhils left a comment

Choose a reason for hiding this comment

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

This looks good, thanks!

Comment thread web/src/js/flow/utils.ts Outdated
Comment thread web/src/js/components/FlowTable/FlowColumns.tsx Outdated
Comment thread web/src/js/components/FlowView.tsx Outdated
Comment thread web/src/js/components/FlowView.tsx
@lups2000
Copy link
Copy Markdown
Member Author

lups2000 commented Mar 5, 2024

@mhils I made a change in the app.css file, basically adding the style for the comment column in the flow table. In general, as stated in the README, this file shouldn't be pushed, but in this case can I push my changes?

this is the change:

.flow-table .col-comment { width: 150px; padding-left: 5px; } .flow-table td.col-time, .flow-table td.col-size, .flow-table td.col-timestamp, .flow-table td.col-comment { text-align: right; }

@mhils
Copy link
Copy Markdown
Member

mhils commented Mar 6, 2024

@mhils I made a change in the app.css file, basically adding the style for the comment column in the flow table. In general, as stated in the README, this file shouldn't be pushed, but in this case can I push my changes?

app.css is autogenerated from the less files. So you want to modify the less files in https://github.com/mitmproxy/mitmproxy/tree/main/web/src/css and keep app.css as-is. It will be automatically updated on the next release. :)

@lups2000
Copy link
Copy Markdown
Member Author

lups2000 commented Mar 6, 2024

@mhils I made a change in the app.css file, basically adding the style for the comment column in the flow table. In general, as stated in the README, this file shouldn't be pushed, but in this case can I push my changes?

app.css is autogenerated from the less files. So you want to modify the less files in https://github.com/mitmproxy/mitmproxy/tree/main/web/src/css and keep app.css as-is. It will be automatically updated on the next release. :)

ahhh I see now, thank you !

@lups2000 lups2000 force-pushed the feature/comments-webUI branch from c2eeb78 to ba05efb Compare March 6, 2024 13:46
@lups2000
Copy link
Copy Markdown
Member Author

lups2000 commented Mar 8, 2024

@mhils Is there a reason why the folder editors is being ignored in the coverage report (line 13 jest.config.js )? Due to this, I believe I may not be able to pass the codecov/patch test. I am just missing 2 lines :( , basically the onEditDone branch

@mhils
Copy link
Copy Markdown
Member

mhils commented Mar 8, 2024

a) looks like we can remove the editors exclusion.
b) failing coverage CI is not an absolute blocker. I'll try to take a closer look at the PR later today

@lups2000
Copy link
Copy Markdown
Member Author

lups2000 commented Mar 8, 2024

a) looks like we can remove the editors exclusion. b) failing coverage CI is not an absolute blocker. I'll try to take a closer look at the PR later today

Okay thank you very much!

Copy link
Copy Markdown
Member

@mhils mhils left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

The more I look at it the more I want to merge it with the Timings pane, but let's resist the urge and get this in first. :)

Comment thread web/src/js/__tests__/flow/utilsSpec.tsx Outdated
it("should be possible to get a comment", () => {
let tflow = TFlow();
expect(tflow.comment).toEqual("I'm a comment!");
});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Leftover

@lups2000
Copy link
Copy Markdown
Member Author

Looks good, thanks!

The more I look at it the more I want to merge it with the Timings pane, but let's resist the urge and get this in first. :)

Alright :) I'll do it in the future, I promise ahah. For the coverage ? Is it fine ?

@mhils mhils merged commit f0dea82 into mitmproxy:main Mar 11, 2024
@lups2000 lups2000 deleted the feature/comments-webUI branch May 22, 2024 12:55
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.

Render flow.comment in mitmweb as column and also in the sidebar

2 participants