Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Add ability to archive pages #588

Merged
merged 3 commits into from
Jul 25, 2016
Merged

Add ability to archive pages #588

merged 3 commits into from
Jul 25, 2016

Conversation

rodrei
Copy link
Contributor

@rodrei rodrei commented Jul 22, 2016

  • Refactored Page#active boolean flag to be a Page#publish_status,
    which is an enum with 3 possible statuses.
  • Add ability to archive and unarchive pages.
  • Add ability to search pages filtering by publish_status

Important: There's a new migration that includes a mini-script to update all existing pages. This is quite critical, so I urge anyone reviewing this to pay special attention to it.

@paulaferris
Copy link

Nice! Let's make sure this gets tested by Eoin once it's on staging from a UI perspective.

@rodrei
Copy link
Contributor Author

rodrei commented Jul 22, 2016

UI/UX is definitely something to consider, I'm not super happy about how it works.

@@ -40,7 +40,7 @@ const setupOnce = require('setup_once');
},

toggleState: function(){
this.state = !this.state;
this.state = this.state === 'published' ? 'unpublished' : 'published';
Copy link
Contributor

Choose a reason for hiding this comment

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

using 'published' and 'unpublished' instead of booleans seems like a good change

@osahyoun
Copy link
Member

@rodrei a lovely PR!

When clicking 'Archive', could you have the user confirm the action? It's especially important when the page is published.

@rodrei
Copy link
Contributor Author

rodrei commented Jul 25, 2016

@osahyoun thanks! That's the cutest thing I've ever seen said about a PR ^_^

Great idea about adding a confirm. I'll add that asap.

rodrei and others added 3 commits July 25, 2016 11:39
* Refactored Page#active boolean flag to be a Page#publish_status,
which is an enum with 3 possible statuses.
* Add ability to archive and unarchive pages.
* Add ability to search pages filtering by `publish_status
@rodrei
Copy link
Contributor Author

rodrei commented Jul 25, 2016

@omar already added the confirm pop-up to the archive link. I also fixed an issue with the schema not being updated (that's why the tests failed previously). Lemme know if you'd like me to merge this into dev.

@osahyoun osahyoun merged commit 679f1b4 into development Jul 25, 2016
@osahyoun
Copy link
Member

🎆

@osahyoun osahyoun deleted the hide-pages branch July 25, 2016 17:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants