generated from layer5io/layer5-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
29 changed files
with
427 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
comment: | ||
# header: "Please note the following requirement:" | ||
footer: "\ | ||
---\n\n | ||
> 	 	 	 	 Be sure to [join the community](https://slack.meshery.io), if you haven't yet and please leave a :star: [star on the project](../stargazers) :smile: | ||
" | ||
|
||
labels: | ||
- name: issue/design required | ||
labeled: | ||
issue: | ||
body: This issue has been labeled with 'design-required'. Note that prior to commencing on implementation, a design specification needs to be created and reviewed for approval. See [Creating a Functional Specification](https://docs.google.com/document/d/1RP3IWLc-MiQS-QYasqCoVuCH7--G87p5ezE5f_nOzB8/edit?usp=sharing) to create a design spec. | ||
action: open | ||
- name: issue/remind | ||
labeled: | ||
issue: | ||
body: Checking in... it has been awhile since we've heard from you on this issue. Are you still working on it? Please let us know and please don't hesitate to contact a [MeshMate](https://layer5.io/community/meshmates/) or any other [community member](https://layer5.io/community/members) for assistance. | ||
action: open | ||
pr: | ||
body: Checking in... it has been awhile since we've heard from you on this issue. Are you still working on it? Please let us know and please don't hesitate to contact a [MeshMate](https://layer5.io/community/meshmates/) or any other [community member](https://layer5.io/community/members) for assistance. | ||
action: open | ||
- name: issue/dco | ||
labeled: | ||
issue: | ||
body: "🚨 Alert! Git Police! We couldn’t help but notice that one or more of your commits is missing a sign-off. _A what?_ A commit sign-off (your email address).\n\n | ||
To amend the commits in this PR with your signoff using the instructions provided in the DCO check. \n\n | ||
To configure your dev environment to automatically signoff on your commits in the future, see [these instructions](https://github.com/meshery/meshery/blob/master/CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)." | ||
action: open | ||
pr: | ||
body: "🚨 Alert! Git Police! We couldn’t help but notice that one or more of your commits is missing a sign-off. _A what?_ A commit sign-off (your email address).\n\n | ||
To amend the commits in this PR with your signoff using the instructions provided in the DCO check. \n\n | ||
To configure your dev environment to automatically signoff on your commits in the future, see [these instructions](https://github.com/meshery/meshery/blob/master/CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)." | ||
action: open | ||
- name: component/ui | ||
labeled: | ||
issue: | ||
body: This issue has been labeled with 'component/ui'. 🧰 Here are docs on [Contributing to Meshery UI](https://docs.meshery.io/project/contributing/contributing-ui). 🎨 Here is the [Meshery UI Figma File](https://www.figma.com/file/SMP3zxOjZztdOLtgN4dS2W/Meshery-UI?node-id=4%3A0) File. Lastly, here are docs on [Contributing to Meshery's End-to-End Tests Using Cypress](https://docs.meshery.io/project/contributing/contributing-cypress). | ||
action: open | ||
pr: | ||
body: This PR has been labeled with 'component/ui'. 🧰 Here are docs on [Contributing to Meshery UI](https://docs.meshery.io/project/contributing/contributing-ui). 🎨 Here is the [Meshery UI Figma File](https://www.figma.com/file/SMP3zxOjZztdOLtgN4dS2W/Meshery-UI?node-id=4%3A0) File. Lastly, here are docs on [Contributing to Meshery's End-to-End Tests Using Cypress](https://docs.meshery.io/project/contributing/contributing-cypress) | ||
action: open | ||
- name: component/mesheryctl | ||
labeled: | ||
issue: | ||
body: This issue has been labeled with 'component/mesheryctl'. Note that after making changes you need to update it in the [mesheryctl command tracker](https://docs.google.com/spreadsheets/d/1q63sIGAuCnIeDs8PeM-0BAkNj8BBgPUXhLbe1Y-318o/edit#gid=0) spreadsheet. | ||
action: open | ||
pr: | ||
body: This PR has been labeled with 'component/mesheryctl'. Note that after making changes you need to update it in the [mesheryctl command tracker](https://docs.google.com/spreadsheets/d/1q63sIGAuCnIeDs8PeM-0BAkNj8BBgPUXhLbe1Y-318o/edit#gid=0) spreadsheet. | ||
action: open | ||
# pr: | ||
# body: Hi, please note that this issue will need an approved design specification before implementation proceeds. See [Creating a Functional Specification](https://docs.google.com/document/d/1RP3IWLc-MiQS-QYasqCoVuCH7--G87p5ezE5f_nOzB8/edit?usp=sharing) to create a design spec. | ||
# action: open | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Label Commenter | ||
|
||
on: | ||
issues: | ||
types: | ||
- labeled | ||
|
||
pull_request_target: | ||
types: | ||
- labeled | ||
|
||
permissions: | ||
contents: read | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
comment: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repo 🛎️ | ||
uses: actions/checkout@master | ||
with: | ||
ref: master # Set your default branch | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Label Commenter | ||
uses: peaceiris/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Grow as MuiGrow, GrowProps as MuiGrowProps } from '@mui/material'; | ||
|
||
export function Grow(props: MuiGrowProps): JSX.Element { | ||
return <MuiGrow {...props} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { Grow } from './Grow'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
import * as React from 'react'; | ||
import { | ||
Button, | ||
ButtonGroup, | ||
ClickAwayListener, | ||
MenuItem, | ||
MenuList, | ||
Paper, | ||
Popper | ||
} from '../../base'; | ||
import { DropDownIcon } from '../../icons'; | ||
interface Option { | ||
icon: React.ReactNode; | ||
label: string; | ||
onClick: (event: React.MouseEvent<HTMLLIElement, MouseEvent>, index: number) => void; | ||
} | ||
|
||
interface ActionButtonProps { | ||
defaultActionClick: () => void; | ||
options: Option[]; | ||
label: string; | ||
} | ||
|
||
export default function ActionButton({ | ||
defaultActionClick, | ||
options, | ||
label | ||
}: ActionButtonProps): JSX.Element { | ||
const [open, setOpen] = React.useState(false); | ||
const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null); | ||
const handleMenuItemClick = () => { | ||
setOpen(false); | ||
}; | ||
|
||
const handleToggle = (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => { | ||
event.stopPropagation(); | ||
setAnchorEl(event.currentTarget); | ||
setOpen((prevOpen) => !prevOpen); | ||
}; | ||
|
||
const handleClose = () => { | ||
setAnchorEl(null); | ||
setOpen(false); | ||
}; | ||
|
||
return ( | ||
<React.Fragment> | ||
<ButtonGroup | ||
variant="contained" | ||
style={{ boxShadow: 'none' }} | ||
aria-label="Button group with a nested menu" | ||
> | ||
<Button onClick={defaultActionClick} variant="contained"> | ||
{label} | ||
</Button> | ||
<Button size="small" onClick={handleToggle} variant="contained"> | ||
<DropDownIcon /> | ||
</Button> | ||
</ButtonGroup> | ||
<Popper | ||
sx={{ | ||
zIndex: 1 | ||
}} | ||
open={open} | ||
anchorEl={anchorEl} | ||
role={undefined} | ||
> | ||
<Paper> | ||
<ClickAwayListener onClickAway={handleClose}> | ||
<MenuList id="split-button-menu" autoFocusItem> | ||
{options.map((option, index) => ( | ||
<MenuItem | ||
key={index} | ||
onClick={(event) => { | ||
handleMenuItemClick(); | ||
option.onClick(event, index); | ||
}} | ||
> | ||
<div style={{ marginRight: '1rem' }}>{option.icon}</div> | ||
{option.label} | ||
</MenuItem> | ||
))} | ||
</MenuList> | ||
</ClickAwayListener> | ||
</Paper> | ||
</Popper> | ||
</React.Fragment> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import ActionButton from './ActionButton'; | ||
|
||
export { ActionButton }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.