cardano-foundation / cardano-explorer-app Goto Github PK
View Code? Open in Web Editor NEWCardano Explorer App
License: Apache License 2.0
Cardano Explorer App
License: Apache License 2.0
Currently the styles are randomly breaking in dev mode … that's a known issue with a specific webpack bug and next.js - this can be fixed in development with a workaround.
Currently the no results component sometimes flashes in although the search result is still being fetched.
It would be good to do a quick pass over the codebase and upgrade any old cases of guarding
Some blocks were not created in slots, and do not have numbers. Instead of null
, show -
When the network indicates a change, only the missing blocks or epochs should be fetched
The current implementation was done with some modelling errors that have manifested into a component that's unusable without rework.
It's a client-side translation to represent Lovelaces as Ada, but right now they are displayed without the conversion.
We should introduce API methods that transform the received data to be consumable by the app … currently we do that within the stores and that's actually not very smart (e.g it wouldn't allow us to switch to another API implementation easily)
For epoch overview we shouldn’t have “show more” as we are already on the “show more” step. Here we should have paginator https://zpl.io/25yl840 (amount of results is not yet decided… I guess it would be something like 25 or 50)
Epoch show more shows only 6 rows per page… let’s use at least 25 or 50
Not sure if tree-shaking is part of the framework
import { get } from 'lodash';
import { get } from 'lodash.get';
The fetchDynamicInfo polling factor is hard coded as double the slot duration. The intention was half, so rather than update the calc, we should define an ENV that defaults to 1. This way the UI can be tweaked to gain control over the nearness of the real-time features.
@rhyslbw identified a few issues with the browsing feature:
There's a bug with the browse-* pages when the total of items is less than the page qty (eg epochs in the dev data set). It triggers an endless loop:
Need to drop the redirect to the "correct" url and just infer the corrected details from the given prams (this is already possible with the current logic)
... are not currently implemented. The animation was causing performance issues so was initially replaced with a screen shot, but has since been removed in #136 since it was just a placeholder.
The suggestion from @DominikGuzei is to render the animation as a video, and then use a static image in the smaller footprint mode.
• Epoch boundary slot leader -> EBB
• Ensure Genesis is included
The detail view might want to show the globally unique slot number, but for the list view it should be scoped to the epoch
@a-rukin has identified the following style issues:
"Show more" button hover and pressed states are wrong - https://zpl.io/V1840MJ reference
Footer: “Open source” link should have same hover effect as an email link
Block search result: Padding before “transactions” is missing
Transaction search result: Padding before “transactions” is missing. Plus in this case (tx overview) transaction hash shouldn’t be a link as it leads to the page we are currently viewing
In Ouroborus Classic there are (k * 10) + 1 blocks in an epoch, but by convention the EBB is usually ommitted from counts etc. The aggregate count should omit this by filtering out blocks with a null
number
Pagination is ideally naturally handled with Cardano GraphQL using a combination of limit, offset, and sort order, however with the current performance limitation we must select by number range.
Instead of referring to the NetworkInfo.store.currentEpoch, the starting point for generating the range should be determined by referencing the store array.
This has been implemented in Cardano GraphQL, but is unreleased.
It's a simple function, but makes sense to move it to the generic library, as we'll be using it anyway
Cardano GraphQL does not have an "address summary" query, as this is an application concept. Instead it offers a natural model to get the information that is what the explorer considers as Address Summary.
query searchForAddressSummary(
$address: String!
) {
utxos_aggregate (
where: {
address: {
_eq: $address
}
}
) {
aggregate {
sum {
value
}
}
}
transactions_aggregate (
where: {
outputs: {
address: {
_eq: $address
}
}
}
) {
aggregate {
count
}
}
}
Clicking the cardano logo in the top left should link to the home page
confirmations = NetworkInfo.blockHeight - transaction.block.number + 1
transactions_aggregate (
where: {
outputs: {
address: {
_eq: $address
}
}
}
) {
aggregate {
count
}
}
should be:
transactions_aggregate (
where: {
_or: [{
inputs: {
address: {
_eq: $address
}
}
}, {
outputs: {
address: {
_eq: $address
}
}
}]
}
) {
aggregate {
count
}
}
We're now in a position to build in support for the Jörmungandr node API as it's feasible to maintain two variants with the app development slowing down. This serves as contingency if the Jörmungandr write service for Cardano GraphQL cannot be achieved.
The app should probably be pre-caching the next page anyway, or at the very least n+1 to know if it has more than what fits in the current view
IBlockInfo
is an unnecessary vague abstraction
Block.slotNo
needs to be checked for validity. It was added to the database recently, and may not have been included in the original tests as the preference was Slot.number
Check Block number: 3308908
. The slot 1323
supposedly came after 634
EDIT: Likely just a stubbed value used and not updated to slotNo
https://github.com/input-output-hk/cardano-explorer-app/blob/develop/source/features/blocks/ui/BlockList.tsx#L24
Update this
The current query makes no attempt to handle addresses which exceed the default limit of 100 (enforced by Hasura). A limit
and offset
argument should be supplied
The API expresses the model correctly Epoch.lastBlockAt
The Epoch percentage UI element must be calculated on the client, extending the dynamic query to fetch the current slot. See detail in
{
blocks(where: {id: {_eq: "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb"}}){
id
slotNo
slotWithinEpoch
previousBlock {
id
number
}
transactions_aggregate {
aggregate {
count
}
}
}
}
{
"data": {
"blocks": [
{
"id": "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb",
"slotNo": null,
"slotWithinEpoch": 0,
"previousBlock": null,
"transactions_aggregate": {
"aggregate": {
"count": 14505
}
}
}
]
}
}
Replace it with a static rendering of the Medusa animation.
When a new block is added to the latest blocks list, we also need to patch the last block at value in the current epoch row.
The current epoch should share the same logic as the homepage latest blocks, inheriting the live updating when new blocks are created
Right now all the Epoch blocks are fetched
Once #105 is done, the AllBlocks
component can be implemented here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.