-
Notifications
You must be signed in to change notification settings - Fork 1.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
[dashboard] Add Git Providers #3529
Conversation
/werft run 👍 started the job as gitpod-build-at-gitproviders.2 |
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.
Works nicely. The designs are still rough, but that can be done in another PR so we can merge this into dashboard-v2 and then merge that one into main.
const clickable = e.href || e.onClick; | ||
const entry = <div key={e.title} className={`px-4 flex py-3 ${clickable?'hover:bg-gray-200':''} text-sm leading-1 ${e.customFontStyle || font} ${e.separator? ' border-b border-gray-200':''}`} > | ||
<div>{e.title}</div><div className="flex-1"></div>{e.active ? <div className="pl-1 font-semibold">✓</div>: null} | ||
</div> | ||
if (!clickable) { | ||
return entry; | ||
} | ||
return <a key={e.title} href={e.href} onClick={e.onClick}> | ||
return <a key={`entry-${menuId}-${index}-${e.title}`} href={e.href} onClick={e.onClick}> |
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.
Could you explain why the title
wasn't sufficient 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.
when rendering a table with rows which each contain a context menu with the same title you get the "unique" key problem.
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.
Oh, interesting. I thought the uniqueness was only required among sibling nodes
f0e8781
to
fdf8bb3
Compare
This is Part 1 of #3401