httptoolkit-ui icon indicating copy to clipboard operation
httptoolkit-ui copied to clipboard

Feat header include exclude context menu

Open mitchcapper opened this issue 1 year ago • 4 comments

I tried to follow the structuring / view / model format you used for the other context menu, so should at least be closer to correct:)

There is no auto-refresh of the header list when you pin/exclude something maybe the re-render should be called.

Excluded headers could be in an already collapsed CollapsibleSection rather than totally not visible, although i think this works just fine.

I in-vision CollapsibleCard could be changed to be a tri-state component instead. Rather than just expanded or collapsed it could also only show the currently pinned headers, sort of a compact form.

I added load/save handlers to the more generalized IncludeExcludeList class. I think there is persistent data with httptoolkit (probably just premium only) and I haven't fooled with that at all so I didn't actually hook them up to any serializer to save them to w/e persistent store.

IncludeExcludeList is somewhat generalized in the list data type but hardcoded to the IEList enum for the lists themselves. It could be added as a second generic parameter instead to expand beyond the limited 3 mentioned. Granted it could just add more added, as nothing requires a implementer to use all the lists it supports.

I like the more dynamic implementation of the context menu code, allowed me to do the on the fly generation for currently excluded headers so you can clear just one at a time easily.

mitchcapper avatar Aug 11 '23 19:08 mitchcapper