Skip to content

Commit

Permalink
fix: Update decentraland-dapps (#2849)
Browse files Browse the repository at this point in the history
* fix: Update dApps

* fix: Update decentraland-dapps

* fix: Update dependencies

* fix: Remove FF

* fix: Package.json

* fix: Update react-testing and remove tslint
  • Loading branch information
LautaroPetaccio authored Aug 23, 2023
1 parent 1dc2435 commit c48726a
Show file tree
Hide file tree
Showing 13 changed files with 521 additions and 1,105 deletions.
1,576 changes: 509 additions & 1,067 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"@dcl/single-sign-on-client": "^0.0.12",
"@dcl/ui-env": "^1.2.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^11.0.0",
"@testing-library/user-event": "^13.5.0",
"@typechain/ethers-v5": "^10.1.0",
"@types/jszip": "^3.1.6",
Expand All @@ -33,11 +32,11 @@
"dcl-scene-writer": "^1.1.2",
"decentraland": "^3.3.0",
"decentraland-builder-scripts": "^0.24.0",
"decentraland-dapps": "^15.8.4",
"decentraland-dapps": "^16.0.4",
"decentraland-ecs": "^6.6.1-20201020183014.commit-bdc29ef-hotfix",
"decentraland-experiments": "^1.0.2",
"decentraland-transactions": "^1.47.0",
"decentraland-ui": "^4.5.3",
"decentraland-ui": "^4.6.1",
"ethers": "^5.6.8",
"file-saver": "^2.0.1",
"graphql": "^15.8.0",
Expand Down Expand Up @@ -74,6 +73,7 @@
"web-vitals": "^2.1.4"
},
"devDependencies": {
"@testing-library/react": "^12.1.5",
"@types/blob-to-buffer": "^1.2.0",
"@types/file-saver": "^2.0.0",
"@types/interface-datastore": "^1.0.0",
Expand All @@ -92,7 +92,6 @@
"@typescript-eslint/eslint-plugin": "^5.36.2",
"@typescript-eslint/parser": "^5.36.2",
"concurrently": "^7.2.2",
"dcl-tslint-config-standard": "^1.1.0",
"decentraland-rpc": "^3.1.8",
"eslint": "^7.28.0",
"eslint-config-prettier": "^8.5.0",
Expand Down
4 changes: 1 addition & 3 deletions src/components/Navbar/Navbar.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ import { connect } from 'react-redux'
import { push } from 'connected-react-router'
import { isLoggedIn } from 'modules/identity/selectors'
import { RootState } from 'modules/common/types'
import { getIsProfileSiteEnabled } from 'modules/features/selectors'
import { locations } from 'routing/locations'
import { MapStateProps, MapDispatchProps, MapDispatch, OwnProps } from './Navbar.types'
import Navbar from './Navbar'

const mapState = (state: RootState): MapStateProps => ({
isConnected: isLoggedIn(state),
isProfileSiteEnabled: getIsProfileSiteEnabled(state)
isConnected: isLoggedIn(state)
})

const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class Navbar extends React.PureComponent<Props> {
render() {
let props = this.props
if (props.isConnected) {
props = { ...props, rightMenu: <UserMenu newMenu={props.isProfileSiteEnabled} /> }
props = { ...props, rightMenu: <UserMenu /> }
}
return <BaseNavbar activePage="builder" {...props} />
}
Expand Down
6 changes: 2 additions & 4 deletions src/components/Navbar/Navbar.types.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { NavbarProps } from 'decentraland-ui'
import { Dispatch } from 'redux'

export type Props = NavbarProps & {
isProfileSiteEnabled: boolean
}
export type Props = NavbarProps

export type MapStateProps = Pick<Props, 'isConnected' | 'isProfileSiteEnabled'>
export type MapStateProps = Pick<Props, 'isConnected'>
export type MapDispatchProps = Pick<Props, 'onSignIn'>
export type MapDispatch = Dispatch
export type OwnProps = Partial<Props>
3 changes: 1 addition & 2 deletions src/components/SceneViewPage/SceneViewPage.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { getData as getScenes, getIsLoading as getIsLoadingScene } from 'modules
import { getCurrentAuthor } from 'modules/profile/selectors'
import { togglePreview, closeEditor } from 'modules/editor/actions'
import { getCurrentProject, getLoading as getLoadingProject } from 'modules/project/selectors'
import { getIsInspectorEnabled, getIsProfileSiteEnabled, getIsTemplatesEnabled } from 'modules/features/selectors'
import { getIsInspectorEnabled, getIsTemplatesEnabled } from 'modules/features/selectors'
import { openModal } from 'modules/modal/actions'
import { PreviewType } from 'modules/editor/types'
import { Project } from 'modules/project/types'
Expand All @@ -30,7 +30,6 @@ const mapState = (state: RootState): MapStateProps => ({
currentAuthor: getCurrentAuthor(state),
isTemplatesEnabled: getIsTemplatesEnabled(state),
isInspectorEnabled: getIsInspectorEnabled(state),
isProfileSiteEnabled: getIsProfileSiteEnabled(state),
isLoading: getIsLoadingScene(state) || !!getLoadingProject(state).length
})

Expand Down
4 changes: 2 additions & 2 deletions src/components/SceneViewPage/SceneViewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default class SceneViewPage extends React.PureComponent<Props> {
}

renderAuthor() {
const { currentAuthor, isProfileSiteEnabled } = this.props
const { currentAuthor } = this.props

if (!currentAuthor) {
return null
Expand All @@ -149,7 +149,7 @@ export default class SceneViewPage extends React.PureComponent<Props> {
return (
<div className="author">
{t('public_page.made_by')}
<Profile address={address} {...(isProfileSiteEnabled && { as: 'a', href: `${PROFILE_URL}/accounts/${address}` })} />
<Profile address={address} as="a" href={`${PROFILE_URL}/accounts/${address}`} />
</div>
)
}
Expand Down
2 changes: 0 additions & 2 deletions src/components/SceneViewPage/SceneViewPage.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export type Props = {
isReady: boolean
isTemplatesEnabled: boolean
isInspectorEnabled: boolean
isProfileSiteEnabled: boolean
isLoading: boolean
onCloseEditor: typeof closeEditor
onLoadProject: typeof loadPublicProjectRequest
Expand All @@ -50,7 +49,6 @@ export type MapStateProps = Pick<
| 'currentAuthor'
| 'isTemplatesEnabled'
| 'isInspectorEnabled'
| 'isProfileSiteEnabled'
>
export type MapDispatchProps = Pick<
Props,
Expand Down
2 changes: 1 addition & 1 deletion src/modules/common/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function* rootSaga(builderAPI: BuilderAPI, newBuilderClient: BuilderClien
walletSaga(),
collectionCurationSaga(builderAPI),
itemCurationSaga(builderAPI),
featuresSaga({ polling: { apps: [ApplicationName.BUILDER, ApplicationName.DAPPS], delay: 60000 /** 60 seconds */ } }),
featuresSaga({ polling: { apps: [ApplicationName.BUILDER], delay: 60000 /** 60 seconds */ } }),
inspectorSaga(builderAPI, store)
])
}
8 changes: 1 addition & 7 deletions src/modules/features/selectors.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { getIsFeatureEnabled } from 'decentraland-dapps/dist/modules/features/selectors'
import { ApplicationName } from 'decentraland-dapps/dist/modules/features/types'
import { RootState } from 'modules/common/types'
import {
getIsDeployToWorldsEnabled,
getIsMaintenanceEnabled,
getIsProfileSiteEnabled,
getIsPublishSmartWearablesEnabled
} from './selectors'
import { getIsDeployToWorldsEnabled, getIsMaintenanceEnabled, getIsPublishSmartWearablesEnabled } from './selectors'
import { FeatureName } from './types'

jest.mock('decentraland-dapps/dist/modules/features/selectors')
Expand Down Expand Up @@ -60,7 +55,6 @@ describe('when getting if maintainance is enabled', () => {

const ffSelectors = [
{ selector: getIsDeployToWorldsEnabled, app: ApplicationName.BUILDER, feature: FeatureName.DEPLOY_WORLDS },
{ selector: getIsProfileSiteEnabled, app: ApplicationName.DAPPS, feature: FeatureName.PROFILE },
{ selector: getIsPublishSmartWearablesEnabled, app: ApplicationName.BUILDER, feature: FeatureName.PUBLISH_SMART_WEARABLES }
]

Expand Down
8 changes: 0 additions & 8 deletions src/modules/features/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ export const getIsInspectorEnabled = (state: RootState) => {
}
}

export const getIsProfileSiteEnabled = (state: RootState) => {
try {
return getIsFeatureEnabled(state, ApplicationName.DAPPS, FeatureName.PROFILE)
} catch (e) {
return false
}
}

export const getIsPublishSmartWearablesEnabled = (state: RootState) => {
try {
return getIsFeatureEnabled(state, ApplicationName.BUILDER, FeatureName.PUBLISH_SMART_WEARABLES)
Expand Down
1 change: 0 additions & 1 deletion src/modules/features/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ export enum FeatureName {
SCENE_TEMPLATES = 'scene-templates',
HANDS_CATEGORY = 'hands-category',
WEB_EDITOR = 'web-editor',
PROFILE = 'profile',
PUBLISH_SMART_WEARABLES = 'publish-smart-wearables'
}
3 changes: 0 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
"plugins": [
{
"name": "tslint-language-service"
},
{
"name": "dcl-tslint-config-standard"
}
],
"baseUrl": "src",
Expand Down

1 comment on commit c48726a

@vercel
Copy link

@vercel vercel bot commented on c48726a Aug 23, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

builder – ./

builder-git-master-decentraland1.vercel.app
builder-decentraland1.vercel.app

Please sign in to comment.