-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Notes feature added to Site Tree Node #8307
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
Please squash the commits |
The history IDs should probably be sorted, and the text input only active/enabled when an ID is selected (you could default select the first one I guess). Otherwise I'm sure entering text and not having one selected will fail somehow 😉 |
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
zap/src/main/java/org/zaproxy/zap/extension/history/SiteNotesAddDialog.java
Outdated
Show resolved
Hide resolved
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
zap/src/main/java/org/zaproxy/zap/extension/history/PopupMenuSiteNote.java
Outdated
Show resolved
Hide resolved
zap/src/main/java/org/zaproxy/zap/extension/history/SiteNotesAddDialog.java
Outdated
Show resolved
Hide resolved
zap/src/main/java/org/zaproxy/zap/extension/history/SiteNotesAddDialog.java
Outdated
Show resolved
Hide resolved
zap/src/main/java/org/zaproxy/zap/extension/history/SiteNotesAddDialog.java
Show resolved
Hide resolved
zap/src/main/java/org/zaproxy/zap/extension/history/SiteNotesAddDialog.java
Outdated
Show resolved
Hide resolved
zap/src/main/java/org/zaproxy/zap/extension/history/SiteNotesAddDialog.java
Outdated
Show resolved
Hide resolved
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
@thc202 this should be checking whether or not the HistoryReference(s) have a temporary type? (No point trying to put notes on those, right?)
|
can you please tell me what is temporary type and how a user change type of href ? |
Users |
Correct. |
ok , i will do it, but HistoryReference.getTemporaryTypes() return a set of integers and how can i check from this set if a href is TemporaryType or not ? |
On the reference you can |
@kingthorin i think this will work
|
LGTM |
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
zap/src/main/java/org/parosproxy/paros/extension/history/ExtensionHistory.java
Show resolved
Hide resolved
That's the last thing I see. I still haven't pulled the PR and tested it, but it seems okay. |
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
zap/src/main/java/org/parosproxy/paros/extension/history/ExtensionHistory.java
Outdated
Show resolved
Hide resolved
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Hi @thc202 , Any chance you could peek at my PR for any feedback ? Eager to jump on next issue. |
Sorry but this didn't (and doesn't) seem to be ready yet:
Edit: To be clear, it's fine if you don't want to implement those, but you should mention that. The help should be being updated too. |
@@ -269,6 +275,7 @@ public void hook(ExtensionHook extensionHook) { | |||
extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuJumpTo()); | |||
// ZAP: Added history notes | |||
extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuNote()); | |||
extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuSiteNote()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new PopupMenuSiteNote(getView()))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new PopupMenuSiteNote(getView()))
why we would pass getView to PopupMenuSiteNote it need extensionHistory as parameter ? i have take the reference from PopMenuNote.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's the only dependency it has, the dialog can live in the pop up menu item (less API exposure overall, this should be moved to an add-on at some point).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry but still didn't get it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think he is suggesting the only reason it passes the extension is for its view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instantiate it directly, as mentioned in the first comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The unused popupMenuSiteNote
instance variable can be removed. The ZAP comment should be updated accordingly to latest changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mean the comments in ExtensionHistory file ? i think the previous comment is still appropriate.
// ZAP: 2024/01/25 Added SiteNotesAddDialog and its utility methods (Issue 8240).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just adding the popup menu item now.
zap/src/main/java/org/zaproxy/zap/extension/history/SiteNotesAddDialog.java
Show resolved
Hide resolved
…ge added Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
for the second part do we need to warn the user if he is deleting siteNode or if he is deleting Href from historyExtension list window ? |
From my understanding, the latter. |
I think for this we can just edit the existing warning from ExtensionHistory.java text like |
I'd prefer if it was added only when there are notes but that should be fine too. |
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
where do i need to update help section ? |
?? |
In the add-on, you can model it similar to others, just look at the src tree. As for dealing with help for the core component that'll be done in zap-core-help. But is separate so don't get stuck on it for now. |
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
… null Signed-off-by: amitpanwar789 <amitpanwar02705@gmail.com>
@thc202 Is this complete or do I need to implement anything else ? |
Overview
Added Notes feature in Site Tree
Related Issues
Related to: #8240
Checklist
./gradlew spotlessApply
for code formattingFor more details, please refer to the developer rules and guidelines.