Skip to content

Commit 18e8a15

Browse files
gregaubertsonartech
authored andcommitted
SC-33636 Create new project sidebar with updated admin menu and project selector header (#3658)
GitOrigin-RevId: 89f3f5bc83470d99abeb93841b59006d8b6426d5
1 parent f9e0dab commit 18e8a15

File tree

8 files changed

+186
-14
lines changed

8 files changed

+186
-14
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* SonarQube
3+
* Copyright (C) 2009-2025 SonarSource SA
4+
* mailto:info AT sonarsource DOT com
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 3 of the License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19+
*/
20+
21+
import { Badge, BadgeProps, BadgeVariety } from '@sonarsource/echoes-react';
22+
import { forwardRef } from 'react';
23+
import { FormattedMessage } from 'react-intl';
24+
25+
type Props = Readonly<Pick<BadgeProps, 'className' | 'isInteractive'>>;
26+
27+
export const AdminBadge = forwardRef<HTMLButtonElement, Props>((props, ref) => {
28+
return (
29+
<Badge variety={BadgeVariety.Highlight} {...props} ref={ref}>
30+
<FormattedMessage id="admin" />
31+
</Badge>
32+
);
33+
});
34+
AdminBadge.displayName = 'AdminBadge';
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* SonarQube
3+
* Copyright (C) 2009-2025 SonarSource SA
4+
* mailto:info AT sonarsource DOT com
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 3 of the License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19+
*/
20+
21+
import { Badge, BadgeProps, BadgeVariety } from '@sonarsource/echoes-react';
22+
import { forwardRef } from 'react';
23+
import { FormattedMessage } from 'react-intl';
24+
25+
type Props = Readonly<Pick<BadgeProps, 'className' | 'isInteractive'>>;
26+
27+
export const AlphaBadge = forwardRef<HTMLButtonElement, Props>((props, ref) => {
28+
return (
29+
<Badge variety={BadgeVariety.Info} {...props} ref={ref}>
30+
<FormattedMessage id="alpha" />
31+
</Badge>
32+
);
33+
});
34+
AlphaBadge.displayName = 'AlphaBadge';
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* SonarQube
3+
* Copyright (C) 2009-2025 SonarSource SA
4+
* mailto:info AT sonarsource DOT com
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 3 of the License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19+
*/
20+
21+
import { Badge, BadgeProps, BadgeVariety } from '@sonarsource/echoes-react';
22+
import { forwardRef } from 'react';
23+
import { FormattedMessage } from 'react-intl';
24+
25+
type Props = Readonly<Pick<BadgeProps, 'className' | 'isInteractive'>>;
26+
27+
export const BetaBadge = forwardRef<HTMLButtonElement, Props>((props, ref) => {
28+
return (
29+
<Badge variety={BadgeVariety.Highlight} {...props} ref={ref}>
30+
<FormattedMessage id="beta" />
31+
</Badge>
32+
);
33+
});
34+
BetaBadge.displayName = 'BetaBadge';
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* SonarQube
3+
* Copyright (C) 2009-2025 SonarSource SA
4+
* mailto:info AT sonarsource DOT com
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 3 of the License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19+
*/
20+
21+
import { Badge, BadgeProps, BadgeVariety } from '@sonarsource/echoes-react';
22+
import { forwardRef } from 'react';
23+
import { FormattedMessage } from 'react-intl';
24+
25+
type Props = Readonly<Pick<BadgeProps, 'className' | 'isInteractive'>>;
26+
27+
export const MemberBadge = forwardRef<HTMLButtonElement, Props>((props, ref) => {
28+
return (
29+
<Badge variety={BadgeVariety.Neutral} {...props} ref={ref}>
30+
<FormattedMessage id="member" />
31+
</Badge>
32+
);
33+
});
34+
MemberBadge.displayName = 'MemberBadge';
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* SonarQube
3+
* Copyright (C) 2009-2025 SonarSource SA
4+
* mailto:info AT sonarsource DOT com
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 3 of the License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19+
*/
20+
21+
import { Badge, BadgeProps, BadgeVariety } from '@sonarsource/echoes-react';
22+
import { forwardRef } from 'react';
23+
import { FormattedMessage } from 'react-intl';
24+
25+
type Props = Readonly<Pick<BadgeProps, 'className' | 'isInteractive'>>;
26+
27+
export const NewBadge = forwardRef<HTMLButtonElement, Props>((props, ref) => {
28+
return (
29+
<Badge variety={BadgeVariety.Highlight} {...props} ref={ref}>
30+
<FormattedMessage id="new" />
31+
</Badge>
32+
);
33+
});
34+
NewBadge.displayName = 'NewBadge';

libs/sq-server-commons/src/l10n/default.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export const defaultMessages = {
3838
after: 'After',
3939
ai_code: 'AI Code',
4040
ai_code_assurance: 'AI CODE ASSURANCE',
41+
alpha: 'Alpha',
4142
apply: 'Apply',
4243
all: 'All',
4344
and: 'And',
@@ -52,7 +53,7 @@ export const defaultMessages = {
5253
backup: 'Backup',
5354
backup_verb: 'Back up',
5455
best: 'Best',
55-
beta: 'BETA',
56+
beta: 'Beta',
5657
blocker: 'Blocker',
5758
bold: 'Bold',
5859
branch: 'Branch',
@@ -171,6 +172,7 @@ export const defaultMessages = {
171172
max: 'Max',
172173
max_results_reached: 'Only the first {0} results are displayed',
173174
me: 'Me',
175+
member: 'Member',
174176
members: 'Members',
175177
menu: 'Menu',
176178
min: 'Min',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"@react-spring/web": "10.0.1",
6262
"@sentry/fullstory": "4.0.0",
6363
"@sentry/react": "10.11.0",
64-
"@sonarsource/echoes-react": "1.4.0",
64+
"@sonarsource/echoes-react": "1.5.0",
6565
"@stripe/react-stripe-js": "5.3.0",
6666
"@stripe/stripe-js": "8.2.0",
6767
"@tanstack/react-query": "5.56.2",

yarn.lock

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3192,9 +3192,9 @@ __metadata:
31923192
languageName: node
31933193
linkType: hard
31943194

3195-
"@mantine/core@patch:@mantine/core@7.12.2#./.yarn/patches/@mantine-core-npm-7.12.2-7aad505c0f.patch::locator=%40sonarsource%2Fechoes-react%40npm%3A1.4.0":
3195+
"@mantine/core@patch:@mantine/core@7.12.2#./.yarn/patches/@mantine-core-npm-7.12.2-7aad505c0f.patch::locator=%40sonarsource%2Fechoes-react%40npm%3A1.5.0":
31963196
version: 7.12.2
3197-
resolution: "@mantine/core@patch:@mantine/core@npm%3A7.12.2#./.yarn/patches/@mantine-core-npm-7.12.2-7aad505c0f.patch::version=7.12.2&hash=cab555&locator=%40sonarsource%2Fechoes-react%40npm%3A1.4.0"
3197+
resolution: "@mantine/core@patch:@mantine/core@npm%3A7.12.2#./.yarn/patches/@mantine-core-npm-7.12.2-7aad505c0f.patch::version=7.12.2&hash=cab555&locator=%40sonarsource%2Fechoes-react%40npm%3A1.5.0"
31983198
dependencies:
31993199
"@floating-ui/react": "npm:^0.26.9"
32003200
clsx: "npm:^2.1.1"
@@ -3219,10 +3219,10 @@ __metadata:
32193219
languageName: node
32203220
linkType: hard
32213221

3222-
"@material-symbols/font-400@npm:0.36.3":
3223-
version: 0.36.3
3224-
resolution: "@material-symbols/font-400@npm:0.36.3"
3225-
checksum: 10/01b72915a9f4785d14ce1e2c6741ce68d2b455fa7e4971b67b61fc63a2d67fc95fe5b9b09075d743aaa8fbbbfd9717e1e7cd39279720d760110c7c5ced796434
3222+
"@material-symbols/font-400@npm:0.38.0":
3223+
version: 0.38.0
3224+
resolution: "@material-symbols/font-400@npm:0.38.0"
3225+
checksum: 10/341933e08f2de19ad4d80597883f491e33ec1a3d4fc6063d0123c4027c32a8a11f9db6d5cf6b63d8cad3771529a06337ed86f37b7efc2274d2ae30cdab63ac33
32263226
languageName: node
32273227
linkType: hard
32283228

@@ -6082,13 +6082,13 @@ __metadata:
60826082
languageName: node
60836083
linkType: hard
60846084

6085-
"@sonarsource/echoes-react@npm:1.4.0":
6086-
version: 1.4.0
6087-
resolution: "@sonarsource/echoes-react@npm:1.4.0"
6085+
"@sonarsource/echoes-react@npm:1.5.0":
6086+
version: 1.5.0
6087+
resolution: "@sonarsource/echoes-react@npm:1.5.0"
60886088
dependencies:
60896089
"@mantine/core": "patch:@mantine/core@7.12.2#./.yarn/patches/@mantine-core-npm-7.12.2-7aad505c0f.patch"
60906090
"@mantine/hooks": "npm:7.12.2"
6091-
"@material-symbols/font-400": "npm:0.36.3"
6091+
"@material-symbols/font-400": "npm:0.38.0"
60926092
"@radix-ui/react-alert-dialog": "npm:1.1.15"
60936093
"@radix-ui/react-checkbox": "npm:1.3.3"
60946094
"@radix-ui/react-dialog": "npm:1.1.15"
@@ -6110,7 +6110,7 @@ __metadata:
61106110
react-dom: ^18.0.0
61116111
react-intl: ^6.0.0
61126112
react-router-dom: ^6.0.0
6113-
checksum: 10/4e5fd272be9079aad4faaa50980dbb971cf35478ac0983584d4ff61b27b8e416247e665fd27221d6fc45b19f021d7dc78e0efc856256d3d53aaed64af7fb912c
6113+
checksum: 10/1c78776933d2e429465fa59c8743c444d0ce7f8dd4920fc2a28871f4401933222e15ae6277af20f2f47a4de4e3d84ea9cca8d2da76dcd765bf45c8f9adff0d22
61146114
languageName: node
61156115
linkType: hard
61166116

@@ -20429,7 +20429,7 @@ __metadata:
2042920429
"@rollup/plugin-replace": "npm:6.0.2"
2043020430
"@sentry/fullstory": "npm:4.0.0"
2043120431
"@sentry/react": "npm:10.11.0"
20432-
"@sonarsource/echoes-react": "npm:1.4.0"
20432+
"@sonarsource/echoes-react": "npm:1.5.0"
2043320433
"@sprig-technologies/sprig-browser": "npm:2.34.0"
2043420434
"@stripe/react-stripe-js": "npm:5.3.0"
2043520435
"@stripe/stripe-js": "npm:8.2.0"

0 commit comments

Comments
 (0)