-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add all routing parameters to debug UI #6370
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
Merged
leonardehrenfried
merged 23 commits into
opentripplanner:dev-2.x
from
entur:debug-client-dynamic-arguments
Jan 23, 2025
Merged
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
0440bac
Restructuring of the layout of the UI. Moved generated arguments to l…
a-limyr 3e74e7e
Forgotten fil
a-limyr 79cac16
Nested arguments, list arguments, layout changes, reset button, exclu…
a-limyr 821ec06
Merge branch 'dev-2.x' into debug-client-dynamic-arguments
a-limyr a994a51
Nested arguments, list arguments, layout changes, reset button, exclu…
a-limyr c25fab8
Fixed some styling
a-limyr df84af5
Fixed some styling
a-limyr 3e1abad
Fixed any type issues + some other things.
a-limyr c280d67
Merge branch 'dev-2.x' into debug-client-dynamic-arguments
a-limyr 46a094f
Keeping code up to date.
a-limyr fe18de1
Refactoring to remove use of "any" types.
a-limyr 71f4b71
Merge branch 'dev-2.x' into debug-client-dynamic-arguments
a-limyr 288d85e
Removed some debug statements and removed use of one any usage.
a-limyr 293339e
Changed logic to avoid generics with any.
a-limyr bbf8655
Fix React Hook useEffect warning and Fast refresh warning
a-limyr 4dc1a14
Refactor to avoid warning and a bit of clean-up.
a-limyr bc9edc2
Refactor to avoid warning and a bit of clean-up.
a-limyr 64e6e41
Refactor to make eslint happy
a-limyr d448c8b
Merge branch 'dev-2.x' into debug-client-dynamic-arguments
a-limyr 0b4f5d5
Some changes to formatting and a bit other minor changes.
a-limyr 1cf9024
Updates to ignore prettier formatting of generated file.
a-limyr 8e6d6f1
Fixed link from external to internal schema.
a-limyr 131f301
Added debug layer group toggle, minor style change and removed unused…
a-limyr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| node_modules/ | ||
| output/ | ||
| src/gql/ | ||
| src/static/query/tripQuery.tsx |
This file contains hidden or 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,16 @@ | ||
| import type { CodegenConfig } from '@graphql-codegen/cli'; | ||
|
|
||
| import * as path from 'node:path'; | ||
|
|
||
| const config: CodegenConfig = { | ||
| overwrite: true, | ||
| schema: 'https://otp2debug.dev.entur.org/otp/transmodel/v3/schema.graphql', | ||
| documents: 'src/**/*.{ts,tsx}', | ||
| generates: { | ||
| 'src/static/query/tripQuery.tsx': { | ||
| plugins: [path.resolve(__dirname, './src/util/generate-queries.cjs')], | ||
| }, | ||
| }, | ||
| }; | ||
|
|
||
| export default config; | ||
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,38 @@ | ||
| 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.