Skip to content

Commit

Permalink
Merge pull request #1818 from daostack/release
Browse files Browse the repository at this point in the history
Release 0.10.10
  • Loading branch information
dkent600 authored Jun 15, 2020
2 parents bbd869c + 16af89d commit 6672e2d
Show file tree
Hide file tree
Showing 51 changed files with 2,718 additions and 2,547 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"no-bitwise": "error",
"@typescript-eslint/interface-name-prefix": ["error", "always"],
"prefer-const": "error",
"no-unused-expressions": "error",
"@typescript-eslint/no-unused-expressions": "error",
"no-unused-vars": "off", // to not interfere with @typescript just below
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "[_].*" }],
"quotes": ["error", "double"],
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ schema.graphql
subgraph.yaml
build/
*.scss.d.ts
*.ps1
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 0.10.10
- Several code refactorings

- Features Added
- add OK button to the modal prompt that appears on the DAO landing page when clicking the Edit Home Page button
- page the fetching of preboosted proposals on the Plugin Proposals page, 100 proposals at a time
- display the scheme "alias" instead of contract name, when available

- Bugs Fixed
- in the DAO side bar menu, improve appearance and behavior of the scrollbar that appears when more than three ETH/token balances are listed
- in the DAO side bar menu, the DAO Holdings link now opens in a new browser tab instead of replacing the current page
- in the DAO side bar menu, fix DAOstack icon color when not in the context of a DAO
- when clicking "Redeem" in the Redemptions menu, the menu now disappears to avoid obscuring the Redeem popup.
- copy-to-clipboard buttons now all show an explanative tooltip
- improved plugin Information tab layout on mobile platforms
- improve layout of the account profile page when there is no account profile
- remove spurious dash at the bottom of the DAO Members and other pages

