Skip to content

Commit c042f95

Browse files
authored
Merge branch 'master' into ci/support-node-22-drop-16
2 parents b09b8af + ca1697d commit c042f95

File tree

27 files changed

+476
-202
lines changed

27 files changed

+476
-202
lines changed

.github/workflows/bump-meshery-version.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ jobs:
4545
uses: peter-evans/create-pull-request@v7
4646
with:
4747
token: ${{ secrets.RELEASEDRAFTER_PAT }}
48-
commit-message: Bump sistent v${{ needs.versions-check.outputs.current }} dependencies
48+
commit-message: Update to Sistent v${{ needs.versions-check.outputs.current }} dependencies
4949
committer: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
5050
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
5151
signoff: true
5252
branch: bump-sistent-bot
5353
delete-branch: true
54-
title: '[Chore]: Bump Sistent v${{ needs.versions-check.outputs.current }}'
54+
title: '[Chore]: Update to Sistent v${{ needs.versions-check.outputs.current }}'
5555
add-paths: |
5656
ui/package.json
5757
ui/package-lock.json
@@ -84,13 +84,13 @@ jobs:
8484
uses: peter-evans/create-pull-request@v7
8585
with:
8686
token: ${{ secrets.RELEASEDRAFTER_PAT }}
87-
commit-message: Bump sistent v${{ needs.versions-check.outputs.current }} dependencies
87+
commit-message: Update to Sistent v${{ needs.versions-check.outputs.current }} dependencies
8888
committer: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
8989
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
9090
signoff: true
9191
branch: bump-sistent-bot
9292
delete-branch: true
93-
title: '[Chore]: Bump Sistent v${{needs.versions-check.outputs.current }}'
93+
title: '[Chore]: Update to Sistent v${{needs.versions-check.outputs.current }}'
9494
add-paths: |
9595
meshmap/package.json
9696
meshmap/package-lock.json
@@ -128,7 +128,7 @@ jobs:
128128
signoff: true
129129
branch: bump-sistent-bot
130130
delete-branch: true
131-
title: '[Chore]: Bump Sistent v${{ needs.versions-check.outputs.current }}'
131+
title: '[Chore]: Update to Sistent v${{ needs.versions-check.outputs.current }}'
132132
add-paths: |
133133
package.json
134134
package-lock.json
@@ -161,13 +161,13 @@ jobs:
161161
uses: peter-evans/create-pull-request@v7
162162
with:
163163
token: ${{ secrets.RELEASEDRAFTER_PAT }}
164-
commit-message: Bump sistent v${{ needs.versions-check.outputs.current }} dependencies
164+
commit-message: Update to Sistent v${{ needs.versions-check.outputs.current }} dependencies
165165
committer: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
166166
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
167167
signoff: true
168168
branch: bump-sistent-bot
169169
delete-branch: true
170-
title: '[Chore]: Bump Sistent v${{ needs.versions-check.outputs.current }}'
170+
title: '[Chore]: Update to Sistent v${{ needs.versions-check.outputs.current }}'
171171
add-paths: |
172172
ui/package.json
173173
ui/package-lock.json

