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

[DO NOT MERGE] Feat/colony sdk #1075

Closed
wants to merge 84 commits into from

Conversation

AlexandreTedesco
Copy link

Affected Packages

Apps

  • data populator
  • portal
  • template

Packages

  • 1ui
  • api
  • graphql
  • protocol
  • sdk

Tools

  • tools

Overview

Overview of the changes in the PR.

Screen Captures

If applicable, add screenshots or screen captures of your changes.

Declaration

  • I hereby declare that I have abided by the rules and regulations as outlined in the CONTRIBUTING.md

ZealRa and others added 30 commits January 8, 2025 16:47
…onent to test cursorules and adapt the component to the BP ui
Create states for HackatonCard and replace the favori icon
AlexandreTedesco and others added 28 commits January 15, 2025 18:34
…t slider

Calculating the sum of the absolute values ​​of the other sliders
Checking if the new value would make the total exceed 100%
If it exceeds, we limit the value while keeping the sign (positive or negative)
For example:
If slider1 = 60% and slider2 = -30%, then slider3 cannot exceed ±10% because |60| + |-30| + |10| = 100
If slider1 = -40% and slider2 = -40%, then slider3 cannot exceed ±20% because |-40| + |-40| + |20| = 100
For TenProjects, the total is 100 votes (1 ETH)
Each vote is 0.01 ETH, so a project with 25 votes will have 0.25 ETH.
Using sort() to create a new array sorted by descending value
Sorting is done automatically each time the values are updated
Now, sliders will always be displayed from the largest percentage to the smallest.  + Add button
First check whether the values have different signs
If one is positive and the other negative, the positive goes first
If the two values have the same sign (positive or negative)
Sort by descending absolute value
Now the sorting should work correctly. For example, it might look like this
[+50, +30, -20, -10]: positives first, then negatives, each sorted by descending absolute value
If you have -10% then +5%, the +5% will be placed before the -10% because it is positive
feature ui compenants multislider
…ing modifications:

Added the MultiSlider component to the imports
Added a sliderValues report to manage slider values
Preparation of data for the MultiSlider with :
Unique ID for each project
Project name
Number of votes
ETH total
Current slider value
onChange function to update values
Addition of a dedicated section for the MultiSlider with an appropriate style
Updated the explanation message to reflect the new voting system
Put navbar in layout/root-layout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants