Skip to content
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

Merged
merged 1 commit into from
Mar 22, 2021
Merged

[dashboard] Add Git Providers #3529

merged 1 commit into from
Mar 22, 2021

Conversation

AlexTugarev
Copy link
Member

This is Part 1 of #3401

Screen Shot 2021-03-22 at 06 11 42

@svenefftinge
Copy link
Member

svenefftinge commented Mar 22, 2021

/werft run

👍 started the job as gitpod-build-at-gitproviders.2

Copy link
Member

@svenefftinge svenefftinge left a 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">&#x2713;</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}>
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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

components/dashboard/src/components/Modal.tsx Outdated Show resolved Hide resolved
@AlexTugarev AlexTugarev merged commit 09cb65a into dashboard-v2 Mar 22, 2021
@AlexTugarev AlexTugarev deleted the at/gitproviders branch March 22, 2021 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants