Skip to content

Commit

Permalink
🪢 Merge 2.4.0 into dev (#4741)
Browse files Browse the repository at this point in the history
  • Loading branch information
thesan authored Jan 18, 2024
2 parents 41614ad + f36329b commit 32e5a11
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 69 deletions.
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.4.0] - 2024-01-18

### Added
- Display blacklisted accounts in the election module.
- Allow hiding the sidebar "Total balance".

### Changed
- Link block heights to the Subscan block explorer.

### Fixed
- Fix past election page endless refresh issue.

## [2.3.1] - 2024-01-12

### Fixed
- On boarding modal footer.

## [2.3.0] - 2023-12-29

### Added
Expand Down Expand Up @@ -270,7 +287,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.1.1] - 2022-12-02

[unreleased]: https://github.com/Joystream/pioneer/compare/v2.3.0...HEAD
[unreleased]: https://github.com/Joystream/pioneer/compare/v2.4.0...HEAD
[2.4.0]: https://github.com/Joystream/pioneer/compare/v2.3.1...v2.4.0
[2.3.1]: https://github.com/Joystream/pioneer/compare/v2.3.0...v2.3.1
[2.3.0]: https://github.com/Joystream/pioneer/compare/v2.2.0...v2.3.0
[2.2.0]: https://github.com/Joystream/pioneer/compare/v2.1.1...v2.2.0
[2.1.1]: https://github.com/Joystream/pioneer/compare/v2.1.0...v2.1.1
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@joystream/pioneer",
"version": "2.3.0",
"version": "2.4.0",
"license": "GPL-3.0-only",
"scripts": {
"build": "node --max_old_space_size=4096 ./build.js",
Expand Down
21 changes: 6 additions & 15 deletions packages/ui/src/common/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,13 @@ export const ModalBody = styled.div`
`

interface ModalFooterProps {
twoColumns?: boolean
children?: ReactNode
className?: string
}

export const ModalFooter = ({ twoColumns = false, children, className }: ModalFooterProps) => {
export const ModalFooter = ({ children, className }: ModalFooterProps) => {
return (
<ModalFooterComponent twoColumns={twoColumns} className={className}>
<ModalFooterComponent className={className}>
{children}
<ModalConnectionStatusDot onlyPerformance />
</ModalFooterComponent>
Expand All @@ -169,7 +168,7 @@ const ModalConnectionStatusDot = styled(ConnectionStatusDot)`
top: calc(50% - 10px);
`

export const ModalFooterComponent = styled.footer<{ twoColumns?: boolean }>`
export const ModalFooterComponent = styled.footer`
display: inline-flex;
flex-wrap: wrap;
grid-area: modalfooter;
Expand All @@ -183,18 +182,10 @@ export const ModalFooterComponent = styled.footer<{ twoColumns?: boolean }>`
padding: 12px 26px 12px 24px;
border-radius: 0 0 2px 2px;
position: relative;
`
export const ModalFooterGroup = styled.div<{ left?: boolean }>`
display: grid;
grid-auto-flow: column;
align-items: center;
width: fit-content;
height: 100%;
justify-self: ${({ left }) => (left ? 'start' : 'end')};
grid-column-gap: 40px;
justify-items: ${({ left }) => (left ? 'start' : 'end')};
justify-content: ${({ left }) => (left ? 'start' : 'end')};
@media (min-width: ${BreakPoints.sm}px) {
flex-flow: nowrap;
}
`

interface ModalWrapProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const ModalTransactionFooter: FC<Props> = ({
}) => {
const { feeInfo } = useTransactionFee()
return (
<ModalFooter className={className} twoColumns>
<ModalFooter className={className}>
<ButtonsGroup align="left">
{extraLeftButtons}
{prev && !prev.disabled && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import HCaptcha from '@hcaptcha/react-hcaptcha'
import { BalanceOf } from '@polkadot/types/interfaces/runtime'
import React, { useEffect, useState } from 'react'
import { FormProvider, useForm } from 'react-hook-form'
import styled from 'styled-components'
import * as Yup from 'yup'

import { SelectAccount } from '@/accounts/components/SelectAccount'
Expand All @@ -24,7 +25,6 @@ import { Arrow } from '@/common/components/icons'
import { Loading } from '@/common/components/Loading'
import {
ModalFooter,
ModalFooterGroup,
ModalHeader,
Row,
ScrolledModal,
Expand Down Expand Up @@ -247,55 +247,52 @@ export const BuyMembershipForm = ({
</ScrolledModalContainer>
</FormProvider>
</ScrolledModalBody>
<ModalFooter twoColumns>
<ModalFooterGroup left>
{type === 'onBoarding' && (
<ButtonGhost onClick={changeMembershipAccount} size="medium">
<Arrow direction="left" />
Change account
</ButtonGhost>
)}
<Checkbox
id="privacy-policy-agreement"
onChange={(hasTerms) => form.setValue('hasTerms', hasTerms, { shouldValidate: true })}
>
<TextMedium colorInherit>
I agree to the{' '}
<LabelLink to={TermsRoutes.termsOfService} target="_blank">
Terms of Service
</LabelLink>{' '}
and{' '}
<LabelLink to={TermsRoutes.privacyPolicy} target="_blank">
Privacy Policy
</LabelLink>
.
</TextMedium>
</Checkbox>
</ModalFooterGroup>
<ModalFooterGroup>
{type === 'general' && (
<TransactionInfoContainer>
<TransactionInfo
title="Creation fee:"
value={membershipPrice?.toBn()}
tooltipText="Creation fee is the price of membership, it is managed by council through the proposal system. It is inclusive of transaction fee."
tooltipLinkURL="https://joystream.gitbook.io/joystream-handbook/governance/proposals"
tooltipLinkText="Learn more"
/>
</TransactionInfoContainer>
)}
<ButtonPrimary
size="medium"
onClick={() => {
const values = form.getValues()
uploadAvatarAndSubmit({ ...values, externalResources: { ...definedValues(values.externalResources) } })
}}
disabled={isDisabled}
>
{isUploading ? <Loading text="Uploading avatar" /> : 'Create a Membership'}
</ButtonPrimary>
</ModalFooterGroup>
</ModalFooter>

<StyledFooter>
{type === 'onBoarding' && (
<ButtonGhost onClick={changeMembershipAccount} size="medium">
<Arrow direction="left" />
Change account
</ButtonGhost>
)}
<Checkbox
id="privacy-policy-agreement"
onChange={(hasTerms) => form.setValue('hasTerms', hasTerms, { shouldValidate: true })}
>
<TextMedium colorInherit>
I agree to the{' '}
<LabelLink to={TermsRoutes.termsOfService} target="_blank">
Terms of Service
</LabelLink>{' '}
and{' '}
<LabelLink to={TermsRoutes.privacyPolicy} target="_blank">
Privacy Policy
</LabelLink>
.
</TextMedium>
</Checkbox>
{type === 'general' && (
<TransactionInfoContainer>
<TransactionInfo
title="Creation fee:"
value={membershipPrice?.toBn()}
tooltipText="Creation fee is the price of membership, it is managed by council through the proposal system. It is inclusive of transaction fee."
tooltipLinkURL="https://joystream.gitbook.io/joystream-handbook/governance/proposals"
tooltipLinkText="Learn more"
/>
</TransactionInfoContainer>
)}
<ButtonPrimary
size="medium"
onClick={() => {
const values = form.getValues()
uploadAvatarAndSubmit({ ...values, externalResources: { ...definedValues(values.externalResources) } })
}}
disabled={isDisabled}
>
{isUploading ? <Loading text="Uploading avatar" /> : 'Create a Membership'}
</ButtonPrimary>
</StyledFooter>
</>
)
}
Expand All @@ -308,3 +305,9 @@ export const BuyMembershipFormModal = ({ onClose, onSubmit, membershipPrice }: B
</ScrolledModal>
)
}

export const StyledFooter = styled(ModalFooter)`
& > label:first-child {
margin-right: auto;
}
`
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ const SwitchModalFooter = styled(ModalFooter)`
width: 100%;
height: auto;
padding: 16px;
grid-auto-flow: row;
justify-items: start;
flex-flow: wrap;
`

const MembersList = styled.ul<{ memberIndicatorOffset?: string }>`
Expand Down

2 comments on commit 32e5a11

@vercel
Copy link

@vercel vercel bot commented on 32e5a11 Jan 18, 2024

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:

pioneer-2-storybook – ./

pioneer-2-storybook-git-dev-joystream.vercel.app
pioneer-2-storybook.vercel.app
pioneer-2-storybook-joystream.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 32e5a11 Jan 18, 2024

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:

pioneer-2 – ./

pioneer-2-joystream.vercel.app
pioneer-2.vercel.app
pioneer-2-git-dev-joystream.vercel.app

Please sign in to comment.