-
-
Notifications
You must be signed in to change notification settings - Fork 730
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
chore: action events UI #6358
chore: action events UI #6358
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
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.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 0 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Large Method ProjectActionsTable.tsx: ProjectActionsTable
- Large Method ProjectActionsModal.tsx: ProjectActionsModal
- Complex Conditional useActionEvents.ts: getKey:SWRInfiniteKeyLoader
@@ -49,6 +50,7 @@ export const ProjectActionsTable = ({ | |||
const { incomingWebhooks } = useIncomingWebhooks(); | |||
const { serviceAccounts } = useServiceAccounts(); | |||
|
|||
const [eventsModalOpen, setEventsModalOpen] = useState(false); |
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.
❌ Getting worse: Large Method
ProjectActionsTable increases from 220 to 238 lines of code, threshold = 120
Why does this problem occur?
Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function. Read more.
To ignore this warning click here.
if ( | ||
!actionSetId || | ||
!projectId || | ||
!isEnterprise || |
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 issue: Complex Conditional
getKey:SWRInfiniteKeyLoader has 1 complex conditionals with 3 branches, threshold = 2
Why does this problem occur?
A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell. Read more.
To ignore this warning click 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.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 4 findings(s) 🚩
- Improving Code Health: 0 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Large Method ProjectActionsTable.tsx: ProjectActionsTable
- Large Method ProjectActionsModal.tsx: ProjectActionsModal
- Large Method IncomingWebhooksModal.tsx: IncomingWebhooksModal
- Complex Conditional useActionEvents.ts: getKey:SWRInfiniteKeyLoader
} | ||
|
||
export const ProjectActionsModal = ({ | ||
action, | ||
open, | ||
setOpen, | ||
onOpenEvents, |
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.
❌ Getting worse: Large Method
ProjectActionsModal increases from 140 to 147 lines of code, threshold = 120
Why does this problem occur?
Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function. Read more.
To ignore this warning click here.
<ConditionallyRender | ||
condition={editing} | ||
show={<Link onClick={onOpenEvents}>View events</Link>} | ||
/> |
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 issue: Large Method
IncomingWebhooksModal has 138 lines, threshold = 120
Why does this problem occur?
Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function. Read more.
To ignore this warning click 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.
I've seen this working and looks nice, my only concern is the changes on common components that might cause side effects. Other than that I'd iterate and improve based on this
flex: 1, | ||
padding: theme.spacing(2), | ||
fontSize: theme.fontSizes.smallBody, | ||
justifyContent: align, | ||
...(maxWidth && { maxWidth }), | ||
textAlign: align, | ||
alignItems: 'center', |
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.
Will this and the display change above affect other UI components? I'm just worried this might cause unnoticed changes a few days prior a release
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.
SidePanelList
is a new component introduced in #6317 so I wouldn't worry about it.
The only other place where we're using it, Incoming webhook events, also looks correct with this change.
https://linear.app/unleash/issue/2-1936/action-events-ui
Implements the UI for action events.