.github/workflows/slack.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
11
name: Slack Notify
2-
on:
2+
3+
on:
34
watch:
5+
types: [started]
46
issues:
5-
types: [started]
7+
types: [labeled]
8+
69
jobs:
710
star-notify:
811
if: github.event_name == 'watch'
912
name: Notify Slack on star
1013
runs-on: ubuntu-latest
1114
steps:
12-
- name: Get current star count
13-
run: |
14-
echo "STARS=$(curl --silent 'https://api.github.com/repos/${{github.repository}}' -H 'Accept: application/vnd.github.preview' | jq '.stargazers_count')" >> $GITHUB_ENV
15-
- name: Notify slack
16-
env:
17-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
18-
uses: pullreminders/slack-action@master
19-
with:
20-
args: '{\"channel\":\"CSK7N9TGX\",\"text\":\"${{ github.actor }} just starred ${{github.repository}}! (https://github.com/${{github.repository}}/stargazers) Total ⭐️: ${{env.STARS}}\"}'
15+
- name: Get current star count
16+
run: |
17+
echo "STARS=$(curl --silent 'https://api.github.com/repos/${{ github.repository }}' -H 'Accept: application/vnd.github.preview' | jq '.stargazers_count')" >> $GITHUB_ENV
18+
- name: Notify Slack
19+
env:
20+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
21+
uses: pullreminders/slack-action@master
22+
with:
23+
args: '{\"channel\":\"CSK7N9TGX\",\"text\":\"${{ github.actor }} just starred ${{ github.repository }}! (https://github.com/${{ github.repository }}/stargazers) Total ⭐️: ${{ env.STARS }}\"}'
24+
2125
good-first-issue-notify:
22-
if: github.event_name == 'issues' && github.event.label.name == 'good first issue' || github.event.label.name == 'first-timers-only'
26+
if: github.event_name == 'issues' && (github.event.label.name == 'good first issue' || github.event.label.name == 'first-timers-only')
2327
name: Notify Slack for new good-first-issue
2428
runs-on: ubuntu-latest
2529
steps:
26-
- name: Notify slack
30+
- name: Notify Slack
2731
env:
2832
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
2933
uses: pullreminders/slack-action@master
3034
with:
31-
args: '{\"channel\":\"C019426UBNY\",\"text\":\"A good first issue label was just added to ${{github.event.issue.html_url}}.\"}'
35+
args: '{\"channel\":\"C019426UBNY\",\"type\":\"section\",\"text\":\":new: Good first issue up for grabs: ${{ github.event.issue.title }} - ${{ github.event.issue.html_url }} \"}'
36+

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npx lint-staged
1+
npm test

package-lock.json

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"format:write": "prettier --write \"**/*.{ts,tsx,md}\" --config ./.prettierrc",
2424
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
2525
"lint:fix": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0 --fix",
26-
"prepare": "husky install",
26+
"prepare": "husky",
2727
"test": "jest",
2828
"versionup:major": "npm version major",
2929
"versionup:minor": "npm version minor",

site/package-lock.json

Lines changed: 21 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/base/Tooltip/Tooltip.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { Tooltip as MuiTooltip, type TooltipProps as MuiTooltipProps } from '@mui/material';
22

