Skip to content
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

feat(collections): filters #1292

Merged
merged 5 commits into from
Nov 30, 2021
Merged

Conversation

roiLeo
Copy link
Contributor

@roiLeo roiLeo commented Nov 25, 2021

I didn't find a way to remove empty collections from query yet

PR type

  • Feature

Before submitting Pull Request, please make sure:

  • My contribution builds clean without any errors or warnings
  • I've merged recent default branch -- main and I've no conflicts
  • I've tried respect high code quality standards
  • I've didn't break any original functionality
  • I've posted screenshot of demonstrated change in this PR

What's new?

  • filters in /collections

Screenshot

Screenshot 2021-11-25 at 09-17-39 Low minting fees and carbonless NFTs

@@ -137,8 +158,11 @@ export default class Collections extends Vue {
result: this.handleResult,
variables: () => {
return {
orderBy: this.searchQuery.sortBy,
search: this.buildSearchParam(),
listed: this.searchQuery.listed ? [{price: { greaterThan: '0'}}] : [],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤕

Copy link
Member

@vikiival vikiival Nov 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this filters only those with price -> metrics can be skewed

@yangwao
Copy link
Member

yangwao commented Nov 25, 2021

I didn't find a way to remove empty collections from query yet

Maybe @vikiival would have idea? would be amazing to close on this, collections are not great with empty collections so not wasting collectors attention, showing only those which can get would be interesting.

Like by default I would put something, show only collections where is at least 1 NFT for BUY

Copy link
Member

@vikiival vikiival left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

src/components/rmrk/Gallery/Collections.vue Outdated Show resolved Hide resolved
@@ -137,8 +158,11 @@ export default class Collections extends Vue {
result: this.handleResult,
variables: () => {
return {
orderBy: this.searchQuery.sortBy,
search: this.buildSearchParam(),
listed: this.searchQuery.listed ? [{price: { greaterThan: '0'}}] : [],
Copy link
Member

@vikiival vikiival Nov 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this filters only those with price -> metrics can be skewed

@vikiival
Copy link
Member

Maybe @vikiival would have idea?

you can't filter on the nested entity
these are the fields you can filter

input CollectionEntityFilter {
  version: StringFilter
  name: StringFilter
  max: IntFilter
  issuer: StringFilter
  symbol: StringFilter
  id: StringFilter
  metadata: StringFilter
  currentOwner: StringFilter
  events: JSONFilter
  blockNumber: BigFloatFilter
  createdAt: DatetimeFilter
  updatedAt: DatetimeFilter
  and: [CollectionEntityFilter!]
  or: [CollectionEntityFilter!]
  not: CollectionEntityFilter
}

the possible hack is to count already minted NFTs in the collection entity

Like by default I would put something, show only collections where is at least 1 NFT for BUY

It will skew the metrics

Screenshot 2021-11-25 at 20 27 29

@roiLeo
Copy link
Contributor Author

roiLeo commented Nov 26, 2021

the possible hack is to count already minted NFTs in the collection entity

We got the totalCount of nfts in collection but can't query/filter on > 0.
Does this work? kodadot/magick#10

It will skew the metrics

Buy now toggle will change metrics for sure. (as it filter nfts price > 0 in collection)

@vikiival
Copy link
Member

We got the totalCount of nfts in collection but can't query/filter on > 0.

Have you tried to run it on your local machine? 💻
Is think that if we make the field as required it won't allow us to filter on top of that anyway

@yangwao
Copy link
Member

yangwao commented Nov 26, 2021

It will skew the metrics

Which metrics? Items?
We can reformulate text to reflect what is shown as numbers. Let's try come up with a smart word for that

@yangwao
Copy link
Member

yangwao commented Nov 26, 2021

Just chatted w @vikiival let's remove empty collection on UI till we figure out other solutions, just to have this working 😄

Lets do hacky solution for now, same with BUY stuff

@yangwao
Copy link
Member

yangwao commented Nov 30, 2021

Bump, can we remove empty collections on UI and let's merge this @roiLeo ?

image

@roiLeo
Copy link
Contributor Author

roiLeo commented Nov 30, 2021

Bump, can we remove empty collections on UI and let's merge this @roiLeo ?

hotfix would be to remove card from row and it's not looking great
Screenshot 2021-11-30 at 15-15-37 Low minting fees and carbonless NFTs

I'm sure something can be done with graphql

@yangwao
Copy link
Member

yangwao commented Nov 30, 2021

Yeah, but looking for empty collections is draining attention is worse than showing nothing 😄

Let's push it and we will "upgrade" it later, even now it's a huge step with functionality tho!

@yangwao
Copy link
Member

yangwao commented Nov 30, 2021

WFM continue to #1357

@yangwao yangwao merged commit 66f6487 into kodadot:main Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants