Skip to content
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

EDSC-4162: Create a Guided Tour For Users of Earthdata Search #1800

Open
wants to merge 44 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
fcb9950
EDSC-4162 Barebones tour code
dpesall Aug 20, 2024
6c36729
EDSC-4162 tour updates
dpesall Aug 26, 2024
7b4bf8a
EDSC-4162 Updating tour steps
dpesall Aug 29, 2024
2fdce14
EDSC-4162 Implenting tour changes
dpesall Sep 9, 2024
0a7817b
Merge remote-tracking branch 'origin/main' into EDSC-4162-2
dpesall Sep 9, 2024
7041a63
EDSC-4162 Updating tour steps
dpesall Sep 9, 2024
0bf61f9
EDSC-4162 Updating tour based on logged in status
dpesall Sep 10, 2024
f616159
EDSC-4162 Updating tour steps
dpesall Sep 11, 2024
fccbe18
EDSC-4162 Styling changes and auto-start of the tour for new users
dpesall Sep 11, 2024
a360160
EDSC-4162 ensuring tour loads after page mounts
dpesall Sep 11, 2024
f7e16aa
EDSC-4162 Updating tour and adding tests
dpesall Sep 12, 2024
d8c39c2
EDSC-4162 Styling changes
dpesall Sep 12, 2024
f5921cd
EDSC-4162 Syntax fixing
dpesall Sep 12, 2024
87c6497
EDSC-4162 Syntax fixes
dpesall Sep 12, 2024
19672aa
EDSC-4162 Syntax shuffling
dpesall Sep 12, 2024
8944a34
EDSC-4162 Adding Playwright test
dpesall Oct 2, 2024
0f3402a
EDSC-4162 Destructuring
dpesall Oct 2, 2024
4d5bfb0
EDSC-4162 Fixing failing test
dpesall Oct 3, 2024
8a96ff3
EDSC-4162 Fixing tests
dpesall Oct 3, 2024
f1787e2
EDSC-4162 Updating failing test
dpesall Oct 3, 2024
d6fb55b
EDSC-4162 Refactoring some files and adding feature toggle for tour
dpesall Oct 3, 2024
105a8b0
Merge branch 'main' into EDSC-4162-2
dpesall Oct 4, 2024
c609b3e
EDSC-4162 Adding test coverage
dpesall Oct 4, 2024
9fe1d8d
EDSC-4162 Updating tests
dpesall Oct 4, 2024
27ee181
EDSC-4162 Test coverage patch
dpesall Oct 4, 2024
e21245f
EDSC-4162 Test coverage
dpesall Oct 4, 2024
e95c29b
EDSC-4162 Sanity check
dpesall Oct 7, 2024
cb98ea3
EDSC-4162 Test coverage
dpesall Oct 7, 2024
e980751
EDSC-4162 Reverting test file
dpesall Oct 7, 2024
19fd52f
EDSC-4162 Moving jest testing
dpesall Oct 7, 2024
72c0dd7
EDSC-4162 Addressing PR feedback
dpesall Oct 7, 2024
c9ba111
EDSC-4162 Updating playwright test
dpesall Oct 7, 2024
700a0c7
EDSC-4162 Consolidating css
dpesall Oct 7, 2024
0b24769
Merge branch 'main' into EDSC-4162-2
dpesall Oct 7, 2024
ddc810e
EDSC-4162 Code cleanup
dpesall Oct 8, 2024
783c43f
EDSC-4162 Removing unused file
dpesall Oct 8, 2024
263335e
EDSC-4162 style adjustments
dpesall Oct 8, 2024
147972d
EDSC-4162 addressing feedback
dpesall Oct 9, 2024
8b63cca
EDSC-4162 Adding ContextProviders
dpesall Oct 9, 2024
eb975a7
EDSC-4162 Uncommitting in progress file
dpesall Oct 9, 2024
405a378
EDSC-4162 Removing tour breadcrubs
dpesall Oct 9, 2024
26fe840
EDSC-4162 localhost change
dpesall Oct 10, 2024
5293584
EDSC-4162 Updating styling
dpesall Oct 10, 2024
878cd81
Merge branch 'main' into EDSC-4162-2
dpesall Oct 10, 2024
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
266 changes: 263 additions & 3 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
"react-helmet": "^6.1.0",
"react-icons": "^4.3.1",
"react-input-range": "^1.3.0",
"react-joyride": "^2.8.2",
"react-leaflet": "^4.2.0",
"react-leaflet-custom-control": "^1.3.5",
"react-leaflet-draw": "^0.20.4",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 24 additions & 2 deletions static/src/js/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import MetricsEventsContainer from './containers/MetricsEventsContainer/MetricsEventsContainer'
import NotFound from './components/Errors/NotFound'
import PortalContainer from './containers/PortalContainer/PortalContainer'
import SearchTour from './components/Tour/SearchTour'
import ShapefileDropzoneContainer from './containers/ShapefileDropzoneContainer/ShapefileDropzoneContainer'
import ShapefileUploadModalContainer from './containers/ShapefileUploadModalContainer/ShapefileUploadModalContainer'
import Spinner from './components/Spinner/Spinner'
Expand Down Expand Up @@ -72,12 +73,32 @@
class App extends Component {
constructor(props) {
super(props)
this.state = {}
this.state = {
runTour: false
}

this.store = configureStore()
const { edscHost } = getEnvironmentConfig()
const { env } = getApplicationConfig()
this.edscHost = edscHost
this.env = env
this.startTour = this.startTour.bind(this)
this.setRunTour = this.setRunTour.bind(this)
}

componentDidMount() {
const dontShowTour = localStorage.getItem('dontShowTour') !== 'true'
this.setState({
runTour: dontShowTour
})
}

setRunTour(value) {
this.setState({ runTour: value })
}

startTour() {
this.setState({ runTour: true })
}

// Portal paths have been removed, but this needs to stay in order to redirect users using
Expand Down Expand Up @@ -119,7 +140,7 @@
<ErrorBannerContainer />
<AuthTokenContainer>
<UrlQueryContainer>
<AppHeader />
<AppHeader onStartTour={this.startTour} />
<Switch>
<Route
path="/admin"
Expand Down Expand Up @@ -210,6 +231,7 @@
render={
() => (
<>
<SearchTour runTour={this.state.runTour} setRunTour={this.setRunTour} />

Check failure on line 234 in static/src/js/App.jsx

View workflow job for this annotation

GitHub Actions / eslint (lts/hydrogen)

Must use destructuring state assignment
<Search />
<Suspense fallback={<Spinner type="dots" className="root__spinner spinner spinner--dots spinner--white spinner--small" />}>
<EdscMapContainer />
Expand Down
9 changes: 7 additions & 2 deletions static/src/js/components/AppHeader/AppHeader.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import React from 'react'
import PropTypes from 'prop-types'

import SecondaryToolbarContainer
from '../../containers/SecondaryToolbarContainer/SecondaryToolbarContainer'
import AppLogoContainer from '../../containers/AppLogoContainer/AppLogoContainer'

import './AppHeader.scss'

const AppHeader = () => (
const AppHeader = ({ onStartTour }) => (
<header className="app-header">
<AppLogoContainer />
<SecondaryToolbarContainer />
<SecondaryToolbarContainer onStartTour={onStartTour} />
</header>
)

AppHeader.propTypes = {
onStartTour: PropTypes.func.isRequired
}

export default AppHeader
1 change: 1 addition & 0 deletions static/src/js/components/Panels/Panels.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ export class Panels extends PureComponent {
<div className="panels__focused-meta">
{focusedMeta}
</div>
<div className="right-overlay" />
</section>
)
}
Expand Down
12 changes: 12 additions & 0 deletions static/src/js/components/Panels/Panels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,15 @@
pointer-events: none;
}
}

.right-overlay {
position: absolute;
top: 0;
bottom: 0;
right: 0;
z-index: 1000;
background-color: rgba(255, 255, 255, 0);
width: 4000px;
left: calc(100%);
pointer-events: none;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newline

16 changes: 15 additions & 1 deletion static/src/js/components/SecondaryToolbar/SecondaryToolbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ class SecondaryToolbar extends Component {
location,
retrieval = {},
secondaryToolbarEnabled,
ursProfile
ursProfile,
onStartTour
} = this.props

const { first_name: firstName = '' } = ursProfile
Expand Down Expand Up @@ -321,6 +322,18 @@ class SecondaryToolbar extends Component {
onToggle={this.onToggleProjectDropdown}
alignRight
>
{
location.pathname === '/search' && (
<Dropdown.Toggle
className="secondary-toolbar__begin-tour-button"
as={Button}
onClick={onStartTour}
label="Want to learn more? Click here to take a tour of our site."
>
Start Tour
</Dropdown.Toggle>
)
}
<Dropdown.Toggle
className="secondary-toolbar__project-name-dropdown-toggle"
as={Button}
Expand Down Expand Up @@ -389,6 +402,7 @@ SecondaryToolbar.propTypes = {
earthdataEnvironment: PropTypes.string.isRequired,
location: locationPropType.isRequired,
onLogout: PropTypes.func.isRequired,
onStartTour: PropTypes.bool.isRequired,
onUpdateProjectName: PropTypes.func.isRequired,
projectCollectionIds: PropTypes.arrayOf(PropTypes.string).isRequired,
retrieval: PropTypes.shape({}).isRequired,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
}
}

&__begin-tour-button,
&__project-name-dropdown-toggle {
&:after {
display: none;
Expand All @@ -43,6 +44,7 @@
&__project,
&__login,
&__project-name-dropdown-toggle,
&__begin-tour-button,
&__user-dropdown-toggle {
position: relative;
padding: 0 1rem;
Expand Down Expand Up @@ -71,6 +73,7 @@
margin-right: 0.5rem;
}

&__begin-tour-button,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to start-tour-button

&__project-name-dropdown-toggle {
&:after {
display: none;
Expand Down
Loading
Loading