3-
export function Tooltip(props: MuiTooltipProps): JSX.Element {
3+
export interface TooltipProps extends MuiTooltipProps {
4+
interactive?: boolean;
5+
}
6+
7+
export function Tooltip(props: TooltipProps): JSX.Element {
48
return <MuiTooltip {...props} />;
59
}
610

src/base/Tooltip/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { TooltipProps } from '@mui/material';
21
import { tooltipClasses } from '@mui/material/Tooltip';
3-
import Tooltip from './Tooltip';
2+
import Tooltip, { TooltipProps } from './Tooltip';
43

54
export { Tooltip, tooltipClasses };
65
export type { TooltipProps };

src/custom/CollaboratorAvatarGroup/CollaboratorAvatarGroup.tsx

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ExpandMore } from '@mui/icons-material';
22
import { MouseEvent, useState } from 'react';
3-
import { Avatar, AvatarGroup, Popover, Typography } from '../../base';
3+
import { Avatar, AvatarGroup, Button, Popover, Typography } from '../../base';
44
import { iconSmall } from '../../constants/iconsSizes';
55
import { styled, useTheme } from '../../theme';
66
import { DARK_TEAL_BLUE } from '../../theme/colors/colors';
@@ -57,10 +57,12 @@ interface Users {
5757
* @interface CollaboratorAvatarGroupProps
5858
* @property {Users} users - Object containing user information mapped by client IDs
5959
* @property {string} providerUrl - Base URL of the provider (e.g., 'https://github.com')
60+
* @property {() => void} [onOpenWorkspace] - function to open workspace
6061
*/
6162
interface CollaboratorAvatarGroupProps {
6263
users: Users;
6364
providerUrl: string;
65+
onOpenWorkspace?: () => void;
6466
}
6567

6668
interface StyledAvatarProps {
@@ -114,7 +116,8 @@ const StyledPopover = styled(Popover)(() => ({
114116

115117
const CollaboratorAvatarGroup = ({
116118
users,
117-
providerUrl
119+
providerUrl,
120+
onOpenWorkspace
118121
}: CollaboratorAvatarGroupProps): JSX.Element => {
119122
const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);
120123

@@ -139,7 +142,28 @@ const CollaboratorAvatarGroup = ({
139142
.slice(0, visibleAvatars)
140143
.map(([clientID, user]) => {
141144
return (
142-
<CustomTooltip key={clientID} title={user.name} arrow>
145+
<CustomTooltip
146+
key={clientID}
147+
title={
148+
<div style={{ display: 'flex', justifyContent: 'center', flexDirection: 'column' }}>
149+
<Typography style={{ display: 'flex', justifyContent: 'center', flexDirection: 'column', fontSize: '0.9rem' }}>{user.name}</Typography>
150+
<Button
151+
size="small"
152+
variant="outlined"
153+
onClick={onOpenWorkspace}
154+
style={{
155+
fontSize: '0.9rem',
156+
padding: '2px 8px',
157+
minWidth: 'auto',
158+
marginTop: '4px'
159+
}}
160+
>
161+
Open Recents
162+
</Button>
163+
</div>
164+
}
165+
arrow
166+
>
143167
<StyledAvatar
144168
key={clientID}
145169
alt={user.name}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
import React, { useState } from 'react';
2+
import { IconButton, Popover } from '../../base';
3+
import { InfoCircleIcon } from '../../icons';
4+
import { WHITE } from '../../theme';
5+
import { RenderMarkdownTooltip } from '../Markdown';
6+
7+
type HelperTextPopoverProps = {
8+
content: string | React.ReactNode | JSX.Element;
9+
fontSize?: string;
10+
fontWeight?: number;
11+
variant?: 'standard' | 'small';
12+
bgColor?: string;
13+
icon?: React.ReactNode;
14+
};
15+
16+
function HelperTextPopover({
17+
content,
18+
fontSize,
19+
fontWeight = 400,
20+
variant = 'standard',
21+
bgColor = '#141414',
22+
icon = <InfoCircleIcon fontSize="small" />,
23+
...props
24+
}: HelperTextPopoverProps): JSX.Element {
25+
const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);
26+
const open = Boolean(anchorEl);
27+
28+
const handleOpen = (event: React.MouseEvent<HTMLElement>) => {
29+
setAnchorEl(event.currentTarget);
30+
};
31+
32+
const handleClose = () => {
33+
setAnchorEl(null);
34+
};
35+
36+
return (
37+
<>
38+
<IconButton
39+
size="small"
40+
onClick={handleOpen}
41+
sx={{ color: 'inherit', padding: '2px', verticalAlign: 'middle' }}
42+
>
43+
{icon}
44+
</IconButton>
45+
<Popover
46+
open={open}
47+
anchorEl={anchorEl}
48+
onClose={handleClose}
49+
disablePortal
50+
container={anchorEl?.ownerDocument?.body}
51+
anchorOrigin={{
52+
vertical: 'top',
53+
horizontal: 'center'
54+
}}
55+
transformOrigin={{
56+
vertical: 'bottom',
57+
horizontal: 'center'
58+
}}
59+
PaperProps={{
60+
sx: {
61+
background: bgColor,
62+
zIndex: 1501,
63+
opacity: '1',
64+
color: WHITE,
65+
maxWidth: '500px',
66+
fontSize: fontSize || (variant === 'standard' ? '1rem' : '0.75rem'),
67+
fontWeight: fontWeight,
68+
borderRadius: '0.5rem',
69+
padding: variant === 'standard' ? '0.9rem' : '0.5rem 0.75rem',
70+
boxShadow: 'rgba(0, 0, 0, 0.6) 0px 4px 10px, rgba(0, 0, 0, 0.5) 0px 2px 4px'
71+
}
72+
}}
73+
{...props}
74+
>
75+
{typeof content === 'string' ? <RenderMarkdownTooltip content={content} /> : content}
76+
</Popover>
77+
</>
78+
);
79+
}
80+
81+
export default HelperTextPopover;
82+
export type { HelperTextPopoverProps };

0 commit comments

Comments
 (0)