Skip to content

#69 Update Atlas Navigation #70

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
66 changes: 51 additions & 15 deletions src/components/Toolbar/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import InfoOutlinedIcon from '@material-ui/icons/InfoOutlined'
import ImageSearchIcon from '@material-ui/icons/ImageSearch'
import AccountTreeIcon from '@material-ui/icons/AccountTree'
import ShoppingCartOutlinedIcon from '@material-ui/icons/ShoppingCartOutlined'
import OpenInNewIcon from '@material-ui/icons/OpenInNew'

import {
setModal,
Expand All @@ -42,7 +43,7 @@ import {

import { publicUrl, HASH_PATHS } from '../../core/constants'

const drawerWidth = 220
const drawerWidth = 230

const useStyles = makeStyles((theme) => ({
Toolbar: {
Expand Down Expand Up @@ -230,7 +231,7 @@ const useStyles = makeStyles((theme) => ({
const drawerItems = [
{
name: 'Home',
path: '/',
path: 'https://pds-imaging.jpl.nasa.gov/',
},
{
name: 'Atlas',
Expand All @@ -253,28 +254,44 @@ const drawerItems = [
showLength: true,
},
{
name: 'News',
path: '/news',
name: 'Documentation',
path: '/documentation',
isAtlas: true,
},
{
name: 'Missions',
path: '/missions',
name: 'Data',
isHeader: true,
},
{
name: 'Tools',
path: '/tools',
name: 'Volumes',
path: 'https://pds-imaging.jpl.nasa.gov/volumes/',
isData: true,
},
{
name: 'Documentation',
path: '/documentation',
name: 'Holdings',
path: 'https://pds-imaging.jpl.nasa.gov/holdings/',
isData: true,
},
{
name: 'Portal',
path: 'https://pds-imaging.jpl.nasa.gov/portal/',
isData: true,
},
{
name: 'PDS',
isHeader: true,
},
{
name: 'Help',
path: '/help',
name: 'Home',
path: 'https://pds.nasa.gov/',
isPDS: true,
isExternal: true,
},
{
name: 'About',
path: '/about',
name: 'Release Calendar',
path: 'https://pds.nasa.gov/datasearch/subscription-service/data-release-calendar.shtml',
isPDS: true,
isExternal: true,
},
]

Expand Down Expand Up @@ -338,7 +355,7 @@ const Toolbar = (props) => {
<ListItem
className={clsx(c.listItem, {
[c.listItemNoClick]: item.isHeader,
[c.listIndent]: item.isAtlas,
[c.listIndent]: item.isAtlas || item.isData || item.isPDS,
})}
key={idx}
>
Expand All @@ -357,6 +374,7 @@ const Toolbar = (props) => {
history.push(`${item.path}`)
}
}}
target="__blank"
href={item.path}
rel="noopener"
>
Expand All @@ -375,6 +393,24 @@ const Toolbar = (props) => {
<ShoppingCartOutlinedIcon />
</div>
)}
{item.name === 'Documentation' && (
<div className={c.navIcon}>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
style={{
fill: 'currentColor',
}}
>
<path d="M7 7H5A2 2 0 0 0 3 9V17H5V13H7V17H9V9A2 2 0 0 0 7 7M7 11H5V9H7M14 7H10V17H12V13H14A2 2 0 0 0 16 11V9A2 2 0 0 0 14 7M14 11H12V9H14M20 9V15H21V17H17V15H18V9H17V7H21V9Z" />
</svg>
</div>
)}
{item.isExternal && (
<div className={c.navIcon}>
<OpenInNewIcon />
</div>
)}
<ListItemText primary={item.name}> </ListItemText>
{item.showLength && cartLength > 0 ? (
<div className={c.cartLength}>
Expand Down
15 changes: 8 additions & 7 deletions src/pages/Search/Modals/InformationModal/InformationModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ const useStyles = makeStyles((theme) => ({
message: {
margin: `${theme.spacing(4)}px 0px`,
},
feedback: {
aLink: {
color: 'link',
cursor: 'pointer',
textDecoration: 'underline',
fontWeight: 'bold',
},
metadata: {
'& > p': {
Expand Down Expand Up @@ -152,7 +153,7 @@ const InformationModal = (props) => {
dispatch(setModal('feedback'))
}

const newsPath = `${(publicUrl != null && publicUrl.length > 0 ? publicUrl : '') + '/news'}`
const newsPath = `https://pds-imaging.jpl.nasa.gov/`

return (
<Dialog
Expand Down Expand Up @@ -201,18 +202,18 @@ const InformationModal = (props) => {
data products that have been collected from a variety NASA's planetary
space missions. Through the use of these tools, users have access to
petabytes of imaging data in one central location. This collection of
data is updated periodically and is reported on our{' '}
<a href={newsPath} rel="noopener">
news
data is updated periodically and is reported within the{' '}
<a className={c.aLink} href={newsPath} rel="noopener">
Latest News
</a>{' '}
page.
section of our home page.
</Typography>
</div>
<div className={c.message}>
<Typography>
If you have questions, want to share feedback, or need support,{' '}
<a
className={c.feedback}
className={c.aLink}
aria-label="give feedback"
onClick={openFeedback}
>
Expand Down
Loading