Skip to content

Commit

Permalink
feat: gno projects_manager (#702)
Browse files Browse the repository at this point in the history
* wip: init screen

* wip: opti simple button

* wip: adding home for grants page

* wip: Grant home page

* fix: remove createStyleSheet

* chore: adjust code

* wip: detail page

* wip: add detail page

* wip: add detailf info of task

* chore: fix lint

* wip: add grants manager screen

* chore: layout.padding => layout.spacing

* wip: add grants manager

* wip: add screen payment

* wip: adding makeing request page

* wip: adding pages of making grants request

* feat: all pages of Grants, except step 5

* chore: refactor code due to change of components path

* wip: integrate with formik + zustand

* wip: refactor + add filter

* Wip: add cover image + full flow create grant

* chore: Refactor Grant => project + add progress bar

* Wip: working on integration with Gno

* update network json

* chore: fix lint

* feat: complete flow for funder/creator

* fix: fix flex layout for projects list

* chore: use empty value instead of fake one

* fix: fix lint + gen network

* fix: fix lint

* fix: remove fake data

* fix: fix json parser

* fix: ipfs link

* fix: generate ipfs key

* fix: lint

* fix: optimize error display

* fix: handle tns name

* fix: handle tns name

* fix: handle empty userId

* chore: update dependencies

* wip

* feat: update ui

* wip: update code related to contracts change + handle token display

* feat: add conflict solver in form

Signed-off-by: Norman Meier <[email protected]>

* chore: run lint-fix

Signed-off-by: Norman Meier <[email protected]>

* chore: pass CI

Signed-off-by: Norman Meier <[email protected]>

* chore: revert uneeded changes

Signed-off-by: Norman Meier <[email protected]>

* fix: inject buffer on all platforms

Signed-off-by: Norman Meier <[email protected]>

* feat: add submit/accept contractor candidates

* fix: use gnot and start conflict resolution ui

Signed-off-by: Norman Meier <[email protected]>

* feat: add candiates review + adjust UI

* tmp: working conflict resolution flow

Signed-off-by: Norman Meier <[email protected]>

* fix: lint

Signed-off-by: Norman Meier <[email protected]>

* feat: disable candidates button when no candidates

Signed-off-by: Norman Meier <[email protected]>

* chore: optimize UI

* feat: improve conflict solving flow

Signed-off-by: Norman Meier <[email protected]>

* fix: conflict flow

Signed-off-by: Norman Meier <[email protected]>

* chore: refactor ProjectsConflictsSolvingScreen

* chore: refactor code

* feat(DAppStore): update getFromFile.ts

- Updated the key name from 'projectsProgram' to 'projects'
- Updated the title and icon for the 'projects' option

* chore: refactor code using aliases + execEscrowMethod

* fix: fix style for project detail page

* chore: regen

Signed-off-by: Norman Meier <[email protected]>

* tmp

Signed-off-by: Norman Meier <[email protected]>

* fix: linter errors

Signed-off-by: Norman Meier <[email protected]>

* fix: tested contractor and proposer full flow

Signed-off-by: Norman Meier <[email protected]>

* fix: add cypress root config

Signed-off-by: Norman Meier <[email protected]>

* chore: run cypress on ci

Signed-off-by: Norman Meier <[email protected]>

* chore: split e2e tests on ci

Signed-off-by: Norman Meier <[email protected]>

* fix: script name

Signed-off-by: Norman Meier <[email protected]>

* chore: use https remote

Signed-off-by: Norman Meier <[email protected]>

* fix: properly setup go in ci

Signed-off-by: Norman Meier <[email protected]>

* fix: enable gnodev server mode

Signed-off-by: Norman Meier <[email protected]>

* fix: wait-on timeout

Signed-off-by: Norman Meier <[email protected]>

* chore: big timeout

Signed-off-by: Norman Meier <[email protected]>

* fix: use correct port

Signed-off-by: Norman Meier <[email protected]>

* chore: bigger initial visit timeout

Signed-off-by: Norman Meier <[email protected]>

* fix: test env

Signed-off-by: Norman Meier <[email protected]>

* fix: first visit timeout

Signed-off-by: Norman Meier <[email protected]>

* chore; headed mode

Signed-off-by: Norman Meier <[email protected]>

* chore: error screenshot

Signed-off-by: Norman Meier <[email protected]>

* chore: pin node version in e2e

Signed-off-by: Norman Meier <[email protected]>

* chore: increase timeouts

Signed-off-by: Norman Meier <[email protected]>

* chore: use node20 an increase timeout

Signed-off-by: Norman Meier <[email protected]>

* chore: sync nvmrc and cypress node version

Signed-off-by: Norman Meier <[email protected]>

* chore: record nad better confirm

Signed-off-by: Norman Meier <[email protected]>

* chore: no record

Signed-off-by: Norman Meier <[email protected]>

* chore: codegen

Signed-off-by: Norman Meier <[email protected]>

* chore: pin and sync ci versions

Signed-off-by: Norman Meier <[email protected]>

* chore: go mod tidy

Signed-off-by: Norman Meier <[email protected]>

* chore: lint

Signed-off-by: Norman Meier <[email protected]>

* chore: bring gno project manager code in monorepo

Signed-off-by: Norman Meier <[email protected]>

* chore: sync with latest gno and dapp

Signed-off-by: Norman Meier <[email protected]>

* tmp

Signed-off-by: Norman Meier <[email protected]>

* fix: update gno clients to support breaking change

Signed-off-by: Norman Meier <[email protected]>

* chore: use react-hook-form and zod instead of adding formik and yup

Signed-off-by: Norman Meier <[email protected]>

* chore: remove dev artifact

Signed-off-by: Norman Meier <[email protected]>

* chore: remove dev artifact

Signed-off-by: Norman Meier <[email protected]>

* chore: rename preload helper test

Signed-off-by: Norman Meier <[email protected]>

* chore: clean fixtures

Signed-off-by: Norman Meier <[email protected]>

* fix: wait for upload end

Signed-off-by: Norman Meier <[email protected]>

* chore: move jsonutil to pass ci

Signed-off-by: Norman Meier <[email protected]>

* fix: use go1.20 in desktop build

Signed-off-by: Norman Meier <[email protected]>

* chore: check gno mod files

Signed-off-by: Norman Meier <[email protected]>

* fix: use xargs in gno-mod-tidy to make ci fail if tidy fails

Signed-off-by: Norman Meier <[email protected]>

* fix: cross-platform xargs

Signed-off-by: Norman Meier <[email protected]>

* chore: remove dev artifacts

Signed-off-by: Norman Meier <[email protected]>

* chore: remove dev artifact

Signed-off-by: Norman Meier <[email protected]>

* fix: gno version in e2e tests

Signed-off-by: Norman Meier <[email protected]>

* chore: use namespaced packages paths

Signed-off-by: Norman Meier <[email protected]>

* fix: gno mod tidy

Signed-off-by: Norman Meier <[email protected]>

* chore: lint

Signed-off-by: Norman Meier <[email protected]>

* chore: remove commented code and some console.log

Signed-off-by: Norman Meier <[email protected]>

* fix: setup adena mock only if required

Signed-off-by: Norman Meier <[email protected]>

* chore: revert tmp change

Signed-off-by: Norman Meier <[email protected]>

* chore: cleanup

Signed-off-by: Norman Meier <[email protected]>

* chore: disable by default

Signed-off-by: Norman Meier <[email protected]>

* feat: allow to hide dapps behind dev mode

Signed-off-by: Norman Meier <[email protected]>

---------

Signed-off-by: Norman Meier <[email protected]>
Co-authored-by: Norman Meier <[email protected]>
Co-authored-by: Eng. Juan Combetto <[email protected]>
Co-authored-by: n0izn0iz <[email protected]>
  • Loading branch information
4 people authored Aug 3, 2024
1 parent 2c4e37b commit 0406117
Show file tree
Hide file tree
Showing 168 changed files with 10,827 additions and 381 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/buf-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
check-codegen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: bufbuild/buf-setup-action@v1.28.0
- uses: bufbuild/buf-setup-action@v1.31.0
with:
version: 1.28.0
version: 1.31.0
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Buf lint
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/desktop-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:
- name: Cancel Previous Runs
uses: styfle/[email protected]

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version-file: ".nvmrc"

- uses: actions/setup-go@v3
with:
go-version: "1.19"
go-version: "1.20"

- name: Install node modules
run: yarn
Expand Down Expand Up @@ -54,16 +54,16 @@ jobs:
runs-on: ${{ matrix.runner }}
continue-on-error: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: "npm"
cache: "yarn"
node-version-file: ".nvmrc"

- uses: actions/setup-go@v3
with:
go-version: "1.19"
go-version: "1.20"

- name: Download web build
uses: actions/download-artifact@v3
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: E2E Tests

on:
push:
branches:
- main
pull_request:
merge_group:

jobs:
e2e-tests:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version-file: ".nvmrc"
- uses: actions/setup-go@v3
with:
go-version: "1.22"
- uses: cypress-io/github-action@v6
with:
browser: chrome
build: make install-gno
start: |
yarn start --minify
make start.gnodev-e2e
wait-on: "http://localhost:8888, http://localhost:8081"
- name: Upload errors screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
10 changes: 5 additions & 5 deletions .github/workflows/gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ jobs:
check-codegen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version-file: ".nvmrc"

- uses: actions/setup-go@v3
with:
go-version: "1.19"
go-version: "1.22"

- uses: dtolnay/rust-toolchain@stable

- uses: bufbuild/buf-setup-action@v1.28.0
- uses: bufbuild/buf-setup-action@v1.31.0
with:
version: 1.28.0
version: 1.31.0
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Install node modules
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/gno-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
go-version: "1.22"
- name: Clean gno
run: make clean-gno

- name: Clone gno
run: make clone-gno

Expand All @@ -27,3 +27,16 @@ jobs:

- name: Lint gno
run: make lint-gno

- name: gno mod tidy
run: make gno-mod-tidy

- name: Check that there is no diff
run: |
mrdiff=$(git status --porcelain)
if [[ $mrdiff ]]; then
echo 'ERROR: Diff found!'
echo $mrdiff
git diff
exit 1
fi
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-go@v3
with:
go-version: "1.19"
go-version: "1.22"

- name: Tidy go.mod
run: make go-mod-tidy
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
lint-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version-file: ".nvmrc"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mobile-build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
with:
go-version: "1.20"

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version-file: ".nvmrc"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mobile-build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
- name: Select xcode
run: sudo xcode-select -s /Applications/Xcode_15.2.app

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version-file: ".nvmrc"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.1.0
20.8.1
20 changes: 19 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -416,19 +416,37 @@ generate.internal-contracts-clients: node_modules
npx tsx packages/scripts/makeTypescriptIndex $${outdir} || exit 1 ; \
done

.PHONY: install-gno
install-gno: node_modules
yarn install-gno

.PHONY: start.gnodev-e2e
start.gnodev-e2e:
gnodev --unsafe-api --server-mode --add-account g193vp9tjhfpldvgg3gn433ayv8pn7rtfv8shyeq $$(find gno -name gno.mod -type f -exec dirname {} \;)

.PHONY: clone-gno
clone-gno:
mkdir -p gnobuild
cd gnobuild && git clone https://github.com/gnolang/gno.git && cd gno && git checkout 9b114172063feaf2da4ae7ebb8263cada3ba699b
cp -r ./gno/p ./gnobuild/gno/examples/gno.land/p/teritori

.PHONY: build-gno
build-gno:
cd gnobuild/gno/gnovm && make build

.PHONY: lint-gno
lint-gno:
./gnobuild/gno/gnovm/build/gno lint ./gno/. -v

.PHONY: test-gno
test-gno:
./gnobuild/gno/gnovm/build/gno test ./gno/... -v

.PHONY: gno-mod-tidy
gno-mod-tidy:
export gno=$$(pwd)/gnobuild/gno/gnovm/build/gno; \
find gno -name gno.mod -type f | xargs -I'{}' sh -c 'cd $$(dirname {}); $$gno mod tidy' \;

.PHONY: clean-gno
clean-gno:
rm -rf gnobuild
mkdir gnobuild
3 changes: 3 additions & 0 deletions assets/icons/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/no-tasks.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/icons/projects-completed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/icons/projects-inProgress.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/projects-open.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/icons/projects-program.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/icons/projects-review.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/project-success-payment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from "cypress";

export default defineConfig({
viewportWidth: 1900,
viewportHeight: 1280,
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
});
9 changes: 9 additions & 0 deletions cypress/e2e/0_preload.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// this helps to get accurate test times by running first and preloading the app

describe("Preload", () => {
it("successfully loads", () => {
cy.visit("http://localhost:8081", {
timeout: 300000,
});
});
});
16 changes: 16 additions & 0 deletions cypress/e2e/lib.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export const changeTestUser = (user: string) => {
cy.window().then(async (win) => {
const newUserId = await (win as any).adena.SetTestUser(user);
cy.get(`*[data-testid='selected-wallet-${newUserId}']`).should("exist");
});
};

export const changeSelectedMilestoneStatus = (newStatus: string) => {
const getStatusDropdown = () =>
cy.get("*[data-testid='milestone-select-new-status']", { timeout: 20000 });
getStatusDropdown().click();
const statusElem = getStatusDropdown().contains(newStatus);
statusElem.click();
statusElem.should("not.exist");
cy.contains("Change Status").click();
};
Loading

0 comments on commit 0406117

Please sign in to comment.