Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
9613f6e
Merge pull request #100 from MetaCell/feature/refactoring
Salam-Dalloul Oct 1, 2025
efd3def
#DKN-208 update results page style
Salam-Dalloul Oct 2, 2025
e55e93c
Merge pull request #101 from MetaCell/feature/DKN-204
ddelpiano Oct 3, 2025
c3c4b74
update results page style
Salam-Dalloul Oct 3, 2025
23f56d6
add scroll to bottom overlay
Salam-Dalloul Oct 3, 2025
cbd88aa
update app header
Salam-Dalloul Oct 4, 2025
8ea7d82
add empty state
Salam-Dalloul Oct 4, 2025
16f60db
update responsive config
Salam-Dalloul Oct 5, 2025
621a94d
tidy up code for better readability
Salam-Dalloul Oct 5, 2025
177fb35
add missing space
Salam-Dalloul Oct 5, 2025
8460e9a
update results button disable condition
Salam-Dalloul Oct 5, 2025
aaaa886
fix responsive style
Salam-Dalloul Oct 7, 2025
f64269c
updae responsive style
Salam-Dalloul Oct 8, 2025
17d7f43
Merge pull request #104 from MetaCell/feature/DKN-208
ddelpiano Oct 9, 2025
96c73be
Merge branch 'develop' into feature/DKN-206
Salam-Dalloul Oct 9, 2025
de82466
Merge remote-tracking branch 'origin/feature/DKN-206' into feature/DK…
Salam-Dalloul Oct 9, 2025
ea32684
fix code dulicates
Salam-Dalloul Oct 9, 2025
5e52c5e
update isTopMatch to consider undefined arrays
Salam-Dalloul Oct 9, 2025
0dba2aa
update best match check
Salam-Dalloul Oct 9, 2025
7545c41
move scror display check to a separated function
Salam-Dalloul Oct 9, 2025
a84008c
update responsive style for header
Salam-Dalloul Oct 9, 2025
f411045
Merge branch 'feature/DKN-205' into feature/DKN-206
Salam-Dalloul Oct 10, 2025
d332ae4
nav reset redirects to the home page
Salam-Dalloul Oct 10, 2025
a32281a
add a currentView flag to better distinguish between luch and repos p…
Salam-Dalloul Oct 10, 2025
aeafdfd
open FiltersAssistantDialog when reset query clicked
Salam-Dalloul Oct 10, 2025
f32a083
reslve comments
Salam-Dalloul Oct 10, 2025
0b08513
update isTopMatch check
Salam-Dalloul Oct 10, 2025
2a920b4
go abck to the first question after reset filters
Salam-Dalloul Oct 14, 2025
ec7476b
update tooltips
Salam-Dalloul Oct 14, 2025
8e51931
align show/hide scroll to top and floating cuttons
Salam-Dalloul Oct 14, 2025
50fd682
fix filtering/resetting issue
Salam-Dalloul Oct 14, 2025
98c3d2e
hide scroll to explore when having less results
Salam-Dalloul Oct 14, 2025
7071b66
extend the sort by click to the whole menu item
Salam-Dalloul Oct 14, 2025
e8123fc
fix scrolling issue + scroll to the question when clicking next in sm…
Salam-Dalloul Oct 16, 2025
e2a2dff
fix options click issue
Salam-Dalloul Oct 16, 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
21 changes: 5 additions & 16 deletions applications/dknet/frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import theme from './theme/Theme'
import { FilterProvider } from './context/Context'

//components
import Box from '@mui/material/Box'
import { CssBaseline } from "@mui/material"
import HomePage from './pages/HomePage'
import ScrollToTop from './components/ScrollTop'
import ResponsiveWrapper from './components/ResponsiveWrapper'


