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

Feature/comments web UI #6709

Merged
merged 10 commits into from
Mar 11, 2024
Merged

Feature/comments web UI #6709

merged 10 commits into from
Mar 11, 2024

Conversation

lups2000
Copy link
Contributor

@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
Contributor Author

lups2000 commented Mar 4, 2024

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

Copy link
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!

web/src/js/flow/utils.ts Outdated Show resolved Hide resolved
web/src/js/components/FlowTable/FlowColumns.tsx Outdated Show resolved Hide resolved
web/src/js/components/FlowView.tsx Outdated Show resolved Hide resolved
web/src/js/components/FlowView.tsx Show resolved Hide resolved
@lups2000
Copy link
Contributor 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
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
Contributor 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
Contributor 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
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
Contributor 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
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. :)

it("should be possible to get a comment", () => {
let tflow = TFlow();
expect(tflow.comment).toEqual("I'm a comment!");
});
Copy link
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
Contributor 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
21 of 22 checks passed
@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