Skip to content

Commit

Permalink
remove dev tools and make transition smoother
Browse files Browse the repository at this point in the history
  • Loading branch information
satellitestudiodesign committed Jun 6, 2024
1 parent 65fd665 commit 52fb05c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions apps/image-labeler/src/features/project/Project.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function Project() {
(taskId: string) => {
const currentIndex = data.findIndex((task) => task.id === taskId)
setActiveTaskId(data[currentIndex + 1]?.id)
window.scrollTo(0, window.scrollY + 71)
window.scrollBy({ top: 71, behavior: 'smooth' })
},
[data, setActiveTaskId]
)
Expand All @@ -75,7 +75,7 @@ export function Project() {

return (
<div className={styles.project}>
<h1 className={styles.pageTitle}>{taskData.metadata.name}</h1>
<h1 className={styles.pageTitle}>Project: {taskData.metadata.name}</h1>
<div className={styles.projectInfo}>
<div className={styles.projectInfoItem}>
<label>Big Query Table</label>
Expand Down
9 changes: 7 additions & 2 deletions apps/image-labeler/src/features/project/Task.module.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
.task {
height: 7.1rem;
border: var(--border);
border-bottom: none;
padding: var(--space-S);
display: flex;
align-items: center;
justify-content: space-between;
transition: all 0.2s ease-out;
}

.task:not(.open) {
Expand All @@ -16,16 +18,19 @@
}

.open {
height: 70rem;
max-height: 70vh;
padding: var(--space-L);
flex-direction: column;
align-items: center;
gap: var(--space-S);
border: 1px solid var(--color-secondary-blue);
}

.images {
display: flex;
gap: var(--space-S);
transition: all 0.2s ease-in-out;
transition: all 0.2s ease-out;
width: 100%;
max-width: 11rem;
opacity: 0.5;
Expand All @@ -34,7 +39,7 @@
.images img {
width: 5rem;
background-color: var(--color-terthiary-blue);
transition: all 0.2s ease-in-out;
transition: all 0.2s ease-out;
}

.open .images {
Expand Down
10 changes: 2 additions & 8 deletions apps/image-labeler/src/routes/__root.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { createRootRoute, Outlet } from '@tanstack/react-router'
import { TanStackRouterDevtools } from '@tanstack/router-devtools'
import { Fragment, useCallback } from 'react'
import { useCallback } from 'react'
import { GFWAPI } from '@globalfishingwatch/api-client'
import { Spinner } from '@globalfishingwatch/ui-components/spinner'
import { useGFWLogin, useGFWLoginRedirect } from '@globalfishingwatch/react-hooks/use-login'
Expand Down Expand Up @@ -28,12 +27,7 @@ const RootComponent = () => {
)
}

return (
<Fragment>
<Outlet />
<TanStackRouterDevtools />
</Fragment>
)
return <Outlet />
}

export const Route = createRootRoute({
Expand Down

0 comments on commit 52fb05c

Please sign in to comment.