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: Add boost fields to space query #823

Merged
merged 3 commits into from
Mar 15, 2024
Merged

feat: Add boost fields to space query #823

merged 3 commits into from
Mar 15, 2024

Conversation

ChaituVR
Copy link
Member

@ChaituVR ChaituVR commented Mar 14, 2024

Fixes #822

Add boost fields to space/spaces query so UI can retrieve them

How to test:

  • Try a query like
{
  space(id:"thanku.eth") {
    id
    boost {
      enabled
      bribeEnabled
    }
  }
}
"boost":{"enabled":true,"bribeEnabled":true}
  • Now try the above query again, it should return updated values

@ChaituVR ChaituVR requested a review from wa0x6e March 14, 2024 18:30
@@ -83,6 +83,8 @@ export function formatSpace({
space.voting.hideAbstain = space.voting.hideAbstain || false;
space.voteValidation = space.voteValidation || { name: 'any', params: {} };
space.delegationPortal = space.delegationPortal || null;
// disable boost by default until it's enabled
space.boost = space.boost || { disabled: true, bribeEnabled: false };
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be more logical to have the field be enabled instead of disabled, so it's more consistent with bribeEnabled ?

Copy link
Member Author

Choose a reason for hiding this comment

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

So i talked to @samuveth about it, snapshot-labs/snapshot.js#975 (comment) The future plan is to enable it to everyone by default and only disable it to who want to disable it

Copy link
Contributor

Choose a reason for hiding this comment

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

But if we have default values I can also call it enabled, and it could default to true

Copy link
Contributor

Choose a reason for hiding this comment

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

But if we have default values I can also call it enabled, and it could default to true

I prefer this

@samuveth
Copy link
Contributor

samuveth commented Mar 15, 2024

Can you make the default values both false @ChaituVR

@samuveth
Copy link
Contributor

As I mentioned in DMs I will handle disabling with whitelist now, so it can be false here by default

@ChaituVR ChaituVR requested a review from wa0x6e March 15, 2024 11:04
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Files Patch % Lines
src/graphql/helpers.ts 0.00% 1 Missing ⚠️
Additional details and impacted files

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@samuveth samuveth left a comment

Choose a reason for hiding this comment

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

utACK

Copy link
Contributor

@wa0x6e wa0x6e left a comment

Choose a reason for hiding this comment

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

utAck

@ChaituVR ChaituVR merged commit a1853f3 into master Mar 15, 2024
4 checks passed
@ChaituVR ChaituVR deleted the add-boost-fields branch March 15, 2024 12:57
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.

Add Boost settings to spaces query
3 participants