Copilot commented on code in PR #9997:
URL: https://github.com/apache/gravitino/pull/9997#discussion_r2802921890
##########
web/web/src/app/rootLayout/Layout.js:
##########
@@ -35,9 +37,45 @@ const DynamicMainContent = dynamic(() =>
import('./MainContent'), {
})
const Layout = ({ children, scrollToTop }) => {
+ const [showNotice, setShowNotice] = useState(true)
Review Comment:
The notice dismissal state doesn't persist across page refreshes. Users will
see the notice again every time they reload the page or navigate back, which
could be annoying. Consider using localStorage to persist the dismissed state,
similar to how it's used elsewhere in the codebase (e.g., in
lib/store/auth/index.js for auth state).
##########
web/web/src/app/rootLayout/Layout.js:
##########
@@ -35,9 +37,45 @@ const DynamicMainContent = dynamic(() =>
import('./MainContent'), {
})
const Layout = ({ children, scrollToTop }) => {
+ const [showNotice, setShowNotice] = useState(true)
+
return (
<div className={'layout-wrapper twc-h-full twc-flex twc-overflow-clip'}>
<Box className={'layout-content-wrapper twc-flex twc-grow
twc-min-h-[100vh] twc-min-w-0 twc-flex-col'}>
+ {showNotice && (
+ <Box
+ sx={{
+ position: 'fixed',
+ top: 16,
+ right: 16,
+ zIndex: 1200,
+ maxWidth: 520
+ }}
+ >
+ <Paper variant='outlined' sx={{ p: 4, bgcolor: '#fff', boxShadow:
'0 4px 12px rgba(0, 0, 0, 0.12)' }}>
+ <Stack direction='row' spacing={1.5} alignItems='flex-start'>
+ <Box sx={{ flex: 1 }}>
+ <Typography variant='body2' component='div'>
+ <Box component='span' sx={{ fontWeight: 600 }}>
+ Welcome to Web V2 UI.
Review Comment:
The heading "Welcome to Web V2 UI." is misleading since this message is
being shown ON the web v1 UI to encourage users to switch. Consider changing it
to something like "Try the new Web V2 UI" or "Switch to Web V2 UI" to make it
clear this is a prompt to upgrade, not a welcome message for users already on
v2.
```suggestion
Try the new Web V2 UI.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]