const App = () => {

return (
Expand All @@ -19,21 +19,10 @@ const App = () => {
<ResponsiveWrapper>
<FilterProvider>
<CssBaseline />
<Box sx={{
overflow: {
xs: "auto",
},
}}
display="flex"
overflow="auto"
>
<Box flex={1} display="flex" flexDirection="column" id='main-container'>
<Routes>
<Route path="/" element={<HomePage />} />
</Routes>
</Box>
</Box>
<ScrollToTop/>
<Routes>
<Route path="/" element={<HomePage />} />
</Routes>
<ScrollToTop />
</FilterProvider>
</ResponsiveWrapper>
</ThemeProvider>
Expand Down
50 changes: 25 additions & 25 deletions applications/dknet/frontend/src/Layouts/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ import React from 'react';
import Header from "../components/Header";
import Container from '@mui/material/Container';
import Button from '@mui/material/Button';
import { Box, Grid, Typography } from "@mui/material";
import { Box, Grid, Stack, Typography } from "@mui/material";
import FiltersAssistantDialog from "../components/FilterAssistantDialog/FiltersAssistantDialog";
import { useFilterContext } from "../context/Context";
import { useResponsive } from "../hooks/useResponsive";
import { RESPONSIVE_BREAKPOINTS } from '../utils/constants';
import { useResponsive } from '../hooks/useResponsive';

const MainLayout = ({ children }) => {
const [open, setOpen] = React.useState(false);
const { context } = useFilterContext();
const { allRepositories, allFilters } = context;
const { allRepositories, allFilters, showAll } = context;
const { screenSize } = useResponsive();
const isFiltersEmpty = Object.values(context.filterValues).every(value => value === undefined);

const viewFilterAssistant = () => {
setOpen(true);
Expand All @@ -30,30 +32,28 @@ const MainLayout = ({ children }) => {
}}>
<Container>
<Header />
<Grid container spacing={2} justifyContent='center' textAlign='center' mt={8}>
<Grid item xs={12} sm={8}>
<Typography variant='h1'>Find the right repository for your data.</Typography>
<Typography fontWeight='normal' fontSize='1rem' variant='subtitle1'>Explore, filter and find the best repositories for your data and needs.</Typography>
</Grid>
{
(allRepositories.length === 0 && allFilters.length === 0 ? <></> : (
<>
<Grid item xs={12} display="flex" justifyContent="center">
<Button variant='contained' onClick={viewFilterAssistant} sx={{ width: '16.5rem', height: '3.75rem', fontSize: '1rem' }}>Click Here To Get Started</Button>
</Grid>
<Grid item xs={12} sm={8}>
<Box mt={2} display='flex' alignItems='center' flexDirection='column' gap={1.5} justifyContent='center' width={1}>
<Typography variant='subtitle2' mr={1}>You will be asked a series of questions based on your data requirements and priorities</Typography>
</Box>
</Grid>
</>
))
}
</Grid>
{
(allRepositories.length === 0 && allFilters.length === 0) || (!isFiltersEmpty || showAll) ? <></> : (
<Grid container spacing={2} justifyContent='center' textAlign='center' mt={screenSize === RESPONSIVE_BREAKPOINTS.TABLET ? 4 : 8}>
<Grid item xs={12} sm={8}>
<Stack spacing={1}>
<Typography variant='h1'>Find the right repository for your data.</Typography>
<Typography variant='subtitle2'>Explore, filter and find the best repositories for your data and needs.</Typography>
</Stack>
</Grid>
<Grid item xs={12} display="flex" justifyContent="center">
<Button variant='contained' onClick={viewFilterAssistant} sx={{ width: '16.5rem', height: '3.75rem', fontSize: '1rem' }}>Click Here To Get Started</Button>
</Grid>
<Grid item xs={12} sm={8}>
<Typography variant='subtitle2' textAlign='center'>You will be asked a series of questions based on your data requirements and priorities</Typography>
</Grid>
</Grid>
)
}
</Container>
<Box
pt={9}
pb={9}
pt={4}
pb={4}
>
{children}
</Box>
Expand Down
Loading