-
Notifications
You must be signed in to change notification settings - Fork 49
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
Create Test button for function nodes #2188
Conversation
I see the image on the 'Topic' node. As per the ticket, this button should only appear for 'node_type = Function' |
It seems the check does filter only by 'Function' |
@tomsmith8 Yeah, I know. Basically, for testing purposes, I used Topic because I didn't see the Function node type. However, I have placed a check for Function as you can see here in the code: https://github.com/stakwork/sphinx-nav-fiber/pull/2188/files#diff-3ab7b92393d6490c005dfa71060f6262c76b1406b196b332ff12f43d2bc8ddeeR167. |
@@ -163,6 +164,8 @@ export const NodeControls = memo(() => { | |||
|
|||
const id = open ? 'simple-popover' : undefined | |||
|
|||
const isShowCreateTestButton = !!(selectedNode && selectedNode.node_type === 'function') |
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.
@AbdulWahab3181 is this case sensitive. Will it work for node_type = Function and function
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 will not work for Function
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background: ${(p: ButtonProps) => (p.backgroundColor ? p.backgroundColor : '#000000bb')}; |
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.
We can use ??, and try to not use hardcoded colors
justify-content: center; | ||
align-items: center; | ||
background: ${(p: ButtonProps) => (p.backgroundColor ? p.backgroundColor : '#000000bb')}; | ||
color: ${(p: ButtonProps) => (p.fontColor ? p.fontColor : '#ffffff')}; |
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.
We can use ??, and try to not use hardcoded colors
} | ||
} | ||
|
||
export const postBountyData = async (payload: BountyPayload) => { |
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.
let's move it to separate file, network/postBounty/index.ts
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.
Please take a look to my comments
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 is part for createBountyModal, lets put this file with folder inside createBountyModal
|
||
return ( | ||
<BaseModal id="createBounty" kind={modalKind} onClose={handleClose} preventOutsideClose> | ||
<FormProvider {...form}> |
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.
Let's move it to Body similar to this: src/components/ModalsContainer/EditNodeNameModal/Body/index.tsx
We need it so lazyloading makes sense
@@ -163,6 +164,8 @@ export const NodeControls = memo(() => { | |||
|
|||
const id = open ? 'simple-popover' : undefined | |||
|
|||
const isShowCreateTestButton = !!(selectedNode && selectedNode.node_type === 'function') |
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 will not work for Function
@tomsmith8 @Rassl Addressed all the issues and changes. @Rassl Could you please review and merge the PR? |
Ticket №:
closes #2164
Evidence:
https://i.imgur.com/iwQj77Y.png
https://i.imgur.com/Pjy52Tf.png
https://i.imgur.com/JJrWSSQ.png