-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
[explorer] Groups Owned Objects by Type #1741
Conversation
const [results, setResults] = useState(DATATYPE_DEFAULT); | ||
const [isLoaded, setIsLoaded] = useState(false); | ||
|
||
// TODO - The below will fail for a large number of owned objects |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works pretty well in practice. This address(813ec1ab1e1797c79d1e1fcbebebc27a1fd21f07
) owns 110+ coins and the page loads well. But I will try to fix this in the next day or two
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it can handle 110 objects, that's good enough for now i think.
CleanShot.2022-05-03.at.11.51.44.mp4Thanks for working on this! Here're a few high-level feedback(and synced with @bwann52 ):
@bwann52 Could you add more feedback on content and other things if any? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
giving the mock data unique IDs is the only critical change - otherwise we could merge this now
@@ -391,6 +398,9 @@ describe('End-to-end Tests', () => { | |||
it('to go to the last page', async () => { | |||
const address = 'ownsAllAddress'; | |||
await page.goto(`${BASE_URL}/addresses/${address}`); | |||
const btn1 = await page.$('#groupCollection > div:nth-child(1)'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we re-use '#groupCollection > div:nth-child(1)'
selector several times, could we make it a const
variable with a name describing what the selector is for ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A refactoring of the test suite code is a good idea and certainly something to consider post-Devnet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my concern is more for our own future understanding of this code: it's good to give descriptive names to magic constant values in the codebase, and to do it while the meaning is still fresh
const [results, setResults] = useState(DATATYPE_DEFAULT); | ||
const [isLoaded, setIsLoaded] = useState(false); | ||
|
||
// TODO - The below will fail for a large number of owned objects |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it can handle 110 objects, that's good enough for now i think.
* aggregates objects into groups for static view * WIP - basic group view set up for API * Group View set up for API with pagination * Coin sums balance not count * stylizes group view * resolve white background issue with page navigation * removes balance where not relevant * removes standard library from Group View * adds guidance on required changes to backend * Type titles rather than types everywhere * WIP - splits coins from NFTs * improves Object Owning Objects view * fix tests * changes package.json order back to original * improvements to individual object display * rearrange pagination order following Bauer feedback * standardizes Coin/NFTs view following Bauer feedback
* aggregates objects into groups for static view * WIP - basic group view set up for API * Group View set up for API with pagination * Coin sums balance not count * stylizes group view * resolve white background issue with page navigation * removes balance where not relevant * removes standard library from Group View * adds guidance on required changes to backend * Type titles rather than types everywhere * WIP - splits coins from NFTs * improves Object Owning Objects view * fix tests * changes package.json order back to original * improvements to individual object display * rearrange pagination order following Bauer feedback * standardizes Coin/NFTs view following Bauer feedback
When viewing addresses and objects, the owned objects are first grouped by type. Upon clicking this leads to an individual object view.