Skip to content

add announcement page #103

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

Merged
merged 31 commits into from
May 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8c926c3
add announcement page
AbdelHedhili Apr 14, 2025
58234b5
Merge branch 'main' into add_announcement_page
AbdelHedhili Apr 14, 2025
80c4b97
fix ts
AbdelHedhili Apr 14, 2025
f2319fd
Merge branch 'main' into add_announcement_page
AbdelHedhili Apr 15, 2025
2f7cc0f
remove useless code
AbdelHedhili Apr 15, 2025
df890ec
Merge branch 'main' into add_announcement_page
AbdelHedhili Apr 15, 2025
6ae929a
listen for announcement
AbdelHedhili Apr 15, 2025
88cb9b1
minor refacto
AbdelHedhili Apr 15, 2025
45c4150
Merge branch 'main' into add_announcement_page
AbdelHedhili Apr 15, 2025
5c3de38
refactor: use useGlobalAnnouncement
TheMaskedTurtle Apr 18, 2025
d30fcf2
feat: use useGlobalAnnouncement
TheMaskedTurtle Apr 18, 2025
4a36ae2
fix: websocket url replacement method
TheMaskedTurtle Apr 18, 2025
250abb4
Merge remote-tracking branch 'origin/main' into add_announcement_page
Tristan-WorkGH Apr 25, 2025
04a66a6
Update commons-ui
Tristan-WorkGH Apr 25, 2025
99134f3
rename banner to announcement
Tristan-WorkGH Apr 25, 2025
38512e2
Fix date library and timezone management
Tristan-WorkGH Apr 27, 2025
f41fe51
Resolve bad import of `@mui/x-date-pickers` to `date-fns` internal file
Tristan-WorkGH Apr 28, 2025
697c708
big review
Tristan-WorkGH May 2, 2025
7d06097
clean
Tristan-WorkGH May 2, 2025
f442311
Fix DateFns conflict with hook-form
Tristan-WorkGH May 2, 2025
196bbe5
fixing page design & form validation
Tristan-WorkGH May 2, 2025
8782889
update
Tristan-WorkGH May 2, 2025
dadc9f3
fix mime type
Tristan-WorkGH May 2, 2025
ef74ff5
design fix
Tristan-WorkGH May 2, 2025
5fb0160
Merge branch 'main' into add_announcement_page
Tristan-WorkGH May 5, 2025
cc5aa4f
review
Tristan-WorkGH May 14, 2025
3603d13
Merge remote-tracking branch 'origin/main' into add_announcement_page
Tristan-WorkGH May 14, 2025
d16a0ee
review
Tristan-WorkGH May 14, 2025
bd29d6d
Merge remote-tracking branch 'origin/main' into add_announcement_page
Tristan-WorkGH May 15, 2025
18cd5a5
update
Tristan-WorkGH May 15, 2025
c4e8793
fix import
Tristan-WorkGH May 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
190 changes: 177 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,24 @@
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@gridsuite/commons-ui": "0.95.0",
"@gridsuite/commons-ui": "0.100.0",
"@hookform/resolvers": "^4.0.0",
"@mui/icons-material": "^5.16.14",
"@mui/lab": "5.0.0-alpha.175",
"@mui/material": "^5.16.14",
"@mui/x-date-pickers": "^7.29.3",
"@mui/x-tree-view": "^7.28.1",
"@reduxjs/toolkit": "^2.5.1",
"ag-grid-community": "^33.1.0",
"ag-grid-react": "^33.1.0",
"core-js": "^3.40.0",
"date-fns": "^4.1.0",
"notistack": "^3.0.2",
"oidc-client": "^1.11.5",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.54.2",
"react-hook-form-mui": "^7.6.0",
"react-intl": "^7.1.6",
"react-redux": "^9.2.0",
"react-router": "^7.4.1",
Expand Down
17 changes: 16 additions & 1 deletion src/components/App/app-top-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
useState,
} from 'react';
import { capitalize, Tab, Tabs, useTheme } from '@mui/material';
import { Groups, ManageAccounts, PeopleAlt } from '@mui/icons-material';
import { Groups, ManageAccounts, NotificationImportant, PeopleAlt } from '@mui/icons-material';
import { fetchAppsMetadata, logout, Metadata, TopBar } from '@gridsuite/commons-ui';
import { useParameterState } from '../parameters';
import { APP_NAME, PARAM_LANGUAGE, PARAM_THEME } from '../../utils/config-params';
Expand Down Expand Up @@ -73,6 +73,20 @@ const tabs = new Map<MainPaths, ReactElement>([
))}
/>,
],
[
MainPaths.announcements,
<Tab
icon={<NotificationImportant />}
label={<FormattedMessage id="appBar.tabs.warningBanner" />}
href={`/${MainPaths.announcements}`}
value={MainPaths.announcements}
key={`tab-${MainPaths.announcements}`}
iconPosition="start"
LinkComponent={forwardRef<HTMLAnchorElement, AnchorHTMLAttributes<HTMLAnchorElement>>((props, ref) => (
<NavLink ref={ref} to={props.href as To} {...props} />
))}
/>,
],
]);

const AppTopBar: FunctionComponent = () => {
Expand All @@ -96,6 +110,7 @@ const AppTopBar: FunctionComponent = () => {
const [languageLocal, handleChangeLanguage] = useParameterState(PARAM_LANGUAGE);

const [appsAndUrls, setAppsAndUrls] = useState<Metadata[]>([]);

useEffect(() => {
if (user !== null) {
fetchAppsMetadata().then((res) => {
Expand Down
Loading
Loading