## 0.10.9
- Features Added
- extend Scheme URL Params => Proposal Templates to Competition proposal & competition submission
Expand Down
3,017 changes: 1,490 additions & 1,527 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alchemy-client",
"version": "0.10.9",
"version": "0.10.10",
"description": "An app for collaborative networks (DAOs), based on the DAO stack.",
"author": "DAOstack",
"license": "GPL-3.0",
Expand Down Expand Up @@ -79,7 +79,7 @@
"dependencies": {
"3box": "1.17.1",
"@burner-wallet/burner-connect-provider": "^0.1.1",
"@daostack/arc.js": "^0.2.69",
"@daostack/arc.js": "^0.2.70",
"@dorgtech/daocreator-ui": "^1.0.9",
"@fortawesome/fontawesome-svg-core": "^1.2.10",
"@fortawesome/free-brands-svg-icons": "^5.6.1",
Expand Down Expand Up @@ -118,7 +118,7 @@
"react-dom": "^16.7.0",
"react-ga": "^2.6.0",
"react-helmet": "^5.2.1",
"react-infinite-scroll-component": "^4.5.2",
"react-infinite-scroll-component": "^5.0.4",
"react-linkify": "^0.2.2",
"react-markdown": "^4.0.8",
"react-mde": "^8.1.0",
Expand Down
23 changes: 18 additions & 5 deletions src/actions/uiActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as Redux from "redux";

import { IRootState } from "reducers";
import { ActionTypes } from "reducers/uiReducer";
import { ISimpleMessagePopupProps } from "components/Shared/SimpleMessagePopup";

export function showTour() {
return (dispatch: Redux.Dispatch<any, any>, _getState: () => IRootState) => {
Expand All @@ -21,6 +22,18 @@ export function showMenu() {
};
}

export function showSimpleMessage(options: ISimpleMessagePopupProps) {
return (dispatch: Redux.Dispatch<any, any>, _getState: () => IRootState) => {
dispatch({ type: ActionTypes.SHOW_SIMPLE_MESSAGE, options });
};
}

export function hideSimpleMessage() {
return (dispatch: Redux.Dispatch<any, any>, _getState: () => IRootState) => {
dispatch({ type: ActionTypes.HIDE_SIMPLE_MESSAGE });
};
}

export function hideMenu() {
return (dispatch: Redux.Dispatch<any, any>, _getState: () => IRootState) => {
dispatch({ type: ActionTypes.HIDE_MENU });
Expand All @@ -29,7 +42,7 @@ export function hideMenu() {

export function toggleMenu() {
return (dispatch: Redux.Dispatch<any, any>, _getState: () => IRootState) => {
dispatch({ type: _getState().ui.menuOpen? ActionTypes.HIDE_MENU: ActionTypes.SHOW_MENU });
dispatch({ type: _getState().ui.menuOpen ? ActionTypes.HIDE_MENU : ActionTypes.SHOW_MENU });
};
}

Expand All @@ -47,24 +60,24 @@ export function disableTrainingTooltipsOnHover() {

export function toggleTrainingTooltipsOnHover() {
return (dispatch: Redux.Dispatch<any, any>, _getState: () => IRootState) => {
dispatch({ type: _getState().ui.trainingTooltipsOnHover? ActionTypes.DISABLE_TRAINING_TOOLTIPS_ON_HOVER: ActionTypes.ENABLE_TRAINING_TOOLTIPS_ON_HOVER });
dispatch({ type: _getState().ui.trainingTooltipsOnHover ? ActionTypes.DISABLE_TRAINING_TOOLTIPS_ON_HOVER : ActionTypes.ENABLE_TRAINING_TOOLTIPS_ON_HOVER });
};
}

export function enableTrainingTooltipsShowAll() {
return (dispatch: Redux.Dispatch<any, any>, _getState: () => IRootState) => {
dispatch({ type: ActionTypes.ENABLE_TRAINING_TOOLTIPS_SHOW_ALL});
dispatch({ type: ActionTypes.ENABLE_TRAINING_TOOLTIPS_SHOW_ALL });
};
}

export function disableTrainingTooltipsShowAll() {
return (dispatch: Redux.Dispatch<any, any>, _getState: () => IRootState) => {
dispatch({ type: ActionTypes.DISABLE_TRAINING_TOOLTIPS_SHOW_ALL});
dispatch({ type: ActionTypes.DISABLE_TRAINING_TOOLTIPS_SHOW_ALL });
};
}

export function toggleTrainingTooltipsShowAll() {
return (dispatch: Redux.Dispatch<any, any>, _getState: () => IRootState) => {
dispatch({ type: _getState().ui.trainingTooltipsShowAll ? ActionTypes.DISABLE_TRAINING_TOOLTIPS_SHOW_ALL: ActionTypes.ENABLE_TRAINING_TOOLTIPS_SHOW_ALL});
dispatch({ type: _getState().ui.trainingTooltipsShowAll ? ActionTypes.DISABLE_TRAINING_TOOLTIPS_SHOW_ALL : ActionTypes.ENABLE_TRAINING_TOOLTIPS_SHOW_ALL });
};
}
19 changes: 0 additions & 19 deletions src/assets/images/Icon/Copy-white.svg

This file was deleted.

26 changes: 7 additions & 19 deletions src/components/Account/Account.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ a.detailView {
width: 190px;
font-size: $caption;
color: $black;
z-index: 0;
transform: translateX(-50%) scale(0);
background-color: $white;
border-radius: 3px;
Expand All @@ -80,31 +79,22 @@ a.detailView {

.beneficiaryAddress {
overflow: hidden;
width: 140px;
width: 100%;
height: 42px; // for the copy icon
padding: 10px 30px 5px 10px;
position: relative;
text-align: left;
border-radius: 3px;
border: 1px solid rgba(255, 255, 255, 0.5);

span {
.accountAddress {
display: inline-block;
width: 115px;
padding-left: 10px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}

button {
position: absolute;
top: 0;
right: 0;
border: none;
outline: none;
background-color: transparent;
cursor: pointer;
}
}

.socialButton {
Expand Down Expand Up @@ -196,11 +186,14 @@ a.accountName {

.followButton {
margin-top: 10px;
margin-bottom: 16px;
}
}

.userAvatarContainer {
width: 100px;
min-width: 100px;
max-width: 100px;
margin-bottom: 16px;
}

.saveProfile {
Expand Down Expand Up @@ -245,11 +238,6 @@ a.accountName {
margin-bottom: 20px;
}

.copyButton {
border: none;
vertical-align: middle;
}

p {
padding: 0;
margin-top: 5px;
Expand Down
24 changes: 7 additions & 17 deletions src/components/Account/AccountPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import AccountProfileName from "components/Account/AccountProfileName";
import Reputation from "components/Account/Reputation";
import FollowButton from "components/Shared/FollowButton";
import withSubscription, { ISubscriptionProps } from "components/Shared/withSubscription";
import { copyToClipboard } from "lib/util";
import CopyToClipboard, { IconColor } from "components/Shared/CopyToClipboard";
import * as React from "react";
import { connect } from "react-redux";
import { IRootState } from "reducers";
import { NotificationStatus, showNotification } from "reducers/notifications";
import { IProfileState } from "reducers/profilesReducer";

import BN = require("bn.js");
Expand Down Expand Up @@ -41,12 +40,10 @@ const mapStateToProps = (state: IRootState, ownProps: IExternalProps & ISubscrip

interface IDispatchProps {
getProfile: typeof getProfile;
showNotification: typeof showNotification;
}

const mapDispatchToProps = {
getProfile,
showNotification,
};

type IProps = IExternalProps & IStateProps & IDispatchProps & ISubscriptionProps<IMemberState>;
Expand All @@ -59,13 +56,6 @@ class AccountPopup extends React.Component<IProps, null> {
}
}

public copyAddress = (e: any) => {
const { showNotification, accountAddress } = this.props;
copyToClipboard(accountAddress);
showNotification(NotificationStatus.Success, "Copied to clipboard!");
e.preventDefault();
}

public render(): RenderOutput {
const accountInfo = this.props.data;
const { accountAddress, daoState, profile, width } = this.props;
Expand All @@ -83,20 +73,20 @@ class AccountPopup extends React.Component<IProps, null> {
<div>
{!profile || Object.keys(profile.socialURLs).length === 0 ? "No social profiles" :
<span>
{ profile.socialURLs.twitter ?
{profile.socialURLs.twitter ?
<a href={"https://twitter.com/" + profile.socialURLs.twitter.username} className={css.socialButton} target="_blank" rel="noopener noreferrer">
<FontAwesomeIcon icon={["fab", "twitter"]} className={css.icon} />
</a> : ""}
{ profile.socialURLs.github ?
{profile.socialURLs.github ?
<a href={"https://github.com/" + profile.socialURLs.github.username} className={css.socialButton} target="_blank" rel="noopener noreferrer">
<FontAwesomeIcon icon={["fab", "github"]} className={css.icon} />
</a> : ""}
</span>
}
</div>
<div className={css.beneficiaryAddress}>
<span>{accountAddress}</span>
<button onClick={this.copyAddress}><img src="/assets/images/Icon/Copy-black.svg"/></button>
<div className={css.accountAddress}>{accountAddress}</div>
<CopyToClipboard value={accountAddress} color={IconColor.Black}/>
</div>

<div>
Expand All @@ -105,7 +95,7 @@ class AccountPopup extends React.Component<IProps, null> {

<div className={css.holdings}>
<span>HOLDINGS</span>
<div><Reputation daoName={daoState.name} totalReputation={daoState.reputationTotalSupply} reputation={reputation}/></div>
<div><Reputation daoName={daoState.name} totalReputation={daoState.reputationTotalSupply} reputation={reputation} /></div>
</div>
</div>
</div>
Expand All @@ -127,7 +117,7 @@ const SubscribedAccountPopup = withSubscription({

createObservable: (props: IProps) => {
// we set 'fetchPolicy'= 'cache-only' so as to not send queries for addresses that are not members. The cache is filled higher up.
return props.daoState.dao.member(props.accountAddress).state({ fetchPolicy: "cache-only"});
return props.daoState.dao.member(props.accountAddress).state({ fetchPolicy: "cache-only" });
},
});

Expand Down
20 changes: 7 additions & 13 deletions src/components/Account/AccountProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import ThreeboxModal from "components/Shared/ThreeboxModal";
import withSubscription, { ISubscriptionProps } from "components/Shared/withSubscription";
import { Field, Formik, FormikProps } from "formik";
import Analytics from "lib/analytics";
import { baseTokenName, copyToClipboard, ethErrorHandler, genName, formatTokens } from "lib/util";
import { baseTokenName, ethErrorHandler, genName, formatTokens } from "lib/util";
import CopyToClipboard, { IconColor } from "components/Shared/CopyToClipboard";
import { Page } from "pages";
import { parse } from "query-string";
import * as React from "react";
Expand All @@ -21,7 +22,7 @@ import { Helmet } from "react-helmet";
import { connect } from "react-redux";
import { RouteComponentProps } from "react-router-dom";
import { IRootState } from "reducers";
import { NotificationStatus, showNotification } from "reducers/notifications";
import { showNotification } from "reducers/notifications";
import { IProfileState } from "reducers/profilesReducer";
import { combineLatest, of } from "rxjs";
import Loading from "components/Shared/Loading";
Expand Down Expand Up @@ -109,13 +110,6 @@ class AccountProfilePage extends React.Component<IProps, IState> {
});
}

public copyAddress = (e: any): void => {
const { showNotification, accountAddress } = this.props;
copyToClipboard(accountAddress);
showNotification(NotificationStatus.Success, "Copied to clipboard!");
e.preventDefault();
}

public doUpdateProfile = async() => {
const { currentAccountAddress, updateProfile } = this.props;
await updateProfile(currentAccountAddress, this.state.name, this.state.description);
Expand Down Expand Up @@ -235,7 +229,7 @@ class AccountProfilePage extends React.Component<IProps, IState> {
/>
{touched.name && errors.name && <span className={css.errorMessage}>{errors.name}</span>}
</div>
: <div>{accountProfile.name}</div>
: <div>{accountProfile.name ?? "[Unknown]"}</div>
}
<br />
<label htmlFor="descriptionInput">
Expand Down Expand Up @@ -263,7 +257,7 @@ class AccountProfilePage extends React.Component<IProps, IState> {
</div>
</div>

: <div>{accountProfile.description}</div>
: <div>{accountProfile.description ?? "[Unknown]"}</div>
}
</div>
</div>
Expand Down Expand Up @@ -294,12 +288,12 @@ class AccountProfilePage extends React.Component<IProps, IState> {
? <div><strong>Rep. Score</strong><br /><Reputation reputation={accountInfo.reputation} totalReputation={dao.reputationTotalSupply} daoName={dao.name} /> </div>
: ""}
<div><strong>{genName()}:</strong><br /><span>{formatTokens(genBalance)}</span></div>
- <div><strong>{baseTokenName()}:</strong><br /><span>{formatTokens(ethBalance)}</span></div>
<div><strong>{baseTokenName()}:</strong><br /><span>{formatTokens(ethBalance)}</span></div>
</div>
<div>
<strong>ETH Address:</strong><br />
<span>{accountAddress.substr(0, 20)}...</span>
<button className={css.copyButton} onClick={this.copyAddress}><img src="/assets/images/Icon/Copy-black.svg" /></button>
<CopyToClipboard value={accountAddress} color={IconColor.Black}/>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 6672e2d

Please sign in to comment.