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

URL encoded collection data for grant rounds #1786

Closed
wants to merge 12 commits into from

Conversation

ghostffcode
Copy link
Contributor

Description

Considering the issue with Shilling grants on socials, we at Supermodular thought about a solution to share a collection of grants with peers.

The way this draft works is by storing the collection title, round id and list of projects in localStorage for easy customization, encode that collection data and append it to url search params for /collection?data=[encodedCollectionData]. Attached below is a demo video:

Grants Curation w/ URL Encoding - Watch Video

Refers/Fixes

N/A

Testing

This is an initial draft and we are hoping to get some feedback on it before proceeding.

Copy link
Member

@thelostone-mc thelostone-mc left a comment

Choose a reason for hiding this comment

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

Haha nice work on this @ghostffcode.
Roping in product for validation
Few feedback :

  • remove custom fonts and just re-use hero-icon what tailwind comes with
  • could we add tests in for all of these functions
  • re add semicolon wherever it was removed

@@ -29,6 +29,7 @@
"api-build": "turbo run build --filter=api",
"api-test": "turbo run test --filter=api",
"api-start": "pnpm --filter api run start",
"api-gen": "pnpm --filter api run prisma:generate",
Copy link
Member

Choose a reason for hiding this comment

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

Is this needed?

Copy link
Member

Choose a reason for hiding this comment

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

API folder is not used anymore so this might be just a leftover from git.

"@wagmi/core": "0.5.4",
"allo-indexer-client": "github:gitcoinco/allo-indexer-client#48490969985125e89bf1d65725ef9e510c97256a",
"allo-indexer-client": "github:gitcoinco/allo-indexer-client#9e713f46db8a13e19c923a983bc5956b79da7c56",
Copy link
Member

Choose a reason for hiding this comment

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

Was this intentional updated . If not let's stick to the version that is on main

"react-redux": "^8.0.1",
"react-router": "^6",
"react-router-dom": "6",
"react-scripts": "5.0.1",
"react-select": "5.7.3",
Copy link
Member

Choose a reason for hiding this comment

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

would recommend using what we already have multiselect. Checkout the cart page

@@ -88,10 +93,12 @@
"react-dom": "^18.1.0",
"react-gtm-module": "^2.0.11",
"react-hook-form": "^7.31.3",
"react-loading-spin": "^2.1.9",
Copy link
Member

Choose a reason for hiding this comment

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

We've got a spinner used across the app. Would recommend using that . Spinner.tsx is the file you are looking for

"babel-loader": "^8.3.0",
"buffer": "^6.0.3",
"classnames": "^2.3.2",
Copy link
Member

Choose a reason for hiding this comment

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

can be removed, we have a util function which does this already

Copy link
Member

Choose a reason for hiding this comment

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

Located in the common package to be clear.


const round: RoundResult = res.data.rounds[0];
const round: RoundResult = res.data.rounds[0]
Copy link
Member

Choose a reason for hiding this comment

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

^ re-add the ; cause that's the formatting we stick to on the package


// function formatAddress(address: `0x${string}`): string {
// return `${address.slice(0, 6)}...${address.slice(-6)}`
// }
Copy link
Member

Choose a reason for hiding this comment

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

remove this if not needed

import { ProjectsWithRoundData, getProjects } from "../api/round";
import { ReactComponent as ArrowUpRight } from "../../assets/icons/arrow-up-right.svg"
import Navbar from "../common/Navbar";
// import { useCart } from "../../context/CartContext";
Copy link
Member

Choose a reason for hiding this comment

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

let's remove this

@@ -12,7 +12,7 @@ import ApplyNowSection from "./ApplyNowSection";

const LandingPage = () => {
if (process.env.REACT_APP_ENV === "production") {
window.location.replace("https://grants.gitcoin.co");
// window.location.replace("https://grants.gitcoin.co");
Copy link
Member

Choose a reason for hiding this comment

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

could you add this back in please


function classNames(...classes: string[]) {
return classes.filter(Boolean).join(' ')
}
Copy link
Member

Choose a reason for hiding this comment

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

^ I think we already have this in common package / utils

Copy link
Member

Choose a reason for hiding this comment

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

Yes, find it in common package.

@owocki
Copy link
Collaborator

owocki commented May 12, 2023

hi from supermodular! here is a deployed version of this you can play with: https://grant-explorer.vercel.app/#/round/1/0x12bb5bbbfe596dbc489d209299b8302c3300fa40

@kevinrolsen
Copy link
Contributor

Thanks! Amazing to have this PR come in.

Just noticed the collection count didn't increment after I created a collection.

Screenshot 2023-05-12 at 17 55 08

@melissa-neira
Copy link
Member

This is great, thank you so much! What's the best way to get some design input/collaboration going?

@owocki
Copy link
Collaborator

owocki commented May 13, 2023

This is great, thank you so much! What's the best way to get some design input/collaboration going?

@melissa-neira At this point, Supermodular just wants a gut check that a PR/exploration of collection creation was welcome. If that is the case, then, we will continue investing resources into it. If so, pls DM me on discord (Owocki#1337) and we can setup a discord group to discuss.

btw @kevinrolsen fun collection name :)

@gravityblast
Copy link
Member

I love this feature, thanks @ghostffcode @owocki great job!

@meglister
Copy link
Member

i'll dm you on discord @owocki !

@vacekj
Copy link
Member

vacekj commented Jun 19, 2023

@ghostffcode Hey, are you still working on this? If yes, please use Prettier (pnpm format) to format the files before you submit. If you don't plan on working on this, we can take it over to bring it over the finish line. 🙌

Also converted to draft before it's ready for merge.

@vacekj vacekj marked this pull request as draft June 19, 2023 14:43
@ghostffcode
Copy link
Contributor Author

@ghostffcode Hey, are you still working on this? If yes, please use Prettier (pnpm format) to format the files before you submit. If you don't plan on working on this, we can take it over to bring it over the finish line. 🙌

Also converted to draft before it's ready for merge.

Hey, thanks for this reminder. All the requested updates are in. I am open to having you take over and finishing it. Let me know if there's anything I can help with. Thanks again 🙏🏾

@vacekj vacekj mentioned this pull request Oct 18, 2023
12 tasks
@vacekj vacekj mentioned this pull request Oct 18, 2023
14 tasks
@vacekj
Copy link
Member

vacekj commented Nov 23, 2023

@gitcoinco/grantsstack I beleive this can be closed as it's superseded by the current collection feature?

@thelostone-mc
Copy link
Member

Closing this out as the PR is not longer applicable to the current feature

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

8 participants