Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade app structure #41

Merged
merged 29 commits into from
Feb 29, 2020

Conversation

vivianedias
Copy link
Contributor

@vivianedias vivianedias commented Feb 25, 2020

Update app structure to use hooks and add dark mode feature.

  • When clicking on a proposal, you are redirected to the page of that proposal, which contains more details about it. This page has a path like proposals/{$id}, so if this link would be shared later, the user would be redirected to this specific proposal.
  • If you'd like to change the UI to dark mode, it is now supported.
  • Supports opened/closed filters
  • Solves Polish frontend based on figma designs #5 partially by updating the overall layout and leaving it as similar as possible to the figma file

Viviane added 4 commits February 25, 2020 17:21
Proposals is a component in the screens folder, separated from the
App file, and recieves `proposals` and `selectProposal` as props
from the App component.
App logic passes function hooks to whoever calls it, such as
`selectProposal` or `isSyncing`.
Major change in the component, that now renders the proposals
using the `Proposals` component, and passes functions to its
components via the appLogic hook. There were some UI updates such
as Header, that is simpler and mobile friendly.
Copy link
Member

@sembrestels sembrestels left a comment

Choose a reason for hiding this comment

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

The code looks very well. When you finish I test it and review it again.

package.json Show resolved Hide resolved
Viviane added 16 commits February 25, 2020 19:55
If there are no proposals made, then the app will render this.
When a proposal is selected, a proposal detail page opens with
the details from that proposal.
App now works in a different logic - according to the hooks state,
selectedProposal and proposals.
This logic is passed to App and it's child components via props, if necessary.
…onal

All components are dummy components, only rendering data that is passed to them.
Components, state and logic are only rendered and passed through here.
Copy link
Member

@sembrestels sembrestels left a comment

Choose a reason for hiding this comment

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

Thanks for moving this forward Viviane. It's great to see how this repo is having activity again!!

})
const [isDisabled, setStatus] = useState(true)

const isFormValid = form => form.filter(i => i === '' || i === 0).length === 0
Copy link
Member

Choose a reason for hiding this comment

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

We should only consider required fields here.

Comment on lines 38 to 47
<Field label="Description">
<TextInput
onChange={event =>
setForm({ ...form, description: event.target.value })
}
value={form.description}
wide
multiline
/>
</Field>
Copy link
Member

Choose a reason for hiding this comment

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

We can't store proposal descriptions yet (as they should be stored and pinned on IPFS, and we are not ready for that). I would remove this field for now.

Comment on lines 106 to 115
<div>
<H2 color={theme.surfaceContentSecondary}>Description</H2>
<Text
css={`
${textStyle('body2')};
`}
>
{description || DEFAULT_DESCRIPTION}
</Text>
</div>
Copy link
Member

Choose a reason for hiding this comment

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

Let's not display descriptions for now.

${textStyle('body3')};
`}
>
{description.slice(0, 29) + '...'}
Copy link
Member

Choose a reason for hiding this comment

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

I would not show description in the table, as we want to empathize the title.

app/src/screens/ProposalDetail.js Outdated Show resolved Hide resolved
app/src/screens/NoProposals.js Outdated Show resolved Hide resolved
app/src/utils.js Outdated Show resolved Hide resolved
@PJColombo PJColombo merged commit 3ba2dfc into 1Hive:master Feb 29, 2020
@sembrestels
Copy link
Member

Thanks @vivianedias! @PJColombo and me have reviewed it today, and that's fantastic!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants