-
Notifications
You must be signed in to change notification settings - Fork 149
refactor: Streams to make homepage startup instantly #1232
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
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
b24133d
refactor: Streams to make homepage startup instantly
ckniffen 8146e4d
remove unused code at the homepage top level.
ckniffen 7ebc6c7
fix linting and get rid of extra key props
ckniffen 24ffa7e
remove empty space and fix bug introduced when addressing linting.
ckniffen bdc43f1
add validator pages
ckniffen ad026fd
refetch and useQuery
ckniffen 46fe093
metrics to leverage useQueries, group metric updates
ckniffen d0701fd
fix animations
ckniffen 5431387
clean up imports
ckniffen af046cb
fix typo
ckniffen a2e6592
fix linting
ckniffen f24e3f3
type fixes
ckniffen a3a7a4c
Update src/containers/shared/components/Streams/StreamsProvider.tsx
ckniffen 5573522
update and fix 10 failing tests
ckeshava 76cf165
fix linter errors; add more test assertions in LedgersPage test
ckeshava 6f42f8f
fix tests
ckniffen edc085f
fix test better
ckniffen 7b7de4e
fix
ckniffen 5ed5e58
1. Fix all the failing tests in the Explorer
ckeshava 399acbf
Merge remote-tracking branch 'origin/staging' into refactor/streams-t…
ckeshava 36929ac
update the lock file
ckeshava 452fb55
fix: Update legacy jest matchers with newer method names. There is no…
ckeshava 9a3be32
revert package file to match staging branch
ckeshava 6ccdb1f
Merge branch 'staging' into refactor/streams-take-3
ckeshava b638fe7
remove ToolTipProvider from LedgersPage component
ckeshava b748b23
fix: Rectify key errors in ValidatorsTable component
ckeshava 237c3a8
remove extraneous use of ToolTipprovider in Validators container
ckeshava 317cc67
Merge branch 'staging' into refactor/streams-take-3
ckeshava 41e4388
fix linter errors: remove console stmt
ckeshava 37babbd
Merge branch 'refactor/streams-take-3' of https://github.com/ripple/e…
ckeshava 9ffcccb
fix linter errors
ckeshava a83db2b
revert changes pertaining to LedgerCountBanner; This is a temporary c…
ckeshava dd6371b
[address PR feedback] change var name: ValidatorsPage -> Validators
ckeshava 7dcf83f
[PR feedback] fix the opacity of background in LedgerHash component
ckeshava 2cc86ce
fix: updated comments in StreamsProvider component
ckeshava 6802275
Merge branch 'staging' into refactor/streams-take-3
ckeshava 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
This file was deleted.
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 |
|---|---|---|
| @@ -1,47 +1,51 @@ | ||
| import classNames from 'classnames' | ||
| import { useSelectedValidator } from './useSelectedValidator' | ||
| import { useTooltip } from '../shared/components/Tooltip' | ||
| import { ValidatorResponse } from './types' | ||
| import { useVHSValidators } from '../shared/components/VHSValidators' | ||
| import { LedgerValidation } from '../shared/components/Streams' | ||
|
|
||
| export const LedgerEntryValidator = ({ | ||
| validator, | ||
| validators, | ||
| validation, | ||
| index, | ||
| }: { | ||
| validator: any | ||
| validators: { [pubkey: string]: ValidatorResponse } | ||
| validation: LedgerValidation | ||
| index: number | ||
| }) => { | ||
| const { validators } = useVHSValidators() | ||
| const { showTooltip, hideTooltip } = useTooltip() | ||
| const { selectedValidator, setSelectedValidator } = useSelectedValidator() | ||
|
|
||
| const trusted = validator.unl ? 'trusted' : '' | ||
| const unselected = selectedValidator ? 'unselected' : '' | ||
| const selected = selectedValidator === validator.pubkey ? 'selected' : '' | ||
| const className = `validation ${trusted} ${unselected} ${selected} ${validator.pubkey}` | ||
| const partial = validator.partial ? <div className="partial" /> : null | ||
| const className = classNames( | ||
| 'validation', | ||
| validators?.[validation.validation_public_key]?.unl && 'trusted', | ||
| selectedValidator && 'unselected', | ||
| selectedValidator === validation.validation_public_key && 'selected', | ||
| validation.validation_public_key, | ||
| ) | ||
|
|
||
| return ( | ||
| <div | ||
| key={`${validator.pubkey}_${validator.cookie}`} | ||
| role="button" | ||
| tabIndex={index} | ||
| className={className} | ||
| onMouseOver={(e) => | ||
| showTooltip('validator', e, { | ||
| ...validator, | ||
| v: validators[validator.pubkey], | ||
| ...validation, | ||
| v: validators?.[validation.validation_public_key], | ||
| }) | ||
| } | ||
| onFocus={() => {}} | ||
| onKeyUp={() => {}} | ||
| onMouseLeave={() => hideTooltip()} | ||
| onClick={() => | ||
| setSelectedValidator( | ||
| selectedValidator === validator.pubkey ? undefined : validator.pubkey, | ||
| selectedValidator === validation.validation_public_key | ||
| ? undefined | ||
| : validation.validation_public_key, | ||
| ) | ||
| } | ||
| > | ||
| {partial} | ||
| {validation.partial && <div className="partial" />} | ||
| </div> | ||
| ) | ||
| } |
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.