-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add cancel button to variable name creation dialog #1
Conversation
This closes NIFI-6603
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
Thanks @2lambda123 for opening this PR! For COLLABORATOR only :
|
Unable to locate .performanceTestingBot config file |
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.
@2lambda123
Thank you for your contribution to this repository! We appreciate your effort in opening pull request.
Happy coding!
Sweep: PR Reviewnifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.jsA "Cancel" button was added to the "New Variable" dialog to allow users to close the modal without adding a new variable. Sweep Found These Issues
Lines 1628 to 1636 in 3cc311c
View Diff |
Processing PR updates... |
WalkthroughThe recent update to the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Their most recently public accepted PR is: 2lambda123/-mi-sdm439-android_device_xiaomi_mi439#2 |
First PR by @2lambda123 PR Details of @2lambda123 in NorthropGrumman-nifi :
|
undefined Disclaimer: This comment was entirely generated using AI. Be aware that the information provided may be incorrect. Current plan usage: 87.20% Have feedback or need help? |
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.
@2lambda123
Thank you for your contribution to this repository! We appreciate your effort in closing pull request.
Happy coding!
click: function () { | ||
this.modal('hide'); |
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 use of this
within the anonymous function for the click handler may not refer to the expected context, potentially leading to runtime errors when attempting to call modal('hide')
. In JavaScript, the value of this
inside an anonymous function does not automatically refer to the object that contains the function. To ensure the correct context is used, consider using arrow functions or binding the function to the correct context.
click: function () { | ||
addNewVariable(); | ||
} |
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 addNewVariable
function is called without any arguments or context provided, which could potentially lead to issues if the function relies on specific arguments or this
context. It's important to ensure that functions are called with the necessary context and parameters, especially in event handlers where the context might not be as expected. Consider verifying the definition of addNewVariable
to ensure it is being called correctly and, if necessary, adjust the call to provide the required context or parameters.
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.
Hey @2lambda123 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
|
||
}, | ||
{ | ||
buttonText: 'Cancel', |
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.
suggestion: Consider using a more descriptive button text.
The button text 'Cancel' is clear, but it might be more user-friendly to use a more descriptive text like 'Cancel Changes' or 'Discard'. This can help users understand the action better.
buttonText: 'Cancel', | |
buttonText: 'Cancel Changes', |
}, | ||
{ | ||
buttonText: 'Cancel', | ||
color: { |
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.
suggestion: Consider using a centralized color palette.
Instead of hardcoding the color values here, consider using a centralized color palette or theme. This will make it easier to maintain and ensure consistency across the application.
color: { | |
color: { | |
base: theme.colors.base, | |
hover: theme.colors.hover, |
Check out the playback for this Pull Request here. |
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.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js (1 hunks)
Additional comments not posted (1)
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js (1)
1623-1636
: Addition of the 'Cancel' button in the variable creation dialog.This change aligns with the PR's objective to enhance user interaction by allowing them to opt-out of creating a new variable. The implementation correctly hides the modal upon cancellation, which is a standard practice for cancel actions in UI design.
This closes NIFI-6603
Thank you for submitting a contribution to Apache NiFi.
Please provide a short description of the PR here:
Description of PR
Enables X functionality; fixes bug NIFI-YYYY.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
Has your PR been rebased against the latest commit within the target branch (typically
master
)?Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not
squash
or use--force
when pushing to allow for clean monitoring of changes.For code changes:
mvn -Pcontrib-check clean install
at the rootnifi
folder?LICENSE
file, including the mainLICENSE
file undernifi-assembly
?NOTICE
file, including the mainNOTICE
file found undernifi-assembly
?.displayName
in addition to .name (programmatic access) for each of the new properties?For documentation related changes:
Note:
Please ensure that once the PR is submitted, you check GitHub Actions CI for build issues and submit an update to your PR as soon as possible.
Summary by CodeRabbit