-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat!: render roadmaps with d3 #358
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
maxHeight: number; | ||
} | ||
|
||
export default function NewRoadmapHeader ({ scale, yMin, leftMostX, rightMostX, width, maxHeight }: NewRoadmapHeaderProps) { |
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.
Function NewRoadmapHeader
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
import styles from './Roadmap.module.css' | ||
import { TodayMarkerToggle } from './today-marker-toggle' | ||
|
||
export function RoadmapTabbedView () { |
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.
Function RoadmapTabbedView
has 90 lines of code (exceeds 25 allowed). Consider refactoring.
|
||
function NewRoadmap({ issueData }: { issueData: IssueData; isLocal: boolean }) { | ||
if (!issueData) return null; | ||
function NewRoadmap () { |
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.
Function NewRoadmap
has 244 lines of code (exceeds 25 allowed). Consider refactoring.
}) | ||
}, []) | ||
|
||
const zoomBehavior = useMemo(() => { |
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.
Function zoomBehavior
has 65 lines of code (exceeds 25 allowed). Consider refactoring.
import styles from './Roadmap.module.css' | ||
import { TodayMarkerToggle } from './today-marker-toggle' | ||
|
||
export function RoadmapTabbedView () { |
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.
Function RoadmapTabbedView
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
|
||
function NewRoadmap({ issueData }: { issueData: IssueData; isLocal: boolean }) { | ||
if (!issueData) return null; | ||
function NewRoadmap () { |
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.
Function NewRoadmap
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
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.
* fix: 📦 Fixing box model * 🤦 lint * fix: ⚡ reducing number of comparisons --------- Co-authored-by: Russell Dempsey <[email protected]>
components/roadmap/lib.ts
Outdated
* | ||
* y1 is determined by finding the first empty space where the space between y1 and y2 are not occupied by other items within the same x1 and x2 range. | ||
*/ | ||
export const binPack = (items: ImmutableArray<BinPackIssueData>, { height, width, scale, yMin, ...opts }: BinPackOptions): BinPackItem[] => { |
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.
Function binPack
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
* fix: dont loop over each group of binPackedItems * fix: top/bottom y semantics * Revert "fix: top/bottom y semantics" This reverts commit 5d275b3.
|
||
function NewRoadmap({ issueData }: { issueData: IssueData; isLocal: boolean }) { | ||
if (!issueData) return null; | ||
function NewRoadmap () { |
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.
Function NewRoadmap
has 242 lines of code (exceeds 25 allowed). Consider refactoring.
* | ||
* y1 is determined by finding the first empty space where the space between y1 and y2 are not occupied by other items within the same x1 and x2 range. | ||
*/ | ||
export const binPack = (items: ImmutableArray<BinPackIssueData>, { height, width, scale, yMin, ...opts }: BinPackOptions): [BinPackItem[], BoxItem] => { |
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.
Function binPack
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
}, [zoomBehavior, ref, zoomTransform]) | ||
|
||
const titlePadding = 30 | ||
const binPackedGroups: BinPackedGroup[] = useMemo(() => { |
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.
Function binPackedGroups
has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Follow #237 for updates, and please feel free to comment on that issue with concerns/questions/requests.
fixes #237