Skip to content

Commit

Permalink
refactor: landing page (#50)
Browse files Browse the repository at this point in the history
* fix: add missing dependencies to all hooks and add eslint react hooks rules

* chore: remove unused imports automatically by eslint (--quiet has been removed)

* feat: my exchanges/disputes: always show status label

* refactor: remove unused prop

* feat: update wallet list & fix modal position

* feat: show buyer/seller toggle in exchange if you are both the seller and the buyer

* feat: f you click on one of your exchanges and then go back, you should see the my exchanges tab, not the default tab (my offers)

* style: make ipfs url fit in custom store modal

* fix: performance bug in explore page

* fix: redirect to first page by mistake if you go directly and there are offers

* refactor: breakpoints as vars and update colors from figma designs

* feat: update footer and header to match designs & add shared components

* feat: landing from designs wip

* fix: createOffer compilation issue

* feat: customStore store name only changes tab title

* fix: graphql offers payload

* fix: unwanted div inside dangerouslySetInnerHTML

* feat: landing rwd wip

* chore: add comment

* chore: remove comment

* test: commit

* fix: graphql offers payload

* fix: update zIndex

* fix: landing show text, no store name

* feat: change offer card component to match designs

* feat: rwd on landing page wip

* feat: remove newsletter updates from footer

* feat: remove duplicated links in navigation in comparison to links under product in the footer

* feat: add My Items to header

* feat: hide header links when it's mobile

* feat: add view more

* fix: price in offer card

* fix: breakpoints & its usage

* fix: number of offers in Landing page if device is S or M

* style: fix header style

* style: add darker bg to featured offers

* feat: mobile burger menu

* feat: search bar

* fix: update routing

* fix: update yt

* fix: update medium

* fix: offercard & hot offers

* feat: add carousel

* fix: rwd offers

* fix: z-index in carousel

* fix: update footer links

* fix: carousel sizing

* fix: performance bug in explore offers page

* fix: explore page so that the value in the header input is set there too

* style: add pointer-events: none to previous/next offer cards in carousel

* style: stick footer to the bottom

* fix: change terms of use page

* fix: build

* fix: rwd styles etc

* style: fix arrows positioning in carousel

* chore: hardcore dsn sentry url instead of having it as an .env variable

* feat: add cards to both sides in carousel

* fix: rwd styles

* fix: custom store & offers in grid

* feat: add quantityInitial in offers

* style: fix z-index of landing title

* feat: offer banner

* fix: update go button

* style: banner and header changes

* fix: carousel and icons

* fix: account grid look

* fix: pagination

* fix: carousel height and perspective issues

* fix: scale

* fix: offers banners, utc tz, carousel

* feat: primaryBgColor

* style: fix modal styles and create offer description border

* fix: add missing isOpen

* feat: coming soon offers

* fix: carousel on mobile

* fix: 10

* fix: carousel height

* fix:xs text & carousel

* fix: quantity issue

* test: add and fix landing tests

* test: fix react testing tests

* test: fix rest of e2e tests

* feat: add quantityAvailable as a filter to get offers

* refactor: extract const from offer banner

* chore: update @bosonprotocol deps

* build: update all dependencies

* feat: show remaining quantity if less than 50% in offer banner

* fix: breaking changes and package-lock.json

* test: fix public account tests

* build: create .nvmrc file

* style: reduce vertical margin in offer card

* chore: change .nvmrc file

* feat: change which offers to get for each section in landing page

* refactor: remove unused colors

* fix: typo

* test: fix tests

* feat: fix PR comments

Co-authored-by: Rafał Mikucki <[email protected]>
  • Loading branch information
albertfolch-redeemeum and bigerjot authored Jul 1, 2022
1 parent 35e3544 commit c297ec6
Show file tree
Hide file tree
Showing 75 changed files with 5,452 additions and 3,240 deletions.
3 changes: 1 addition & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
REACT_APP_CHAIN_ID=1234
SENTRY_DSN=
REACT_APP_CHAIN_ID=1234
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run prettier && npm run lint && git add -A .
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.15.1
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"semi": true,
"tabWidth": 2,
"singleQuote": false,
Expand Down
14 changes: 2 additions & 12 deletions e2e-tests/Explore.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ test.describe("Explore page", () => {

expect(h1).toBeDefined();
});
test("should display the logo", async ({ page }) => {
const logoImg = page.locator("[data-testid=logo]");

expect(await logoImg.getAttribute("src")).toBeTruthy();
});
test("should display the filter subheading", async ({ page }) => {
const h2 = page.locator("h2", { hasText: "Filter" });

Expand All @@ -40,11 +35,6 @@ test.describe("Explore page", () => {

expect(h2).toBeDefined();
});
test("should display the footer", async ({ page }) => {
const footer = page.locator("footer");

expect(footer).toBeDefined();
});
test.describe("Query params", () => {
test("query param 'name' should update when changing input", async ({
page
Expand Down Expand Up @@ -499,7 +489,7 @@ test.describe("Explore page", () => {
const errorOffersSelector = "[data-testid=noOffers]";
await page.waitForSelector(errorOffersSelector);
const noOffers = page.locator(errorOffersSelector);
await expect(noOffers).toHaveText("No offers found");
await expect(noOffers).toHaveText("No products found");
});

test("should display there are no offers if we go to a random page with no offers", async ({
Expand All @@ -513,7 +503,7 @@ test.describe("Explore page", () => {
const errorOffersSelector = "[data-testid=noOffers]";
await page.waitForSelector(errorOffersSelector);
const noOffers = page.locator(errorOffersSelector);
await expect(noOffers).toHaveText("No offers found");
await expect(noOffers).toHaveText("No products found");
});

test("should display error message when subgraph returns HTTP 400 error", async ({
Expand Down
Loading

0 comments on commit c297ec6

Please sign in to comment.