Skip to content

Commit

Permalink
Feat/unified markets v1 (#1643)
Browse files Browse the repository at this point in the history
* Feat: owners table  (#1459)

* feat: created owners table with corresponding styles

* feat: added connection with nft server

* feat: added sort by

* feat: some fixes

* feat: removed unused container

* fix: pr comments

* fix: imports

* fix: pr commentsg

* fix: removed change con dev.json

* fix: pr comments

* fix: changed component name

* fix: remove loader

* fix: pr comments

* Feat: created listings table component for item page  (#1460)

* feat: created owners table with corresponding styles

* feat: added connection with nft server

* feat: added sort by

* feat: some fixes

* feat: removed unused container

* fix: pr comments

* fix: imports

* fix: pr commentsg

* fix: removed change con dev.json

* fix: pr comments

* fix: changed component name

* feat: create listings table component

* feat: listings table with mocked data

* fix: dates and sytles

* feat: connected with api

* feat: added empty state to tables - missing listings empty state

* feat: added empty state text

* fix: added name as possible filter to support marketplace subraph

* fix: test

* feat: updated dcl shcemas

* fix: pr comments

* fix: fixed table margin

* Feat: mint or buy component (#1472)

* feat: created owners table with corresponding styles

* feat: added connection with nft server

* feat: added sort by

* feat: some fixes

* feat: removed unused container

* fix: pr comments

* fix: imports

* fix: pr commentsg

* fix: removed change con dev.json

* fix: pr comments

* fix: changed component name

* feat: create listings table component

* feat: listings table with mocked data

* fix: dates and sytles

* feat: connected with api

* feat: added empty state to tables - missing listings empty state

* feat: added empty state text

* fix: added name as possible filter to support marketplace subraph

* fix: test

* feat: updated dcl shcemas

* feat: created mint or buy component

* fix: pr comments

* Feat: item detail information (#1487)

* feat: created owners table with corresponding styles

* feat: added connection with nft server

* feat: added sort by

* feat: some fixes

* feat: removed unused container

* fix: pr comments

* fix: imports

* fix: pr commentsg

* fix: removed change con dev.json

* fix: pr comments

* fix: changed component name

* feat: create listings table component

* feat: listings table with mocked data

* fix: dates and sytles

* feat: connected with api

* feat: added empty state to tables - missing listings empty state

* feat: added empty state text

* fix: added name as possible filter to support marketplace subraph

* fix: test

* feat: updated dcl shcemas

* feat: created mint or buy component

* fix: pr comments

* feat: item detail page

* fix: some styles

* Feat/latest sales table (#1488)

* feat: redesign lastest sales table

* fix: table title

* fix: removed unused file

* fix: pr comments

* fix: typo

* feat: ui review fixes (#1500)

* feat: tests for best buying option componend and  listings and owners table (#1499)

* feat: tests for listings and owners table

* feat: added best buy option tests

* fix: pr comments

* fix: test not passing

* feat: new designs item detail page (#1512)

* feat: new designs item detail page

* feat: some styles fixes and issuedId fic

* feat: removed localhost on dev env

* fix: tests

* fix: values in mana and usd

* fix: issuedId always rendering

* Feat/tables redesign (#1541)

* feat: tables skeleton

* feat: save table design

* feat: table in listingstable and ownerstable

* feat: trasnaction history table

* feat: rentalHistory table

* feat: last tables remaining

* feat: fix imports

* fix: tests

* feat: fixed actions on collections table

* fix: test on best buying opion

* fix: pr comments

* feat: remove nft server local url

* Feat/cards redesign (#1593)

* feat: save changes of cards redesign

* feat: wip

* feat: fix types

* feat: catalog items finished - missing cleaning comments

* fix: saga tests

* feat: updated common schemas

* feat: some fixes

* feat: fix on card height and build with best buying option

* feat: updated dcl schemas

* feat: added plural to listing price

* feat: fix comments

* feat: added million parse on prices

* feat: added million parse on prices

* fix: api call to catalog or nft/items

* fix: some fixes in cards

* fix: tests

* fix: remove unnecesary changes

* fix: selectors import

* feat: last fixes

* feat: some fixes

* feat: fixed comments

* Feat/catalog status filter (#1587)

* feat: add new status filter for the catalog

* feat: add tests for the getStatus selector and missing files for StatusFilter

* feat: add Status filter to the defaultCollapsed object

* fix: most_expensive new filter

* feat: remove extra enum in object

* test: add tests to new sortby options selector

* test: update tests

* fix: AssetCards styles for Catalog (#1632)

---------

Co-authored-by: Juanma Hidalgo <[email protected]>

* feat: merge with master

* fix: linked profile not working as expected

* feat: Deprecate the catalog saga and move catalog logic to items one

* fix: fixes the sortBy parameter

* fix: some style fixes

* feat: onback added to itemdetilpage

* fix: fetch items selector not working propertly in my assets

* feat: removed gender tag on wearable card

* feat: removed category tag on wearable card

* test: fix some tests

* feat: removed change on dev.json

* feat: fix applying filters once page > 1 and remove more filters from emotes

* feat: remove creator link from Card

* fix: some fixes

* fix: get by itemId

* chore: remove console.logs

* test: fix most of the tests

* fix: tests

* fix: bugs related to status filter and assetType being set wrongly (#1656)

* fix: bugs related to status filter and assetType being set wrongly

* chore: remove unused variable

* chore: revert tsconfig changes

* fix: card price logic

* Fix: some style issues (#1658)

* fix: some style issues

* feat: table names in red

* fix: comments

* fix: new Item page re-renders fixed (#1667)

* feat: added empty state (#1664)

* feat: added empty state

* feat: fixed filter search

* fix: tests

* fix: test

* feat: merge with base branch

* fix: some styles on itemDetailPage

* fix: tests

* fix: make mana icon wrap if does not fit in card

* fix: removed test typo

* fix: comment

* fix: comment

* fix: listings table total

* fix: text align on extra info on card (#1673)

* feat: Add new catalog cards to My List, Accounts and HomePage (#1672)

* feat: added empty state (#1664)

* feat: added empty state

* feat: fixed filter search

* fix: tests

* fix: test

* feat: merge with base branch

* fix: some styles on itemDetailPage

* fix: tests

* fix: make mana icon wrap if does not fit in card

* fix: removed test typo

* fix: comment

* fix: comment

* fix: listings table total

* feat: Add new catalog cards to My List, Accounts and HomePage

* chore: add new variable to avoid repeating code

* Apply suggestions from code review

Co-authored-by: Lautaro Petaccio <[email protected]>
Signed-off-by: Juanma Hidalgo <[email protected]>

* test: update test beforeEAch

---------

Signed-off-by: Juanma Hidalgo <[email protected]>
Co-authored-by: Florencia Barreto <[email protected]>
Co-authored-by: Lautaro Petaccio <[email protected]>

* feat: catalog styles for the new cards in mobile (#1676)

* feat: catalog styles for the new cards in mobile

* fix: adjust card styles

* feat: added popup if there is an item available for mint on nft page (#1678)

* feat: added popup if there is an item available for mint on nft page

* fix: some fixes

* fix: import

* fix: removed unused fetch item call

* feat: added other listings table (#1686)

* feat: added other listings table

* fix: removed actual nft from table

* fix: removed actual nft from table

* fix: comments

* fix: import

* fix: removed unused import

* Feat/my bid (#1695)

* fix: removed actual nft from table

* feat: added bids table

* feat: bids

* fix: tests

* fix: imported react on utils file

* fix: warning

* feat: add new logic for the catalog card labels (#1681)

* feat: add new logic for the catalog card labels

* feat: updates cheapest listing scenario

* feat: update the card label logic

* fix: wearable preview for test

* feat: update logic for cheapest and also mint available

* fix: add transform just for mobile

* fix: update card logic for newest sort and mint not in range

* fix: only show listing range when applied

* feat: add new logic for minPrice

* chore: comment out unused fn

* feat: use isMintInRange util method for logic

* feat: add new cards visual effect

* fix: style for the mint icon

* fix: mobile styles

* fix: several bugs with navigation and default filter values

* test: update tests logic

* test: add test for each card text combination

* chore: add translations

* feat: add closeIcon to search bar if it has text and rarity filter tooltip

* feat: add styles for clear button in search bar

* feat: persist emote play mode when changing categories

* fix: ENS onlyOnSale not working as expected

* chore: rollback mainnet data overrides

* feat: add mobile styles for the new item detail page (#1698)

* feat: add mobile styles for the new item detail page

* chore: remove unused import

* fix: comments (#1699)

* feat: order nft page (#1702)

* feat: order nft page

* fix: removed tsconfig changes

* fix: fixed loader position (#1705)

* feat: mobile styles for new NFT detail page (#1703)

* feat: mobile styles for new NFT detail page

* fix: use proper mobile breakpoint

* fix: removed emote tags (#1706)

* fix: removed emote tags

* change minting icon

* fix: card animation (#1708)

* fix: card animatin

* fix: added transition to image container

* fix: some unified market ui issues in mobile (#1713)

* fix: added not for sale case (#1714)

* fix: catalog styles for mobile (#1724)

* feat: changed minting icon to a bigger onw (#1727)

* fix: NFT Detail not showing Mint Popup (#1728)

* fix: NFT Detail not showing Mint Popup

* fix: use `to` instead of onNavigate

* fix: do not fetch assets if they are in the store (#1734)

* fix: do not fetch assets if they are in the store

* chore: remove useEffect unneeded dep

* test: update tests

* test: add tests and fix typo

* test: fix broken test

* feat: refactor the BuyNFTButtons to accept asset fields instead of the entire object (#1739)

* feat: refactor the BuyNFTButtons to accept asset fields instead of the entire object

* chore: move import up

* fix: catalog card hover glitch (#1741)

* feat: preserve filters on change category (#1732)

* feat: preserve filters on change category

* preseve just search

* feat: created search seelector

* feat: change search selector type

* Feat/l1 wearables (#1737)

* feat: removed favorites and creator for items in ethereum

* fix: test

* fix: onback test

* fix: Fetch collection items loading flag (#1742)

* fix: Fetch collection items loading flag

* test: update test

* feat: wip: warable preview on l1 items (#1743)

* feat: wip: warable preview on l1 items

* feat: fixed wearable preview

* fix: removed if on thumbnail item

* Update webapp/src/components/AssetImage/AssetImage.tsx

Co-authored-by: Juanma Hidalgo <[email protected]>
Signed-off-by: Florencia Barreto <[email protected]>

* Update webapp/src/components/AssetImage/AssetImage.tsx

Co-authored-by: Juanma Hidalgo <[email protected]>
Signed-off-by: Florencia Barreto <[email protected]>

* Update webapp/src/components/AssetImage/AssetImage.tsx

Co-authored-by: Juanma Hidalgo <[email protected]>
Signed-off-by: Florencia Barreto <[email protected]>

---------

Signed-off-by: Florencia Barreto <[email protected]>
Co-authored-by: Juanma Hidalgo <[email protected]>

* feat: several unified market fixes (#1748)

* feat: several unified market fixes

* feat: use the right rows number for desktop

* fix: some style fixes (#1746)

* fix: some style fixes

* fix: best buing option remove loader

* fix: best buying option tests

* fix: description

* fix: fetch open listings on buy nft box (#1749)

* fix: onBack rebase

* test: fix broken tests

* fix: some small UI issues with the new unified market feature (#1751)

* fix: remove NFT_SERVER read from config

---------

Signed-off-by: Juanma Hidalgo <[email protected]>
Signed-off-by: Florencia Barreto <[email protected]>
Co-authored-by: Florencia Barreto <[email protected]>
Co-authored-by: Florencia Barreto <[email protected]>
Co-authored-by: Lautaro Petaccio <[email protected]>
  • Loading branch information
4 people authored Jun 1, 2023
1 parent 177085e commit 2d3630f
Show file tree
Hide file tree
Showing 213 changed files with 8,968 additions and 1,553 deletions.
41 changes: 28 additions & 13 deletions webapp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0-development",
"dependencies": {
"@dcl/crypto": "^3.0.0",
"@dcl/schemas": "^6.15.0",
"@dcl/schemas": "^6.18.0",
"@dcl/ui-env": "^1.2.0",
"@ethersproject/providers": "^5.6.2",
"classnames": "^2.3.1",
Expand All @@ -24,6 +24,7 @@
"react": "^17.0.2",
"react-countup": "^6.2.0",
"react-dom": "^17.0.2",
"react-intersection-observer": "^9.4.3",
"react-lazy-load-image-component": "^1.5.6",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const CurrentAccountSidebar = ({ section, onBrowse }: Props) => (
</Menu>
<AssetFilters
defaultCollapsed={{
[AssetFilter.Status]: true,
[AssetFilter.Rarity]: true,
[AssetFilter.Price]: true,
[AssetFilter.Collection]: true,
Expand All @@ -85,7 +86,7 @@ const CurrentAccountSidebar = ({ section, onBrowse }: Props) => (
[AssetFilter.BodyShape]: true,
[AssetFilter.Network]: true,
[AssetFilter.OnSale]: false,
[AssetFilter.More]: false,
[AssetFilter.More]: false
}}
/>
</>
Expand Down
13 changes: 13 additions & 0 deletions webapp/src/components/AssetBrowse/AssetBrowse.css
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,19 @@
.AssetBrowse .overlay {
margin-top: 0;
}
.AssetBrowse .ui.cards {
display: flex;
}
.AssetBrowse .ui.cards > div {
width: 48%;
}
.AssetBrowse .ui.cards .content.catalog {
padding: 10px 10px 18px 10px;
display: flex;
}
.AssetBrowse .ui.cards .CatalogItemInformation {
margin-top: 6px;
}
.AssetBrowse .ui.cards,
.AssetBrowse .ui.cards > .ui.card {
margin-left: 0;
Expand Down
11 changes: 9 additions & 2 deletions webapp/src/components/AssetBrowse/AssetBrowse.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { ReactNode, useEffect, useState } from 'react'
import { matchPath } from 'react-router-dom'
import { matchPath, useHistory, useLocation } from 'react-router-dom'
import classNames from 'classnames'
import { Container, Mobile, NotMobile, Page, Tabs } from 'decentraland-ui'
import { t } from 'decentraland-dapps/dist/modules/translation/utils'
Expand Down Expand Up @@ -53,8 +53,15 @@ const AssetBrowse = (props: Props) => {
isMapViewFiltersEnabled
} = props

const location = useLocation()
const history = useHistory()
// Prevent fetching more than once while browsing
const [hasFetched, setHasFetched] = useState(false)
const lastLocation = visitedLocations[visitedLocations.length - 2]
const [hasFetched, setHasFetched] = useState(
history.action === 'POP' &&
lastLocation?.pathname === location.pathname &&
lastLocation?.search === location.search
)
const isCurrentAccount = view === View.CURRENT_ACCOUNT
const isAccountOrCurrentAccount = view === View.ACCOUNT || isCurrentAccount
const [showOwnedLandOnMap, setShowOwnedLandOnMap] = useState(true)
Expand Down
15 changes: 13 additions & 2 deletions webapp/src/components/AssetCard/AssetCard.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import { getAssetPrice, isNFT } from '../../modules/asset/utils'
import { locations } from '../../modules/routing/locations'
import { getOpenRentalId } from '../../modules/rental/utils'
import { getRentalById } from '../../modules/rental/selectors'
import { getPageName } from '../../modules/routing/selectors'
import {
getPageName,
getSortBy,
getWearablesUrlParams
} from '../../modules/routing/selectors'
import { PageName } from '../../modules/routing/types'
import { MapStateProps, OwnProps, MapDispatchProps } from './AssetCard.types'
import AssetCard from './AssetCard'
Expand All @@ -29,6 +33,8 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => {
? getRentalById(state, openRentalId)
: null

const { minPrice, maxPrice } = getWearablesUrlParams(state)

return {
price,
showListedTag:
Expand All @@ -39,7 +45,12 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => {
? isClaimingBackLandTransactionPending(state, asset)
: false,
rental: rentalOfNFT,
showRentalChip: rentalOfNFT !== null && pageName === PageName.ACCOUNT
showRentalChip: rentalOfNFT !== null && pageName === PageName.ACCOUNT,
sortBy: getSortBy(state),
appliedFilters: {
minPrice,
maxPrice
}
}
}

Expand Down
Loading

0 comments on commit 2d3630f

Please sign in to comment.