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

Create a program #2045

Merged
merged 28 commits into from
Feb 20, 2020
Merged

Conversation

ceolson01
Copy link
Contributor

@ceolson01 ceolson01 commented Feb 12, 2020

⚠️ This PR is based on #2065 and uses JoinColony/colonyServer#51

Description

This PR adds the create / edit description page, a few mutations, and some extra enhancements towards this feature.

New stuff

  • Program create, update, and publish

Changes 🏗

  • Soubroute for colony home / program create

Demo 🎥

Create Program

Closes #2008

@ceolson01 ceolson01 self-assigned this Feb 12, 2020
@ceolson01 ceolson01 changed the base branch from master to feature/2005-structured-work-aside February 12, 2020 16:54
@ceolson01 ceolson01 force-pushed the feature/2008-create-program branch from 5cb5843 to 6acea2c Compare February 12, 2020 17:53
@ceolson01 ceolson01 requested review from rdig and chmanie and removed request for rdig and chmanie February 13, 2020 00:42
@ceolson01 ceolson01 marked this pull request as ready for review February 13, 2020 00:43
@ceolson01 ceolson01 removed request for rdig and chmanie February 14, 2020 15:02
@ceolson01 ceolson01 mentioned this pull request Feb 14, 2020
@ceolson01 ceolson01 force-pushed the feature/2005-structured-work-aside branch from 55a3a5a to 3dee31b Compare February 14, 2020 17:03
@ceolson01 ceolson01 force-pushed the feature/2008-create-program branch from fd90e67 to 789b71f Compare February 14, 2020 17:09
@ceolson01 ceolson01 requested review from chmanie and rdig February 18, 2020 01:39
@ceolson01 ceolson01 force-pushed the feature/2008-create-program branch from b85547c to bc4ea81 Compare February 18, 2020 23:55
Copy link
Member

@rdig rdig left a comment

Choose a reason for hiding this comment

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

Very nice work here Curtis.

This is a consistent chunk out of the Program! 💯

const canAdmin = canCreateProgram(userRoles);

if (loading) {
return <SpinnerLoader />;
Copy link
Member

Choose a reason for hiding this comment

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

Since this is a "full page" component, maybe it's a good idea to have a large spinner, with a message in it.

Something like this: https://github.com/JoinColony/colonyDapp/blob/master/src/modules/dashboard/components/Community/Community.tsx#L117-L119

But this is good either way, so up to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great call! Done

text={MSG.buttonPublish}
title={MSG.buttonPublishTitle}
/>
<Button
Copy link
Member

Choose a reason for hiding this comment

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

This button is saying "Save Draft" even after the program has been published

Screenshot from 2020-02-19 20-50-49

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great eye 💪

Fixed

/>
</div>
</div>
<Input
Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I know this is a nit-pick, but out of the bat this field is invalid and throwing an error (w/o ever touching it)

Screenshot from 2020-02-19 20-44-59

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call.

Since we don't really want to validateOnMount (what causes this issue), I've decided to use an alternate method to validate canPublish. I'm not in love with it, but it works

@ceolson01 ceolson01 changed the base branch from feature/2005-structured-work-aside to feature/structured-work February 20, 2020 02:18
@ceolson01 ceolson01 force-pushed the feature/2008-create-program branch 2 times, most recently from ffe08ce to 109a6a7 Compare February 20, 2020 14:14
@ceolson01 ceolson01 removed the request for review from chmanie February 20, 2020 14:35
@ceolson01 ceolson01 force-pushed the feature/structured-work branch from 1876981 to b3663df Compare February 20, 2020 14:47
@ceolson01 ceolson01 force-pushed the feature/2008-create-program branch from 109a6a7 to 4def007 Compare February 20, 2020 15:58
Copy link
Member

@rdig rdig left a comment

Choose a reason for hiding this comment

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

Nice changes.

Now the title field is no longer invalid by default:

Screenshot from 2020-02-20 19-04-11

And the button changes from save draft -> save after publishing the program

Screenshot from 2020-02-20 19-04-28

I found an error, but that has more to do with the react-intl changes rather then this, but I'll post it anyway.

Any time I open the notifications popover, I get this error:

Screenshot from 2020-02-20 19-06-05

@ceolson01
Copy link
Contributor Author

Any time I open the notifications popover, I get this error:

Nice find. Which browser?

@rdig
Copy link
Member

rdig commented Feb 20, 2020

Plain ol' chrome

@ceolson01
Copy link
Contributor Author

Ok, I have an attempt at a fix in #2067

Merging this now

@ceolson01 ceolson01 merged commit 428b8f9 into feature/structured-work Feb 20, 2020
@ceolson01 ceolson01 deleted the feature/2008-create-program branch February 20, 2020 20:04
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.

Create new program
2 participants