forked from HSLdevcom/OpenTripPlanner
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructuring of the layout of the UI. Moved generated arguments to l…
…eft side of screen and a lot of other minor changes.
- Loading branch information
Showing
32 changed files
with
1,344 additions
and
369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { CodegenConfig } from '@graphql-codegen/cli'; | ||
import * as path from 'node:path'; | ||
|
||
const config: CodegenConfig = { | ||
overwrite: true, | ||
schema: '../application/src/main/resources/org/opentripplanner/apis/transmodel/schema.graphql', | ||
documents: 'src/**/*.{ts,tsx}', | ||
generates: { | ||
'src/static/query/tripQuery.tsx': { | ||
plugins: [path.resolve(__dirname, './src/util/generate-queries.cjs')], | ||
}, | ||
'src/gql/query-arguments.json': { | ||
plugins: [path.resolve(__dirname, './src/util/generate-arguments.cjs')], | ||
config: { | ||
excludeDeprecated: true, // Ensure this is set to true | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import debugLayerIcon from '../../static/img/debug-layer.svg'; | ||
|
||
import { useState } from 'react'; | ||
|
||
type DebugLayerButtonProps = { | ||
onToggle: (isExpanded: boolean) => void; | ||
}; | ||
|
||
export default function DebugLayerButton({ onToggle }: DebugLayerButtonProps) { | ||
const [isExpanded, setIsExpanded] = useState(false); | ||
|
||
const handleClick = () => { | ||
const nextState = !isExpanded; | ||
setIsExpanded(nextState); | ||
onToggle(nextState); // Notify parent of the state change | ||
}; | ||
|
||
return ( | ||
<button | ||
style={{ | ||
cursor: 'pointer', | ||
border: 'none', | ||
background: 'none', | ||
textAlign: 'left', | ||
width: '100%', | ||
padding: "0", | ||
margin: "0", | ||
}} | ||
onClick={handleClick} | ||
> | ||
{isExpanded ? ( | ||
<span style={{ fontWeight: 'bold' }}>Debug Layers</span> | ||
) : ( | ||
<img | ||
src={debugLayerIcon} | ||
alt="Debug layer" | ||
title="Debug layer" | ||
style={{ width: '25px', height: '25px' }} | ||
/> | ||
)} | ||
</button> | ||
); | ||
} |
Oops, something went wrong.